public JsonResult GetProductList(string bsGnd = "", string brand = "", string sidx = "ProductName", string sord = "asc", int rows = 3, int page = 1) { try { var currentShopId = BSSecurityEncryption.Decrypt(bsGnd, WebAppConfig.GetConfigValue("BSGnd")); var param = new List <KeyValuePair <string, string> > { new KeyValuePair <string, string>("shopId", currentShopId), new KeyValuePair <string, string>("sortColumnName", sidx), new KeyValuePair <string, string>("sortOrder", sord), new KeyValuePair <string, string>("pageSize", Convert.ToString(rows)), new KeyValuePair <string, string>("currentPage", Convert.ToString(page)), new KeyValuePair <string, string>("brand", Convert.ToString(brand)) }; var data = new CommonAjaxCallToWebAPI().AjaxGet(@"/api/product/GetProductList", param, Convert.ToString(Session["BSWebApiToken"])); // return Json(data, JsonRequestBehavior.AllowGet); var jqGridData = new JqGridType() { Data = data, Page = "1", PageSize = "3", // u can change this ! SortColumn = "1", SortOrder = "asc" }; return(Json(jqGridData, JsonRequestBehavior.AllowGet)); } catch { return(null); } }
public ActionResult ViewProducts() { var shopId = GetCurrentShopId(); ViewData["SpGnd"] = BSSecurityEncryption.Encrypt(Convert.ToString(shopId), WebAppConfig.GetConfigValue("BSGnd")); FillViewDatasForAddShop(); // return View(@"../shop/addshop"); return(View()); }
public JsonResult GetProductList(string prodName = "", string brandName = "", string barCode = "", string productType = "", string isAvailable = "true", string availableQty = "", string isActive = "true", string prodCategory = "", string prodSubType = "", string prodMrp = "", string prodShopPrice = "", string bsGnd = "", string sidx = "ProductName", string sord = "asc", int rows = 3, int page = 1) { try { var currentShopId = BSSecurityEncryption.Decrypt(bsGnd, WebAppConfig.GetConfigValue("BSGnd")); var param = new List <KeyValuePair <string, string> > { new KeyValuePair <string, string>("prodName", prodName), new KeyValuePair <string, string>("brandName", brandName), new KeyValuePair <string, string>("barCode", barCode), new KeyValuePair <string, string>("productType", productType), new KeyValuePair <string, string>("isAvailable", isAvailable), new KeyValuePair <string, string>("availableQty", availableQty), new KeyValuePair <string, string>("isActive", isActive), new KeyValuePair <string, string>("prodCategory", prodCategory), new KeyValuePair <string, string>("prodSubType", prodSubType), new KeyValuePair <string, string>("prodMrp", prodMrp), new KeyValuePair <string, string>("prodShopPrice", prodShopPrice), new KeyValuePair <string, string>("shopId", currentShopId), new KeyValuePair <string, string>("sortColumnName", sidx), new KeyValuePair <string, string>("sortOrder", sord), new KeyValuePair <string, string>("pageSize", Convert.ToString(rows)), new KeyValuePair <string, string>("currentPage", Convert.ToString(page)), }; var data = new CommonAjaxCallToWebAPI().AjaxGet(@"/api/product/GetProductListView", param , Convert.ToString(Session["BSWebApiToken"])); // return Json(data, JsonRequestBehavior.AllowGet); var jqGridData = new JqGridType() { Data = data, Page = "1", PageSize = "3", // u can change this ! SortColumn = "1", SortOrder = "asc" }; return(Json(jqGridData, JsonRequestBehavior.AllowGet)); } catch { return(null); } }
private void FillViewDatasForAddShopOffers() { var shopId = GetCurrentShopId(); Dictionary <string, List <SelectListItem> > selectListData = new Dictionary <string, List <SelectListItem> >(); var brandList = GetShopBrandList(shopId); selectListData.Add("ShopBrandList", brandList); ViewData["SelectListData"] = selectListData; ViewData["SpGnd"] = BSSecurityEncryption.Encrypt(Convert.ToString(shopId), WebAppConfig.GetConfigValue("BSGnd")); }
public JsonResult GetOffersList(string offerShortDetails = "", string offerStartDate = "", string offerEndDate = "", string offerOnBrand = "", string isOfferOnProduct = null, string isActive = null, string bsGnd = "", string sord = "asc", int rows = 3, int page = 1, string sidx = "OfferID") { try { var currentShopId = BSSecurityEncryption.Decrypt(bsGnd, WebAppConfig.GetConfigValue("BSGnd")); var param = new List <KeyValuePair <string, string> > { new KeyValuePair <string, string>("offerShortDetails", offerShortDetails), new KeyValuePair <string, string>("offerStartDate", offerStartDate), new KeyValuePair <string, string>("offerEndDate", offerEndDate), new KeyValuePair <string, string>("offerOnBrand", offerOnBrand), new KeyValuePair <string, string>("isOfferOnProduct", isOfferOnProduct), new KeyValuePair <string, string>("isActive", isActive), new KeyValuePair <string, string>("shopId", currentShopId), new KeyValuePair <string, string>("sortColumnName", sidx), new KeyValuePair <string, string>("sortOrder", sord), new KeyValuePair <string, string>("pageSize", Convert.ToString(rows)), new KeyValuePair <string, string>("currentPage", Convert.ToString(page)), }; var data = new CommonAjaxCallToWebAPI().AjaxGet(@"api/shopoffers/GetShopOffersListView", param , Convert.ToString(Session["BSWebApiToken"])); // return Json(data, JsonRequestBehavior.AllowGet); var jqGridData = new JqGridType() { Data = data, Page = "1", PageSize = "3", // u can change this ! SortColumn = "1", SortOrder = "asc" }; return(Json(jqGridData, JsonRequestBehavior.AllowGet)); } catch { return(null); } }