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 ReadCardForm : Form
|
|
{
|
|
string _cardNumber = "";
|
|
public ViewEntity VEntity { get; set; }
|
|
public ReadCardForm()
|
|
{
|
|
InitializeComponent();
|
|
this.KeyPress += ReadCardForm_KeyPress;
|
|
}
|
|
|
|
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);
|
|
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();
|
|
}
|
|
}
|
|
}
|