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>())); }
public ActionResult UpdateShipper(Shipper shipper) { sRep.Update(shipper); return(RedirectToAction("ShipperList")); }
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); }