// GET: Cabinet/menu/List public ActionResult Detail(int id) { if (!SessionHelpers.IsAuthentificated()) { return(RedirectToAction("Login", "Authorize")); } if (id < 1) { return(HttpNotFound()); } var operation = new LoadCategoriesOperation(); operation.ExcecuteTransaction(); var operation2 = new LoadProductOperation(id); operation2.ExcecuteTransaction(); if (operation2._product == null) { return(HttpNotFound()); } ViewBag.IsSave = false; return(View(new ProductModel { Categories = operation._categories, Product = operation2._product })); }
public ActionResult Login() { if (SessionHelpers.IsAuthentificated()) { return(RedirectToAction("Index", "Main")); } return(View(new LoginModel())); }
public ActionResult Login() { if (SessionHelpers.IsAuthentificated()) { return(RedirectToAction("List", "Service")); } return(View(new LoginModel())); }
// GET: Cabinet/Page/List public ActionResult List() { if (!SessionHelpers.IsAuthentificated()) { return(RedirectToAction("Login", "Authorize")); } return(View()); }
// GET: Cabinet/Game/List public ActionResult List() { if (!SessionHelpers.IsAuthentificated()) { return(RedirectToAction("Login", "Authorize")); } var operation = new LoadGamesOperation(); operation.ExcecuteTransaction(); return(View(operation._games)); }
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 Add(Doctor model, HttpPostedFileBase image) { if (!SessionHelpers.IsAuthentificated()) { return(RedirectToAction("Login", "Authorize")); } AddDoctorOperation op = new AddDoctorOperation(model, image); op.ExcecuteTransaction(); return(RedirectToAction("List")); }
// GET: Cabinet/Menu/List public ActionResult List() { if (!SessionHelpers.IsAuthentificated()) { return(RedirectToAction("Login", "Authorize")); } var operation = new LoadCommentsOperation(1, ConstV.ItemsPerPageAdmin, true); operation.ExcecuteTransaction(); ViewBag.Comments = operation._comments; return(View()); }
public ActionResult ChangeState(int Id, bool IsModerated) { if (!SessionHelpers.IsAuthentificated()) { return(RedirectToAction("Login", "Authorize")); } var op = new EditCommentsOperation(Id, IsModerated); op.ExcecuteTransaction(); return(Json("success")); }
public ActionResult Add() { if (!SessionHelpers.IsAuthentificated()) { return(RedirectToAction("Login", "Authorize")); } ViewBag.IsSave = false; var operation = new LoadCategoriesOperation(); operation.ExcecuteTransaction(); return(View(operation._categories)); }
public ActionResult Delete(int[] ids) { if (!SessionHelpers.IsAuthentificated()) { return(RedirectToAction("Login", "Authorize")); } DeleteDoctorsOperation op = new DeleteDoctorsOperation(ids); op.ExcecuteTransaction(); var operation = new LoadAllDoctorsOperation(); operation.ExcecuteTransaction(); return(PartialView("Partial/_listOfDoctorsPartial", operation._doctors)); }
public ActionResult Detail(Comment model, HttpPostedFileBase image) { if (!SessionHelpers.IsAuthentificated()) { return(RedirectToAction("Login", "Authorize")); } var op = new UpdateCommentOperation(model, image); op.ExcecuteTransaction(); if (op._comment == null) { return(HttpNotFound()); } return(View(op._comment)); }
public ActionResult Delete(ImageDeleteModel image) { if (!SessionHelpers.IsAuthentificated()) { return(RedirectToAction("Login", "Authorize")); } if (image.Id < 1) { return(HttpNotFound()); } var operation = new DeleteImageOperation(image.Id); operation.ExcecuteTransaction(); return(Json(new { IsSuccess = operation.Success })); }
public ActionResult Delete(int[] ids) { if (!SessionHelpers.IsAuthentificated()) { return(RedirectToAction("Login", "Authorize")); } var op = new DeleteCommentsOperation(ids); op.ExcecuteTransaction(); var operation = new LoadCommentsOperation(1, ConstV.ItemsPerPageAdmin, true); operation.ExcecuteTransaction(); return(PartialView("Partial/_listOfCommentsPartial", operation._comments)); }
public ActionResult Detail(PageDescription model, HttpPostedFileBase[] images) { if (!SessionHelpers.IsAuthentificated()) { return(RedirectToAction("Login", "Authorize")); } UpdatePagesDescOperation op = new UpdatePagesDescOperation(model.Id, model.Description, model.Title, model.VideoURL, images); op.ExcecuteTransaction(); if (op._pageDescription == null) { return(HttpNotFound()); } 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 })); }
// GET: Cabinet/Main public ActionResult Index() { if (!SessionHelpers.IsAuthentificated()) { return(RedirectToAction("Login", "Authorize")); } var operation = new LoadPagesDescOperation("home", "index"); operation.ExcecuteTransaction(); if (operation._pageDescription == null) { return(HttpNotFound()); } return(View(operation._pageDescription)); }
public ActionResult Add(Product model, HttpPostedFileBase image) { if (!SessionHelpers.IsAuthentificated()) { return(RedirectToAction("Login", "Authorize")); } AddProductOperation op = new AddProductOperation(model.CategoryId, model.Description, model.Title, model.Price, model.IsHot, image); op.ExcecuteTransaction(); var operation = new LoadCategoriesOperation(); operation.ExcecuteTransaction(); ViewBag.IsSave = true; return(View(operation._categories)); }
public ActionResult Detail(Game model) { if (!SessionHelpers.IsAuthentificated()) { return(RedirectToAction("Login", "Authorize")); } var op = new UpdateGameOperation(model.Id, model.Name, model.Price, model.Description); op.ExcecuteTransaction(); if (op._game == null) { return(HttpNotFound()); } ViewBag.IsSave = true; return(View(new GameModel { Game = op._game })); }
public ActionResult Detail(int id) { if (!SessionHelpers.IsAuthentificated()) { return(RedirectToAction("Login", "Authorize")); } if (id < 1) { return(HttpNotFound()); } var operation2 = new LoadCommentOperation(id); operation2.ExcecuteTransaction(); if (operation2._comment == null) { return(HttpNotFound()); } return(View(operation2._comment)); }
public ActionResult Detail(Product model, HttpPostedFileBase image) { if (!SessionHelpers.IsAuthentificated()) { return(RedirectToAction("Login", "Authorize")); } UpdateProductOperation op = new UpdateProductOperation(model.Id, model.CategoryId, model.Description, model.Title, model.Price, model.IsHot, image); op.ExcecuteTransaction(); if (op._product == null) { return(HttpNotFound()); } var operation = new LoadCategoriesOperation(); operation.ExcecuteTransaction(); ViewBag.IsSave = true; return(View(new ProductModel { Categories = operation._categories, Product = op._product })); }
// GET: Cabinet/menu/List public ActionResult Detail(int id) { if (!SessionHelpers.IsAuthentificated()) { return(RedirectToAction("Login", "Authorize")); } if (id < 1) { return(HttpNotFound()); } var operation = new LoadGameOperation(id); operation.ExcecuteTransaction(); if (operation._game == null) { return(HttpNotFound()); } ViewBag.IsSave = false; return(View(new GameModel { Game = operation._game })); }