Exemplo n.º 1
0
        public ActionResult Delete(int id)
        {
            var item = SupplierAgreement.Find(id);

            ViewBag.OwnerId = id;
            return(PartialView("_Delete", item));
        }
Exemplo n.º 2
0
        public ActionResult Details(int id)
        {
            var item = SupplierAgreement.Find(id);

            ViewBag.OwnerId = item.Supplier.Id;

            return(PartialView("_Details", item));
        }
Exemplo n.º 3
0
        public ActionResult DeleteConfirmed(int id)
        {
            var item = SupplierAgreement.Find(id);

            using (var scope = new TransactionScope()) {
                item.DeleteAndFlush();
            }

            return(PartialView("_Refresh", new { id = item.Supplier.Id }));
        }
Exemplo n.º 4
0
        public ActionResult CreateForSupplier(SupplierAgreement item)
        {
            item.Supplier = Supplier.Find (item.SupplierId);

            if (!ModelState.IsValid)
                return PartialView ("_Create", item);

            using (var scope = new TransactionScope ()) {
                item.CreateAndFlush ();
            }

            return PartialView ("_Refresh");
        }
Exemplo n.º 5
0
        public ActionResult CreateForSupplier(SupplierAgreement item)
        {
            item.Supplier = Supplier.Find(item.SupplierId);

            if (!ModelState.IsValid)
            {
                return(PartialView("_Create", item));
            }

            using (var scope = new TransactionScope()) {
                item.CreateAndFlush();
            }

            return(PartialView("_Refresh"));
        }
Exemplo n.º 6
0
        public ActionResult Edit(SupplierAgreement item)
        {
            if (!ModelState.IsValid)
            {
                return(PartialView("_Edit", item));
            }

            var entity = SupplierAgreement.Find(item.Id);

            entity.Start   = item.Start;
            entity.End     = item.End;
            entity.Comment = item.Comment;

            using (var scope = new TransactionScope()) {
                entity.UpdateAndFlush();
            }

            return(PartialView("_Refresh"));
        }
Exemplo n.º 7
0
        public ActionResult Edit(SupplierAgreement item)
        {
            if (!ModelState.IsValid) {
                return PartialView ("_Edit", item);
            }

            var entity = SupplierAgreement.Find (item.Id);

            entity.Start = item.Start;
            entity.End = item.End;
            entity.Comment = item.Comment;

            using (var scope = new TransactionScope ()) {
                entity.UpdateAndFlush ();
            }

            return PartialView ("_Refresh");
        }
Exemplo n.º 8
0
        public ActionResult Edit(int id)
        {
            var item = SupplierAgreement.Find(id);

            return(PartialView("_Edit", item));
        }