Ejemplo n.º 1
0
        public void Update(DebtCoverDTO element)
        {
            var elementToUpdate = (from c in db.DebtCovers where c.Id == element.Id select c).FirstOrDefault();

            elementToUpdate.CoverDate         = element.CoverDate;
            elementToUpdate.PaymentByCard     = element.PaymentByCard;
            elementToUpdate.PaymentByCash     = element.PaymentByCash;
            elementToUpdate.PaymentByTransfer = element.PaymentByTransfer;
            elementToUpdate.UpdatedDate       = DateTime.Now;
            db.SubmitChanges();
        }
Ejemplo n.º 2
0
 public HttpResponseMessage Update(DebtCoverDTO dto)
 {
     try
     {
         new DebtCoverBL().Update(dto);
         return(Request.CreateResponse(HttpStatusCode.OK, true));
     }
     catch (Exception ex)
     {
         LogManager.Instance.Error(ex);
         return(Request.CreateResponse(HttpStatusCode.InternalServerError, false));
     }
 }
Ejemplo n.º 3
0
 public HttpResponseMessage Add(DebtCoverDTO element)
 {
     try
     {
         new DebtCoverBL().Add(element);
         return(Request.CreateResponse(HttpStatusCode.OK, true));
     }
     catch (Exception ex)
     {
         LogManager.Instance.Error(ex);
         return(Request.CreateResponse(HttpStatusCode.InternalServerError));
     }
 }
Ejemplo n.º 4
0
        public void Add(DebtCoverDTO element)
        {
            var cover = new DebtCover()
            {
                OrderId           = element.OrderId,
                CoverDate         = element.CoverDate,
                PaymentByCard     = element.PaymentByCard,
                PaymentByTransfer = element.PaymentByTransfer,
                PaymentByCash     = element.PaymentByCash
            };

            db.DebtCovers.InsertOnSubmit(cover);
            db.SubmitChanges();
        }
Ejemplo n.º 5
0
 public void Update(DebtCoverDTO dto)
 {
     new DebtCoverDalFacade().Update(dto);
 }
Ejemplo n.º 6
0
 public void Add(DebtCoverDTO dto)
 {
     new DebtCoverDalFacade().Add(dto);
 }