public async Task <ViewResult> CreateDriverNew()
 {
     ViewBag.TitlePart = "Добавления нового водителя";
     autoParlLogic     = new AutoParlLogic();
     ViewBag.sel       = new SelectList(autoParlLogic.AutoNoneDriverList(), "Id", "Model");
     return(View());
 }
        public async Task <JsonResult> DeleteAutoNew(Int32 autoId)
        {
            autoParlLogic = new AutoParlLogic();
            await autoParlLogic.RemoveAutoIn(autoId);

            return(Json(1, JsonRequestBehavior.AllowGet));
        }
        public async Task <JsonResult> EditAutoNew(Auto auto)
        {
            autoParlLogic = new AutoParlLogic();
            await autoParlLogic.EditAutoIn(auto);

            return(Json(auto, JsonRequestBehavior.AllowGet));
        }
        public async Task <JsonResult> EditDriverNew(Driver driver)
        {
            autoParlLogic = new AutoParlLogic();
            await autoParlLogic.EditDriverIn(driver);

            return(Json(driver, JsonRequestBehavior.AllowGet));
        }
 public async Task <ViewResult> EditDriverNew(int id)
 {
     ViewBag.TitlePart = "Изминение данных о водителе";
     autoParlLogic     = new AutoParlLogic();
     ViewBag.sel       = new SelectList(autoParlLogic.AutoNoneDriverList(), "Id", "Model");
     return(View(autoParlLogic.ViewOneDriver(id)));
 }
        public JsonResult AutoListTable()
        {
            autoParlLogic = new AutoParlLogic();

            var json = autoParlLogic.AutoAllList().ToList();

            return(Json(json, JsonRequestBehavior.AllowGet));
        }
 public JsonResult DriverListTable()
 {
     autoParlLogic = new AutoParlLogic();
     autoParlLogic = new AutoParlLogic();
     return(Json(autoParlLogic.DriverAllList(), JsonRequestBehavior.AllowGet));
 }
 public async Task <ViewResult> EditAutoNew(int id)
 {
     ViewBag.TitlePart = "Изминение характеристик автомобиля";
     autoParlLogic     = new AutoParlLogic();
     return(View(autoParlLogic.ViewOneAuto(id)));
 }