Пример #1
0
        public ViewResult Abonent()
        {
            NewAbonentModel model = new NewAbonentModel
            {
                Tarifs = entityWork.GetTarifs()
            };

            return(View(model));
        }
Пример #2
0
        //
        // GET: /Abonents/Create

        public ActionResult Create()
        {
            if (!AccessActions.IsAccess("Abonents::Write"))
            {
                System.Web.Routing.RouteValueDictionary route = new System.Web.Routing.RouteValueDictionary();
                route.Add("err", "Нет доступа!");
                return(RedirectToAction("Error", "User", route));
            }
            NewAbonentModel theAbonent = new NewAbonentModel();

            return(View(theAbonent));
        }
Пример #3
0
        public async Task <ViewResult> Abonent(NewAbonentModel abonent)
        {
            await entityWork.AddAbonentAsync(new DataAbonent { Address = abonent.Address, Name = abonent.Name, TarifId = abonent.TarifId });

            return(Abonent());
        }