Esempio n. 1
0
 private void btnSave_Click(object sender, EventArgs e)
 {
     try
     {
         if (gvArticles.FocusedRowHandle >= 0)
         {
             if (ObjBSupplier == null)
             {
                 ObjBSupplier = new BSupplier();
             }
             ObjESupplier.dtSupplierToDB = new DataTable();
             ObjESupplier.dtSupplierToDB.Columns.Add("SupplierID");
             DataRowView row = null;
             DataRow     dr  = null;
             foreach (object item in chkSuppliersList.CheckedItems)
             {
                 row = item as DataRowView;
                 dr  = ObjESupplier.dtSupplierToDB.NewRow();
                 dr["SupplierID"] = row["SupplierID"];
                 ObjESupplier.dtSupplierToDB.Rows.Add(dr);
             }
             ObjBSupplier.SupplierProposalMerge(ObjESupplier);
             ObjESupplier.IsActive = true;
             this.Close();
         }
     }
     catch (Exception ex)
     {
         Utility.ShowError(ex);
     }
 }