コード例 #1
0
 public ActionResult DetailDelivery(DetailDeliveryPOProcViewModel model)
 {
     try
     {
         ITransaksiPOProcService svc = new TransaksiPOProcService();
         var result = svc.UpdateDelivery(model);
         this.AddNotification("Your Data Has Been Successfully Updated. ", NotificationType.SUCCESS);
         return(RedirectToAction("Index"));
     }
     catch (Exception ex)
     {
         general.AddLogError("POProcurement DetailDelivery", ex.Message, ex.StackTrace);
         return(View("~/Views/Transaksi/Procurement/Index.cshtml", model));
     }
 }
コード例 #2
0
        public DetailDeliveryPOProcViewModel UpdateDelivery(DetailDeliveryPOProcViewModel model)
        {
            var dc     = new eprocdbDataContext();
            var result = (from custpo in dc.CUSTOMPOs where custpo.PONUMBER == model.PONumber select custpo).SingleOrDefault();

            result.PURCHASESTATUS       = model.PurchaseStatus;
            result.CARROSERIEVENDORNAME = model.CarrosserieAccessoriesVendorName;
            result.ACCESORIESADDRESS    = model.CarrosserieAccessoriesAddress;
            result.REMARKSCARROSSERIE   = model.RemarksCarrosserieAccessories;
            result.PICKAROSERI          = model.PICCarrosserieAccessories;
            result.NOTELEPONKAROSERI    = model.PhoneCarrosserieAccessories;
            result.BENTUKKAROSERI       = model.BentukCarrosserieAccessories;
            result.TGLSELESAIKAROSERI   = model.DateFinishCarrosserieAccessories;
            result.REMARKS       = model.RemarksPO;
            result.MODIFIED_DATE = DateTime.Now;
            result.MODIFIED_BY   = System.Web.HttpContext.Current.Session["UserID"].ToString();
            dc.SubmitChanges();
            UpdateStatus(model.PONumber);
            UpdateInvoiceStatus(model.PONumber);
            return(model);
        }