// GET: Cabinet/Menu/List public ActionResult List() { if (!SessionHelpers.IsAuthentificated()) { return(RedirectToAction("Login", "Authorize")); } var operation2 = new LoadAllProductsOperation(); operation2.ExcecuteTransaction(); return(View(operation2._products)); }
public ActionResult List(CategoryModel model) { if (!SessionHelpers.IsAuthentificated()) { return(RedirectToAction("Login", "Authorize")); } var operation = new LoadAllProductsOperation(model.Id); operation.ExcecuteTransaction(); return(PartialView("Partial/_listOfProductsPartial", operation._products)); }
public ActionResult Delete(int[] ids) { if (!SessionHelpers.IsAuthentificated()) { return(RedirectToAction("Login", "Authorize")); } DeleteProductsOperation op = new DeleteProductsOperation(ids); op.ExcecuteTransaction(); var operation = new LoadAllProductsOperation(); operation.ExcecuteTransaction(); return(PartialView("Partial/_listOfProductsPartial", operation._products)); }
public ActionResult Index() { var op = new LoadAllDoctorsOperation(); op.ExcecuteTransaction(); ViewBag.Doctors = op._doctors; var op2 = new LoadAllProductsOperation(); op2.ExcecuteTransaction(); ViewBag.Products = op2._products; var op3 = new LoadCommentsOperation(1, 4); op3.ExcecuteTransaction(); ViewBag.Comments = op3._comments; ViewBag.NavMenuEnabled = true; return(View(/*op._pageDescription*/)); }
// GET: Cabinet/Menu/List public ActionResult List() { if (!SessionHelpers.IsAuthentificated()) { return(RedirectToAction("Login", "Authorize")); } var operation = new LoadCategoriesOperation(); operation.ExcecuteTransaction(); var operation2 = new LoadAllProductsOperation(0); operation2.ExcecuteTransaction(); return(View(new MenuListModel { Categories = operation._categories, Products = operation2._products })); }
public ActionResult Service(int id) { if (id <= 0) { return(HttpNotFound()); } var op = new LoadAllProductsOperation(); op.ExcecuteTransaction(); ViewBag.NavMenuEnabled = false; var service = op._products.FirstOrDefault(x => x.Id == id); if (service == null) { return(HttpNotFound()); } return(RedirectToRoute(service.Tag)); }
public ActionResult ServiceName(string serviceName) { if (string.IsNullOrEmpty(serviceName)) { return(HttpNotFound()); } var op = new LoadAllProductsOperation(); op.ExcecuteTransaction(); ViewBag.NavMenuEnabled = false; var service = op._products.FirstOrDefault(x => x.Tag == serviceName.ToLower()); if (service == null) { return(HttpNotFound()); } ViewBag.Selected = service; return(View("Service", op._products)); }