public ActionResult VishwaPressStore(int? Page,int? GenreID) { var model = new Product(); model.PagingRange = Constants.BookStorePagingRange; if (Page != null) { model.CurrentPage = Convert.ToInt32(Page); model.StartIndex = (Convert.ToInt32(Page) * Constants.BookStorePagingRange) - ((Constants.BookStorePagingRange) - 1); model.EndIndex = Convert.ToInt32(Page) * Constants.BookStorePagingRange; } else { model.CurrentPage = 1; model.StartIndex = 1; model.EndIndex = Constants.BookStorePagingRange; } model.LastPage = Convert.ToInt32(Math.Ceiling(Convert.ToDouble(BLObj.GetCountOfProductsForStore()) / Convert.ToDouble(8.00))); model.ListProduct = BLObj.GetProductsForStore(model.StartIndex, model.EndIndex,Convert.ToInt32(GenreID)); model.listGenres = LoadGenreDropDown(); if (Request.IsAjaxRequest()) { return PartialView("_WebgridVishwaPressStore",model); } return View(model); }
public ActionResult ProductMaster(FormCollection form) { var uploadedFile = Request.Files[0]; string fileName = uploadedFile.FileName; uploadedFile.SaveAs(Server.MapPath(Constants.BookImagePath) + "//" + fileName); var model = new Product(); model.ProductTitle = form["txtProductTitle"]; model.ProductInfo = form["txtDesc"]; model.AuthorName = form["txtAuthor"]; model.Price = form["txtPrice"]; model.Genre = form["ddlGenre"]; model.Language = form["ddlLang"]; model.Type = form["rbnBookType"]; model.ProductImage = fileName; BLObj.ProductsInsert(model); ViewBag.ClassName = "text-success bg-success"; ViewBag.ResultMessage = "Product added successfully.."; model.listGenres = LoadGenreDropDown(); model.listLang = LoadLanguageDropDown(); return View(model); }
public ActionResult ProductInfoNew(int? ProductID) { var model = new Product(); model.ListProduct = BLObj.GetProductInfoByProductID(Convert.ToInt32(ProductID)); return View(model); }
public ActionResult ProductMaster() { var model = new Product(); model.listGenres = LoadGenreDropDown(); model.listLang = LoadLanguageDropDown(); return View(model); }
public ActionResult Product() { var model = new Product(); model.ListProduct = BLObj.getProducts(); return View(model); }