Esempio n. 1
0
 /// <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-01
 private void btnAddNewVIP_Click(object sender, EventArgs e)
 {
     frmVIPClient.frmUpdateVIPCard myfrmAddVIPCard = new frmUpdateVIPCard();
     if (myfrmAddVIPCard.ShowDialog() == DialogResult.OK)
     {
         InitializeControls();
     }
 }
Esempio n. 2
0
 /// <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-01
 private void btnUpdate_Click(object sender, EventArgs e) //
 {
     if (this.gridViewMain.SelectedRowsCount <= 0)        //如果一项都没有选中
     {
         XtraMessageBox.Show("请选择要修改的项!", "注意:", MessageBoxButtons.OK, MessageBoxIcon.Warning);
         return;
     }
     object[] tempInfo = ClassAssist.CommonOperator.GetGVSelectRowInfo(this.gridViewMain); //选中的行
     frmVIPClient.frmUpdateVIPCard myUpdateVIP = new frmUpdateVIPCard(tempInfo);           //通过构造函数把选中行的数据传到修改窗
     if (myUpdateVIP.ShowDialog() == DialogResult.OK)
     {
         InitializeControls();
     }
 }