コード例 #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();
        }
コード例 #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));
     }
 }
コード例 #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));
     }
 }
コード例 #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();
        }
コード例 #5
0
 public void Update(DebtCoverDTO dto)
 {
     new DebtCoverDalFacade().Update(dto);
 }
コード例 #6
0
 public void Add(DebtCoverDTO dto)
 {
     new DebtCoverDalFacade().Add(dto);
 }