Ejemplo n.º 1
0
        public override void SaveModel()
        {
            SupplierTranscationItem data = new SupplierTranscationItem();

            CopyToModel(data, this);

            var result = controller.CreateOrUpdate(data);

            if (result.HasError)
            {
                Errors   = result.Errors;
                HasError = result.HasError;
            }

            Refresh();
        }
Ejemplo n.º 2
0
 public override void SaveModel()
 {
     try
     {
         SuppliersController controller = new SuppliersController();
         if (Items.Any())
         {
             foreach (var item in Items)
             {
                 SupplierTranscationItem data = new SupplierTranscationItem();
                 CopyToModel(data, item);
                 data.ManufacturersBussinessItemsId = item.Id;
                 data.PlaceofReceipt = item.PlaceofReceipt;
                 data.ProjectId      = item.ProjectId;
                 controller.CreateOrUpdate(data);
             }
         }
     }
     catch (Exception ex)
     {
         setErrortoModel(this, ex);
     }
 }