private void toolStripButton1_Click(object sender, EventArgs e) { if (this.Id == 0) { DataForms.FrmEditClientAbonement frm = new FrmEditClientAbonement(); frm.SelectAbonementMsg += new FrmEditClientAbonement.SelectAbonementHandler(frm_SelectAbonementMsg); frm.ShowDialog(); } else { DataForms.FrmEditClientAbonement frm = new FrmEditClientAbonement(DBLayer.Clients.GetDetails(this.Id)); frm.ShowDialog(); } LoadData(); }
private void toolStripButton2_Click(object sender, EventArgs e) { int[] i; int SelRow = -1; i = advBandedGridView2.GetSelectedRows(); SelRow = i[0]; int ind = 0; try { ind = Convert.ToInt32(advBandedGridView2.GetRowCellValue(SelRow, "Id")); } catch (Exception err) { MessageBox.Show(this, err.Message, Lib.StringConstants.ProjectName, MessageBoxButtons.OK, MessageBoxIcon.Error); } DataForms.FrmEditClientAbonement frm = new FrmEditClientAbonement(ind); frm.ShowDialog(); LoadData(); }