예제 #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);
 }