public ActionResult productTypeCreate(ProductTypeViewModels data) { ProductTypeBussines.GetProductTypeResponse request = new ProductTypeBussines.GetProductTypeResponse() { ProductType = data.ProductType }; result = ProductTypeBussines.Insert.ProductType(request).Message; return(RedirectToAction("productTypeView", new { successful = true, ResultAction = "All Changes was successful" })); }
public ActionResult productTypeEdit(ProductTypeViewModels data) { if (ModelState.IsValid) { ProductTypeBussines.GetProductTypeResponse request = new ProductTypeBussines.GetProductTypeResponse() { ProductType = data.ProductType }; result = ProductTypeBussines.Update.ProductType(request).Message; } return(RedirectToAction("productTypeView", new { successful = true, ResultAction = "All Changes was successful" })); }
// GET: UserType #region Views public ActionResult productTypeView(bool successful = false, string ResultAction = "") { ViewBag.Title = "Produc Type"; ViewBag.successful = successful; ViewBag.Message = ResultAction; var BussinesData = ProductTypeBussines.Select.GetProductTypeList(); var model = new ProductTypeViewModels() { Error = BussinesData.Error, ProductTypeList = BussinesData.ProductTypeList }; return(View(model)); }
public ActionResult Index(int rootId = 0, int parentId = 0, int childId = 0) { ViewBag.ListRoot = ProductTypeService.GetListByType((int)ProductCategoryLevelEnum.Root, 0); ViewBag.ListParent = ProductTypeService.GetListByType((int)ProductCategoryLevelEnum.Parent, rootId); ViewBag.ListChild = ProductTypeService.GetListByType((int)ProductCategoryLevelEnum.Child, parentId); var data = ProductTypeService.GetList(rootId, parentId, childId); var model = new ProductTypeViewModels { RootId = rootId, ParentId = parentId, ChildId = childId, Data = data }; return(View("Index", model)); }
public ActionResult productTypeEdit(int id) { ViewBag.Title = "Update Product Type"; ViewBag.Message = ""; ProductTypeBussines.GetProductTypeRequest request = new ProductTypeBussines.GetProductTypeRequest() { ProductTypeID = id }; ProductType p = ProductTypeBussines.Select.GetProductType(request).ProductType; var model = new ProductTypeViewModels() { ProductType = p }; return(PartialView(model)); }