You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

73 lines
1.8 KiB

using SelfHelpClient.BL;
using SelfHelpClient.BO;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace SelfHelpClient
{
public partial class ReadCardForm2 : Form
{
string _cardNumber = "";
BrushIdCard mBrushIdCard;
public ViewEntity VEntity { get; set; }
public ReadCardForm2()
{
InitializeComponent();
this.KeyPress += ReadCardForm_KeyPress;
mBrushIdCard = new BrushIdCard(MBrushIdCard_StatusChanged, MBrushIdCard_IdCardBrushed);
}
private void MBrushIdCard_StatusChanged(object sender, IdCardStatusChangeEventArgs e)
{
}
//刷卡成功
private void MBrushIdCard_IdCardBrushed(object sender, IdCardEventArgs e)
{
var idCard = e.IdCard.ID;
//MessageBox.Show(string.Format("刷卡成功,身份证号:{0}", idCard));
FillViewEntity(idCard);
DialogResult = DialogResult.OK;
}
void ReadCardForm_KeyPress(object sender, KeyPressEventArgs e)
{
//if (e.KeyChar == (char)Keys.Tab)
//{
// FillViewEntity(_cardNumber);
// DialogResult = DialogResult.OK;
//}
//else
// _cardNumber += e.KeyChar.ToString();
}
private void FillViewEntity(string idCard)
{
var list = WeightBillBL.GetViewEntity(idCard).OrderByDescending(x => x.Date).ToList();
if (list.Count == 0)
{
DialogForm.ShowDialog("没有待办理业务", 5);
this.Close();
}
else if (list.Count == 1)
VEntity = list.First();
else
{
//new ItemSelect(list, this).ShowDialog();
}
}
private void backBtn_Click(object sender, EventArgs e)
{
this.Close();
}
}
}