Exemple #1
0
 private void btnUpdate_Click(object sender, EventArgs e)
 {
     if (UserControl.userType == 1 || UserControl.userType == 13 || UserControl.userType == 7)
     {
         try
         {
             int storeID, billNum = 0;
             if (int.TryParse(txtStoreID.Text, out storeID) && comStore.SelectedValue != null && int.TryParse(txtReturnedPermissionNum.Text, out billNum))
             {
                 if (!confirmed)
                 {
                     StorageReturnBill_Update form = new StorageReturnBill_Update(ImportStorageReturnID, comStore.SelectedValue.ToString(), billNum, txtPermissionNum.Text, txtReason.Text, dateTimePicker1.Value, this, tabControlContentStore);
                     form.ShowDialog();
                 }
                 else
                 {
                     MessageBox.Show("هذا الاذن منتهى");
                 }
             }
             else
             {
                 MessageBox.Show("يجب التاكد من البيانات");
             }
         }
         catch (Exception ex)
         {
             MessageBox.Show(ex.Message);
         }
     }
 }
 public StorageReturnQuantity_Update(int rowhandel, DataRowView Selrow, int storeId, PermissionReturnedReport PermissionsReport, StorageReturnBill_Update StorageReturnBillUpdate /*, string FormName, object Form*/, string PermissionNum)
 {
     InitializeComponent();
     dbconnection = new MySqlConnection(connection.connectionString);
     rowHandel    = rowhandel;
     selRow       = Selrow;
     storeID      = storeId;
     //formName = FormName;
     storageReturnBillUpdate  = StorageReturnBillUpdate;
     permissionNum            = PermissionNum;
     permissionReturnedReport = PermissionsReport;
 }