private void add_new_product_Click(object sender, EventArgs e) { if (string.IsNullOrEmpty(clients_combo_box.Text)) { } else { addnewclientproduct myform = new addnewclientproduct(clients[clients_combo_box.SelectedIndex], mEmployee, mAccount, mPermission); myform.ShowDialog(); } }
private void add_client_product_Click(object sender, EventArgs e) { if (clients.Count > 0) { if (clients_grid_view.SelectedRows.Count > 0) { addnewclientproduct myform = new addnewclientproduct(clients[clients_grid_view.SelectedRows[0].Index], mEmployee, mAccount, mPermission); myform.ShowDialog(); } else { MessageBox.Show("لا بد من تحديد العميل المراد إضافة الأصناف له ", "تحذير", MessageBoxButtons.OK, MessageBoxIcon.Warning, MessageBoxDefaultButton.Button1, MessageBoxOptions.RtlReading); } } }
private void addnewclientproduct_Click(object sender, EventArgs e) { addnewclientproduct myform = new addnewclientproduct(mclient, mEmployee, mAccount, mPermission); myform.ShowDialog(); }