public override void btn_Edit_Click(object sender, EventArgs e) { int productGroupID = 0; if (dgrid_Result.Rows[dgrid_Result.SelectedCells[0].RowIndex].Cells["ProductGroupID"].Value != null) { productGroupID = Convert.ToInt32(dgrid_Result.Rows[dgrid_Result.SelectedCells[0].RowIndex].Cells["ProductGroupID"].Value); } else { MessageBox.Show("لابد من اختيار مجموعة"); } frmProductGroupAddEdit frm = new frmProductGroupAddEdit(productGroupID,this); frm.ShowDialog(); }
public override void btn_Edit_Click(object sender, EventArgs e) { int productGroupID = 0; if (dgrid_Result.Rows[dgrid_Result.SelectedCells[0].RowIndex].Cells["ProductGroupID"].Value != null) { productGroupID = Convert.ToInt32(dgrid_Result.Rows[dgrid_Result.SelectedCells[0].RowIndex].Cells["ProductGroupID"].Value); } else { MessageBox.Show("لابد من اختيار مجموعة"); } frmProductGroupAddEdit frm = new frmProductGroupAddEdit(productGroupID, this); frm.ShowDialog(); }
/// <summary> /// Events Override /// </summary> /// <param name="sender"></param> /// <param name="e"></param> public override void btn_Add_Click(object sender, EventArgs e) { frmProductGroupAddEdit frm = new frmProductGroupAddEdit(this); frm.ShowDialog(); }