public ActionResult Confirm(int id) { var entity = SpecialReceipt.TryFind(id); entity.Updater = CurrentUser.Employee; entity.ModificationTime = DateTime.Now; entity.IsCompleted = true; using (var scope = new TransactionScope()) { entity.UpdateAndFlush(); } return(RedirectToAction("Index")); }
public ActionResult Cancel(int id) { var entity = SpecialReceipt.TryFind(id); if (entity == null || entity.IsCancelled || entity.IsDelivered) { return(RedirectToAction("Index")); } entity.IsCancelled = true; entity.ModificationTime = DateTime.Now; entity.Updater = CurrentUser.Employee; using (var scope = new TransactionScope()) { entity.UpdateAndFlush(); } return(RedirectToAction("Index")); }
public ViewResult Delivery(int id) { var entity = SpecialReceipt.TryFind(id); return(View(entity)); }