Пример #1
0
        public bool Approve(int id)
        {
            var shipper = _repo.GetById(id).Translate <ShipperDetail, ShipperDetailDTO>();

            shipper.StatusId = ACTIVE;
            var mess = new Message();

            mess.DataID      = null;
            mess.Description = "You have been processed to be a shipper.";
            mess.FromID      = 1;
            mess.IsRead      = false;
            mess.MessageType = null;
            mess.SentID      = shipper.ShipperId;
            mess.CreatedDate = DateTime.Now;
            _mess.CreateMessage(mess);
            return(_repo.Update(shipper.Translate <ShipperDetailDTO, ShipperDetail>()));
        }
Пример #2
0
 public ActionResult UpdateShipper(Shipper shipper)
 {
     sRep.Update(shipper);
     return(RedirectToAction("ShipperList"));
 }
Пример #3
0
 public IHttpActionResult Put([FromUri] int id, [FromBody] Shipper shipper)
 {
     shipper.ShipperId = id;
     shipperRepository.Update(shipper);
     return(Ok(shipper));
 }
 public void UpdateShipper(Shipper item, int id)
 {
     shipperRepository.Update(item, id);
 }