/// <summary> /// 车主信息修改 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void BtnCustomerModify_Click(object sender, EventArgs e) { try { if (null == sender) { if (null == m_formCustomer) { m_formCustomer = new CFormCustomer(); } m_formCustomer.ClearCoutomerControls(); m_formCustomer.ShowDialog(this); //formCustomer.Tag = this.CucipCustomer; //formCustomer.ShowDialog(this); } else if (typeof(struCustomerInfo) == sender.GetType()) { struCustomerInfo Customer = (struCustomerInfo)sender; if (null == m_formCustomer) { m_formCustomer = new CFormCustomer(); } //m_formCustomer.Tag = this.CucipCustomer; m_formCustomer.FillCustomerInfo(Customer); m_formCustomer.ShowDialog(this); } } catch (Exception exception) { MessageBox.Show(CStaticClass.GetExceptionInfo(exception), "异常", MessageBoxButtons.OK, MessageBoxIcon.Error); } }
public CFormCustomerManage() { InitializeComponent(); try { iccdCom = CReadIniFile.ReadSectionData("刷卡器", "ICCardCom"); } catch (Exception ex) { CLOGException.Trace(ex.ToString()); } m_formCustomer = new CFormCustomer(); m_formCustomer.Tag = this.CucipCustomer; // 设置键盘“Esc”按钮 Button BtnCancel = new Button(); this.CancelButton = BtnCancel; BtnCancel.Click += new EventHandler(BtnCustomerClose_Click); // 设置键盘“Enter”按钮 this.AcceptButton = this.CucipCustomer.BtnFind; if (CStaticClass.ConfigBillingFlag()) {// 有收费管理系统, 删除车主信息tab this.TctlCustomer.Controls.Remove(this.TpCustomer); } this.CucipCustomer.CUserCustomerInfoPanel_Load(null, null); // 修改用户卡号的物理号时不需要 if (CStaticClass.myPara.ReplacePhyCardIDFlag) { this.LblICCardIDOld.Visible = false; this.CTxtICCardIDOld.Visible = false; } }
/// <summary> /// 制卡成功,是否添加用户信息 /// </summary> private void ICCardCreateAddCustomer(string strData) { string str = string.Format("制卡成功,是否添加{0}用户信息?", strData);//用户卡号是{1}, DialogResult dr = MessageBox.Show(str, "提示", MessageBoxButtons.OKCancel, MessageBoxIcon.Asterisk); if (dr == DialogResult.Cancel) { return; } if (null == m_formCustomer) { m_formCustomer = new CFormCustomer(); } m_formCustomer.ClearCoutomerControls(strData); m_formCustomer.ShowDialog(this); }