public ActionResult Add_Page4(int SubId) { string SSSession = ""; CheckAccess check = new CheckAccess(SSSession); if (check.HasAccess) { ModelFiller MF = new ModelFiller(); AddProductModelV_4 model = new AddProductModelV_4() { MainTags = MF.MainTagsModel_Filler(), OffTypes = MF.OffTypeModel_Filler(), PriceShow = MF.PriceShowModel_Filler(), PriceType = MF.MoneyTypeModel_Filler(), QuantityTypes = MF.PQTModel_Filler(), Tags = MF.TagsModel_Filler(SubId) }; return(View(model)); } else { return(RedirectToAction("NotAccess", "MS")); } }
public ActionResult ProductSaleList(string Gp = "همه", int Id = 0) { string SSSession = ""; if (HttpContext.Request.Cookies["TSHPANDAControll" + StaticLicense.LicName] != null) { HttpCookie cookie = HttpContext.Request.Cookies.Get("TSHPANDAControll" + StaticLicense.LicName); if (cookie != null) { SSSession = cookie.Value; } else { SSSession = "N.A"; } } else { SSSession = "N.A"; } CheckAccess check = new CheckAccess(SSSession); if (check.HasAccess) { ModelFiller MF = new ModelFiller(); return(View(MF.Pro_SaleList(Gp, Id))); } else { return(RedirectToAction("NotAccess", "MS")); } }
public ActionResult Add_Update_AdminType(string ActToDo, string Ad_Name, string Routes, int id = 0) { string SSSession = ""; if (HttpContext.Request.Cookies["TSHPANDAControll" + StaticLicense.LicName] != null) { HttpCookie cookie = HttpContext.Request.Cookies.Get("TSHPANDAControll" + StaticLicense.LicName); if (cookie != null) { SSSession = cookie.Value; } else { SSSession = "N.A"; } } else { SSSession = "N.A"; } CheckAccess check = new CheckAccess(SSSession); if (check.HasAccess) { ModelFiller MF = new ModelFiller(); return(Content(MF.Add_Update_AdType_(ActToDo, Ad_Name, Routes, id))); } else { return(RedirectToAction("NotAccess", "MS")); } }
public ActionResult AdminTbl() { string SSSession = ""; if (HttpContext.Request.Cookies["TSHPANDAControll" + StaticLicense.LicName] != null) { HttpCookie cookie = HttpContext.Request.Cookies.Get("TSHPANDAControll" + StaticLicense.LicName); if (cookie != null) { SSSession = cookie.Value; } else { SSSession = "N.A"; } } else { SSSession = "N.A"; } CheckAccess check = new CheckAccess(SSSession); if (check.HasAccess) { ModelFiller MF = new ModelFiller(); return(View(MF.AdminTypeTbl())); } else { return(RedirectToAction("NotAccess", "MS")); } }
public ActionResult getSearch(string st) { ModelFiller MF = new ModelFiller(); ListToModel LM = new ListToModel(); LM.search = MF.Search_filler(st); var models = LM; return(View(models)); }
public ActionResult show_user() { PDBC db = new PDBC("PandaMarketCMS", true); var id_Admin = Session["id_Admin1"]; string ad_typeID = " "; db.Connect(); using (DataTable dt = db.Select($"SELECT [id_Admin],[ad_typeID],[ad_typeID],[ad_password],[ad_firstname],[ad_lastname],[ad_avatarprofile],[ad_email],[ad_phone],[ad_mobile],[ad_NickName],[ad_personalColorHexa] FROM [dbo].[tbl_ADMIN_main] where [id_Admin] ={id_Admin.ToString()}")) { Session["pass"] = dt.Rows[0]["ad_password"].ToString(); ad_typeID = dt.Rows[0]["ad_typeID"].ToString(); ModelFiller MF = new ModelFiller(); profile data_pro = new profile() { ad_avatarprofile = MF.AppendServername(dt.Rows[0]["ad_avatarprofile"].ToString()), ad_type_name = dt.Rows[0]["ad_typeID"].ToString(), ad_firstname = dt.Rows[0]["ad_firstname"].ToString(), ad_lastname = dt.Rows[0]["ad_lastname"].ToString(), ad_NickName = dt.Rows[0]["ad_NickName"].ToString(), ad_phone = dt.Rows[0]["ad_phone"].ToString(), ad_mobile = dt.Rows[0]["ad_mobile"].ToString(), ad_email = dt.Rows[0]["ad_email"].ToString(), ad_personalColorHexa = dt.Rows[0]["ad_personalColorHexa"].ToString(), ad_Types = MF.AdminTypes() }; ViewBag.Show_Pro = data_pro; } using (DataTable dt = db.Select($"SELECT [ad_typeID],[rulerouteID],(SELECT [ruleRouteURL]FROM [PandaMarketCMS].[dbo].[tbl_ADMIN_ruleRoutes_Main]where [rulerouteID]=[PandaMarketCMS].[dbo].[tbl_ADMIN_types_ruleRoute_Connection].[rulerouteID])as[ruleRouteURL],[HasAccess]FROM [PandaMarketCMS].[dbo].[tbl_ADMIN_types_ruleRoute_Connection] where [ad_typeID] ={ad_typeID}")) { for (int i = 0; i < dt.Rows.Count; i++) { data_ADMIN = new ADMIN_types_ruleRoute_Connection(); data_ADMIN.ad_typeID = dt.Rows[i]["ad_typeID"].ToString(); data_ADMIN.HasAccess = dt.Rows[i]["HasAccess"].ToString(); data_ADMIN.rulerouteID = dt.Rows[i]["rulerouteID"].ToString(); data_ADMIN.ruleRouteURL = dt.Rows[i]["ruleRouteURL"].ToString(); list_ADMIN.Add(data_ADMIN); } ViewBag.Show_ADMIN = list_ADMIN; } db.DC(); return(View()); }
public ActionResult News_Details(int id_news, string category, string title, int pre, int next) { ModelFiller MF = new ModelFiller(); NewsDetails_ModelView modelView = new NewsDetails_ModelView() { NewsModel = MF.NewsModel_Detail_filler(id_news, pre, next), LatestNewsModels = MF.LatestNewsModels_filler(), popular = MF.Popular_filler(), CategoryModels = MF.CategoryModels_filler() }; return(View(modelView)); }
public ActionResult ShowAdmins() { //string SSSession = ""; if (HttpContext.Request.Cookies["TSHPANDAControll"] != null) { HttpCookie cookie = HttpContext.Request.Cookies.Get("TSHPANDAControll"); if (cookie != null) { SSSession = cookie.Value; } else { SSSession = "N.A"; } } else { SSSession = "N.A"; } //CheckAccess check = new CheckAccess(SSSession); //if (check.HasAccess) //{ ModelFiller MF = new ModelFiller(); return(View(MF.Admins())); //} //else // return RedirectToAction("NotAccess", "MS"); }
public ActionResult Save_Step2(string Type, string Main, string Sub, string SubKey, int id) { string SSSession = ""; CheckAccess check = new CheckAccess(SSSession); if (check.HasAccess) { ModelFiller MF = new ModelFiller(); return(Content(MF.Product_Action_Step2(Type, Main, Sub, SubKey, id))); } else { return(RedirectToAction("NotAccess", "MS")); } }
public ActionResult TagsTable(int id) { string SSSession = ""; CheckAccess check = new CheckAccess(SSSession); if (check.HasAccess) { ModelFiller MF = new ModelFiller(); return(View(MF.Tags(id))); } else { return(RedirectToAction("NotAccess", "MS")); } }
public ActionResult Add_Update_AdminType(string ActToDo, string Ad_Name, string Routes, int id = 0) { string SSSession = ""; CheckAccess check = new CheckAccess(SSSession); if (check.HasAccess) { ModelFiller MF = new ModelFiller(); return(Content(MF.Add_Update_AdType_(ActToDo, Ad_Name, Routes, id))); } else { return(RedirectToAction("NotAccess", "MS")); } }
public ActionResult AdminTbl() { string SSSession = ""; CheckAccess check = new CheckAccess(SSSession); if (check.HasAccess) { ModelFiller MF = new ModelFiller(); return(View(MF.AdminTypeTbl())); } else { return(RedirectToAction("NotAccess", "MS")); } }
public ActionResult ModalTree(int id = 0) { string SSSession = ""; CheckAccess check = new CheckAccess(SSSession); if (check.HasAccess) { ModelFiller MF = new ModelFiller(); return(View(MF.Modal_admin_Type(id))); } else { return(RedirectToAction("NotAccess", "MS")); } }
public ActionResult Update_Product(int Id_Pro) { string SSSession = ""; CheckAccess check = new CheckAccess(SSSession); if (check.HasAccess) { ModelFiller MF = new ModelFiller(); return(View(MF.UpdateProFiller(Id_Pro))); } else { return(RedirectToAction("NotAccess", "MS")); } }
public ActionResult Product_table(bool SearchBox, string text = "") { //var itemList = new ProductModel() //{ // deleted = false, // disabled = true, // Category = "محصولات دیجیتال-موبایل-سامسونگ گلکسی s8", // MainPrice = "12000000", // Description = "گوشی خوبیه", // AddBy = "niky", // PicPath = "https://localhost:44395/assets/download.jpg", // Date = "1398/12/4", // Title = "galaxy s8", // Id = 1, // Num = 1 //}; ModelFiller MF = new ModelFiller(); string query = ""; if (SearchBox) { query = MF.QueryMaker(true, text); } else { query = MF.QueryMaker(false); } var Model = new ProductListModelView() { ProductModels = MF.productModels_List(query) }; //var list=new List<ProductModel>(); //list.Add(itemList); //list.Add(itemList); //list.Add(itemList); //var Model = new ProductListModelView() //{ // ProductModels = list //}; return(View(Model)); }
public ActionResult DropListFiller(string drop, int id = 0) { string SSSession = ""; CheckAccess check = new CheckAccess(SSSession); if (check.HasAccess) { ModelFiller MF = new ModelFiller(); var model = MF.DropFiller(drop, id); return(Json(model)); //return Content("hello"); } else { return(RedirectToAction("NotAccess", "MS")); } }
public ActionResult Options_Table(int id) { string SSSession = ""; CheckAccess check = new CheckAccess(SSSession); if (check.HasAccess) { ModelFiller MF = new ModelFiller(); var res = MF.OptionsFiller(id); return(View(res)); } else { return(RedirectToAction("NotAccess", "MS")); } }
public ActionResult AddTag() { string SSSession = ""; CheckAccess check = new CheckAccess(SSSession); if (check.HasAccess) { ModelFiller MF = new ModelFiller(); AddProductModelV_2 model = new AddProductModelV_2() { Types = MF.DropFiller("Type") }; return(View(model)); } else { return(RedirectToAction("NotAccess", "MS")); } }
public ActionResult Product_table(bool SearchBox, string text = "") { string SSSession = ""; CheckAccess check = new CheckAccess(SSSession); if (check.HasAccess) { ModelFiller MF = new ModelFiller(); string query = ""; if (SearchBox) { query = MF.QueryMaker(true, text); } else { query = MF.QueryMaker(false); } var Model = new ProductListModelView() { ProductModels = MF.productModels_List(query) }; //var list=new List<ProductModel>(); //list.Add(itemList); //list.Add(itemList); //list.Add(itemList); //var Model = new ProductListModelView() //{ // ProductModels = list //}; return(View(Model)); } else { return(RedirectToAction("NotAccess", "MS")); } }
public ActionResult Add_Page5(int id, int SubId) { string SSSession = ""; CheckAccess check = new CheckAccess(SSSession); if (check.HasAccess) { ModelFiller MF = new ModelFiller(); List <AddProductModelV_5> result = new List <AddProductModelV_5>(); var pricingItm = MF.pricingModelfiller(id); var MainTags = MF.MainTagsModel_Filler(); var OffTypes = MF.OffTypeModel_Filler(); var PriceShow = MF.PriceShowModel_Filler(); var PriceType = MF.MoneyTypeModel_Filler(); var QuantityTypes = MF.PQTModel_Filler(); var Tags = MF.TagsModel_Filler(SubId); foreach (var item in pricingItm) { var model = new AddProductModelV_5() { MainTags = MainTags, OffTypes = OffTypes, PriceShow = PriceShow, PriceType = PriceType, QuantityTypes = QuantityTypes, Tags = Tags, pricingModel = item }; result.Add(model); } return(View(result)); } else { return(RedirectToAction("NotAccess", "MS")); } }
public ActionResult Add_Page3(string Ids, int id) { string SSSession = ""; CheckAccess check = new CheckAccess(SSSession); if (check.HasAccess) { ModelFiller MF = new ModelFiller(); PDBC db = new PDBC("PandaMarketCMS", true); db.Connect(); var ids = Ids.Split(','); var Subval = new List <AddPro_SubValues>(); for (int i = 0; i < ids.Length; i++) { var model = new AddPro_SubValues() { Id = Convert.ToInt32(ids[i]), Title = db.Select("SELECT[SCOKName]FROM [tbl_Product_SubCategoryOptionKey]where [id_SCOK]=" + ids[i]).Rows[0][0].ToString(), Item_List = MF.DropFiller("SubCat_Value", Convert.ToInt32(ids[i])) }; Subval.Add(model); } var result = new AddProductModelV_3() { Id = id, Item_List = Subval }; return(View(result)); } else { return(RedirectToAction("NotAccess", "MS")); } }
public ActionResult Save_Step1(string Act_ToDo, int id_CreatedByAdmin, string Title, string Description, string SEO_keyword, string SEO_description, string SearchGravity, int IsAd, string pics, int Mpro_id = 0) { string SSSession = ""; CheckAccess check = new CheckAccess(SSSession); if (check.HasAccess) { ModelFiller MF = new ModelFiller(); string itmId = MF.Product_Action_Step1(Act_ToDo, id_CreatedByAdmin, Title, Description, SEO_keyword, SEO_description, SearchGravity, IsAd, Mpro_id); PDBC db = new PDBC("PandaMarketCMS", true); db.Connect(); foreach (var item in pics.Split(',')) { db.Script("INSERT INTO [tbl_Product_PicConnector] VALUES (" + itmId + "," + item + ")"); } return(Content(itmId)); } else { return(RedirectToAction("NotAccess", "MS")); } }
public ActionResult News(string category, string tags, int pages) { PDBC db = new PDBC("DBConnectionString", true); db.Connect(); int num = 0; if (tags.Equals("همه")) { if (category.Equals("همه")) { num = Convert.ToInt32(db.Select("SELECT Count(*) FROM[Post_tbl]").Rows[0][0]); } else { num = Convert.ToInt32(db.Select("SELECT COUNT(*) FROM[Post_tbl] INNER JOIN [Categories_tbl] ON [Post_tbl].Id=[Categories_tbl].PostId AND [Categories_tbl].name LIKE N'" + category + "'").Rows[0][0]); } } else { num = Convert.ToInt32(db.Select("SELECT COUNT(*)FROM[Post_tbl] INNER JOIN [Tags_tbl] ON [Post_tbl].Id=[Tags_tbl].[PostId] AND [Tags_tbl].[Name] LIKE N'" + tags + "'").Rows[0][0]); } if (num % 5 == 0) { num = num / 5; } else { num = (num / 5) + 1; } List <int> p = new List <int>(); if (pages != 1) { for (int i = pages - 1; i <= num - (pages - 2); i++) { p.Add(i); } } else { for (int i = 1; i <= num; i++) { p.Add(i); } } ModelFiller MF = new ModelFiller(); var News = MF.News_withQuery_filler(category, tags, pages, num); var newsModelView = new NewsModelView() { NewsModels = News, LatestNewsModels = MF.LatestNewsModels_filler(), popular = MF.Popular_filler(), CategoryModels = MF.CategoryModels_filler(), AllTags = MF.AllTagsFiller(News), pages = new PageSeparateModel() { category = category, Tags = tags, pages = p, CurrentPage = pages } }; return(View(newsModelView)); }
public ActionResult Save_Step4(string json, string ActTodo, int id_MProduct, int Quantity, int QuantityModule, int PricePerquantity, int PriceOff, int offTypeValue, int OffType, int id_MainStarTag, int PriceModule, int PriceShow, string tgs) { string SSSession = ""; CheckAccess check = new CheckAccess(SSSession); if (check.HasAccess) { int PriceXquantity = Quantity * PricePerquantity; ModelFiller MF = new ModelFiller(); PDBC db = new PDBC("PandaMarketCMS", true); db.Connect(); if (ActTodo == "insert") { JaygashtClass jaygashtClass = new JaygashtClass(); var jaygashts = jaygashtClass.Result(json); string itemid = "0"; foreach (var item in jaygashts) { itemid = MF.MainProduct_Actions(ActTodo, id_MProduct, Quantity, QuantityModule, PriceXquantity, PricePerquantity, PriceOff, offTypeValue, OffType, id_MainStarTag, PriceModule, PriceShow); foreach (var itm in item) { db.Script("INSERT INTO[tbl_Product_connectorToMPC_SCOV] VALUES(" + itemid + "," + itm.ValId + ")"); } //string[] str = tgs.Split(','); //for (int i = 0; i < str.Length; i++) //{ // // db.Script("INSERT INTO [tbl_Product_tagConnector] VALUES(" + itemid + "," + str[i] + ")"); // //} } } else if (ActTodo == "update") { MF.MainProduct_Actions(ActTodo, id_MProduct, Quantity, QuantityModule, PriceXquantity, PricePerquantity, PriceOff, offTypeValue, OffType, id_MainStarTag, PriceModule, PriceShow); //string[] str = tgs.Split(','); //for (int i = 0; i < str.Length; i++) //{ // // db.Script("DELETE FROM [tbl_Product_tagConnector] WHERE id_MPC=" + id_MProduct); // db.Script("INSERT INTO [tbl_Product_tagConnector] VALUES(" + id_MProduct + "," + str[i] + ")"); // //} } return(Content("Success")); } else { return(RedirectToAction("NotAccess", "MS")); } }