public override void btn_Add_Click(object sender, EventArgs e) { frmSalesOrderAddEdit frm = new frmSalesOrderAddEdit(); frm.FormClosed += frmSalesOrderAddEdit_FormClosed; frm.ShowDialog(); }
public override void btn_Edit_Click(object sender, EventArgs e) { if (dgrid_Result.SelectedRows.Count != 0) { if (!Convert.ToBoolean(dgrid_Result.SelectedRows[0].Cells["IsClosed"].Value)) { frmSalesOrderAddEdit frm = new frmSalesOrderAddEdit(Convert.ToInt32(dgrid_Result.SelectedRows[0].Cells["SalesHeaderID"].Value)); frm.ShowDialog(); } else { MessageBox.Show("لا يمكنك تعديل هذه الفاتوره حيث انها مغلقه"); } } }