/// <summary> /// 登记新客户 /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param> /// 整理人:桂书丛 /// 整理时间:2013-02-28 private void btnRegisterNewClient_Click(object sender, EventArgs e) { frmRegisterClient myfrmRegisterClient = new frmRegisterClient(); if (myfrmRegisterClient.ShowDialog() == DialogResult.OK) { InitializeControls(); } }
/// <summary> /// 修改客户信息 /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param> /// 整理人:桂书丛 /// 整理时间:2013-02-28 private void btnUpdateClientInfo_Click(object sender, EventArgs e) { if (this.gridViewMain.SelectedRowsCount <= 0) //如果一行都没有选中 { XtraMessageBox.Show("请选择要修改的项!", "注意:", MessageBoxButtons.OK, MessageBoxIcon.Warning); return; } DataRow tempDataRow = this.gridViewMain.GetFocusedDataRow(); string VIPName = this.txtVIPName.Text.Trim().ToString(); frmRegisterClient myfrmRegisterClient = new frmRegisterClient(tempDataRow, VIPName); if (myfrmRegisterClient.ShowDialog() == DialogResult.OK) { InitializeControls(); } }