Ejemplo n.º 1
0
        public static SlsDelivery MapToSlsSalesDelivery(SlsDeliveryViewModel obj, SlsDelivery model)
        {
            if (model == null)
                model = new SlsDelivery();

            model.Id = obj.Id;
            model.SlsSalesOrderId = obj.SlsSalesOrderId;
            model.DeliveryDate = obj.DeliveryDate;
            model.ChallanNo = obj.ChallanNo;
            model.InvoiceNo = obj.InvoiceNo;
            model.VehicleNo = obj.VehicleNo;
            model.Remarks = obj.Remarks;
            model.Discount = obj.Discount;
            model.Total = obj.Total;
            model.ReceivedStatus = obj.ReceivedStatus;
            model.ReceivedDate = obj.ReceivedDate;
            model.ReceivedRemarks = obj.ReceivedRemarks;
            model.CreatedBy = obj.CreatedBy;
            model.CreatedDate = obj.CreatedDate;
            model.ModifiedBy = obj.ModifiedBy;
            model.ModifiedDate = obj.ModifiedDate;

            return model;
        }
        public ActionResult Update(SlsDelivery objSalesReceive)
        {
            int userId = Convert.ToInt32(Session["userId"]);
            Operation objOperation = new Operation { Success = false };

            if ((bool)Session["Edit"])
            {

                objSalesReceive.ModifiedBy = userId;
                objSalesReceive.ModifiedDate = DateTime.Now;
                objOperation = _DeliveryService.Update(objSalesReceive);
            }
            return Json(objOperation, JsonRequestBehavior.DenyGet);
        }
Ejemplo n.º 3
0
        public Operation Update(SlsDelivery objSalesReceive)
        {
            //var vmObj = SlsSalesDeliveryMapModelToVM.MapToSlsSalesDelivery(objSalesReceive);
            //return Update(vmObj);
            Operation objOperation = new Operation { Success = true, OperationId = objSalesReceive.Id };
            _DeliveryRepository.Update(objSalesReceive);

            try
            {
                _UnitOfWork.Commit();
            }
            catch (Exception ex)
            {
                objOperation = new Operation { Success = false };

            }
            return objOperation;
        }