private void btn_enter_Click(object sender, EventArgs e) { bool check = CheckData(); if (check) { return; } ImportExcelCls iE = new ImportExcelCls(); iE.name = txb_Name.Text.Trim(); iE.dsid = txb_ID.Text.Trim(); iE.checkin = dtp.Value.ToShortDateString(); bool c = tp.AddBlackListName(iE); if (c) { ShowDialog("新增成功"); txb_Name.Text = ""; txb_ID.Text = ""; clearData(); } else { ShowDialog("可能存在相同身份证,请重新输入"); clearData(); } }
private void ShowHis() { listView.Items.Clear(); ImportExcelCls iec = tp.GetImport(txb_select.Text.Trim()); if (iec.dsid != "0") { if (iec.dsno.Length == 0) { listView.Items.Add("登记日期 -- " + iec.checkin); Initlbl("此人员在黑名单中"); ChangeTextColor(true); } else { listView.Items.Add("报名日期 -- " + iec.checkin); listView.Items.Add("技能证 -- " + iec.skilldate); listView.Items.Add("科一 -- " + iec.ky); listView.Items.Add("科二 -- " + iec.ke); listView.Items.Add("科三 -- " + iec.ks); listView.Items.Add("科四 -- " + iec.kms); ChangeTextColor(false); } lbl_name.Text = iec.name; lbl_NO.Text = iec.dsid; } else { Initlbl("未查询该学员,请重新输入。"); } txb_select.Text = ""; }
internal bool AddBlackListName(ImportExcelCls iE) { bool check = dC.CheckHisByDsid(iE.dsid) > 0; if (check) { return(false); } else { int count = dC.InSDBHis(iE); return(count > 0); } }