예제 #1
0
        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"));
        }
예제 #2
0
        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"));
        }
예제 #3
0
        public ViewResult Delivery(int id)
        {
            var entity = SpecialReceipt.TryFind(id);

            return(View(entity));
        }