Example #1
0
        public void Update(IncomeProductDTO dto)
        {
            var elementToUpdate = (from c in db.IncomeProducts where c.Id == dto.Id select c).FirstOrDefault();

            elementToUpdate.Quantity    = dto.Quantity;
            elementToUpdate.UpdatedDate = DateTime.Now;
            db.SubmitChanges();
        }
Example #2
0
 public HttpResponseMessage UpdateIncome(IncomeProductDTO dto)
 {
     try
     {
         new IncomeBL().Update(dto);
         var result = Request.CreateResponse(HttpStatusCode.OK, true);
         return(result);
     }
     catch (Exception ex)
     {
         LogManager.Instance.Error(ex);
         return(Request.CreateResponse(HttpStatusCode.InternalServerError));
     }
 }
Example #3
0
 public void Update(IncomeProductDTO dto)
 {
     new IncomeDalFacade().Update(dto);
 }