-
Barcode input processing and window status change processingIT Story/C# & WPF 2022. 6. 23. 20:57반응형
void ReciveBarCode(string ReciveData) { if (CommonUtils.BarCodeStat) return; string CardID = ReciveData.Remove(ReciveData.Length - 2, 2); string Que = "Select no from TB_Member Where EducardNum = '" + CardID + "'"; DataTable dt = PLAcaDBManager.GetQueryData(Que); if (dt != null) { int MemberKey = 0; foreach (DataRow row in dt.Rows) MemberKey = Convert.ToInt32(row["no"]); wndMonthlyDayTest wms = new wndMonthlyDayTest(MemberKey); if (wms.ShowDialog() == DialogResult.OK) { XtraMessageBox.Show("출석처리가 완료되었습니다.", "Info", MessageBoxButtons.OK, MessageBoxIcon.Information); } wms.Close(); } else UtilManager.ShowWaitDialog("등록되어 있지않은 회원입니다."); //XtraMessageBox.Show("등록되어 있지않은 회원입니다.", "오류", MessageBoxButtons.OK, MessageBoxIcon.Error); } private void ucInfoWindow1_OnChangeState() { if (ucInfoWindow1.UseInfoWindow) { pnlInfo.Height = 140; spInfo.Visible = true; } else { pnlInfo.Height = 30; spInfo.Visible = false; } } bool _blogout = false; private void MainForm_FormClosing(object sender, FormClosingEventArgs e) { try { if (!_blogout) { if (XtraMessageBox.Show(this, "프로그램을 종료하시겠습니까?", "종료 확인", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == System.Windows.Forms.DialogResult.No) { e.Cancel = true; return; } this.DialogResult = System.Windows.Forms.DialogResult.OK; CommonUtils.plcomm.Close(); } else { _blogout = false; this.DialogResult = System.Windows.Forms.DialogResult.Cancel; } } catch (Exception ee) { TraceManager.AddLog(string.Format("{0}r\n{1}", ee.StackTrace, ee.Message)); System.Diagnostics.Debug.WriteLine(string.Format("{0}r\n{1}", ee.StackTrace, ee.Message)); }
반응형'IT Story > C# & WPF' 카테고리의 다른 글
S6F11Related Send processing example source (0) 2022.07.03 SecsDrv_S3F101 GLSINFO processing example source (0) 2022.07.03 UserControl_MouseMove function example (0) 2022.06.23 .NET 1-Dimensional Array <-> Example Source of Transformation Between DataTable (0) 2022.06.19 Example of changing the CellStyle of Row in .NET DataGridView (0) 2022.06.19