Пример #1
0
 private void button1_Click(object sender, EventArgs e)
 {
     FrmKeyBoard frmKeyBoard = new FrmKeyBoard(true);
     if(frmKeyBoard.ShowDialog() == DialogResult.OK)
     {
         DataTable dataTable = get_service.getCustBySwipe(frmKeyBoard.value);
         if (dataTable.Rows.Count > 0)
         {
             Alert.Show("Thẻ từ đã tồn tại !",Color.Red);
             return;
         }
         Persistence.CustomerSwipe customerSwipe = new CustomerSwipe(frmKeyBoard.value);
         customerSwipe.isNew = true;
         listBox1.Items.Add(customerSwipe);
         swipeList.Add(customerSwipe);
     }
 }
Пример #2
0
 public ArrayList GetCustSwipeById(string custId)
 {
     ArrayList re = new ArrayList();
     DataTable table = getGui.getCustSwipeById(custId);
     for (int i = 0; i < table.Rows.Count; i++)
     {
         CustomerSwipe customerSwipe = new CustomerSwipe(table.Rows[i]["Swipe_ID"].ToString());
         re.Add(customerSwipe);
     }
     return re;
 }