Example #1
0
        public ActionResult DeleteConfirmed(int id)
        {
            var item = PointOfSale.Find(id);

            //PointOfSale item = PointOfSale.Find (id);
            try {
                using (var scope = new TransactionScope()) {
                    item.DeleteAndFlush();
                }
                return(PartialView("_DeleteSuccesful", item));
            } catch (Exception) {
                return(PartialView("DeleteUnsuccessful"));
            }
        }
Example #2
0
        public ActionResult Edit(PointOfSale item)
        {
            item.Store     = Store.TryFind(item.StoreId);
            item.Warehouse = Warehouse.TryFind(item.WarehouseId);

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

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

            entity.Code      = item.Code;
            entity.Name      = item.Name;
            entity.Comment   = item.Comment;
            entity.Store     = item.Store;
            entity.Warehouse = item.Warehouse;

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

            return(PartialView("_Refresh"));
        }
Example #3
0
        //
        // GET: /PointSale/Delete/5

        public ActionResult Delete(int id)
        {
            return(PartialView("_Delete", PointOfSale.Find(id)));
        }
Example #4
0
        //
        // GET: /Warehouses/Edit/5

        public ActionResult Edit(int id)
        {
            var item = PointOfSale.Find(id);

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