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