public bool Add(string Name, string ShopArea, string UserId, string Image, string Notes, string Status, string MobileNumber, int MaxOrderCount) { bool Result = false; try { string Id = Guid.NewGuid().ToString(); Result = _shopData.Add(Id, Name, ShopArea, Image, Notes, Status, MobileNumber, MaxOrderCount); if (Result) { DeleteUserConnectorByShopId(Id); if (Result) { Result = AddUserConnector(Id, UserId); } Utilities.Slider _sliderData = new Utilities.Slider(); Result = _sliderData.Add("Slider One", Id); Result = _sliderData.Add("Slider Two", Id); } } catch (Exception) { } return(Result); }
// GET: Slider public ActionResult SliderSettings() { if (Session["UserId"] == null) { return(RedirectToAction("Login", "Account")); } Utilities.Slider sliderUtility = new Utilities.Slider(); var Images = sliderUtility.GetAllImages(); Models.ImageAdditionalInfo imageAdditionalInfo = new Models.ImageAdditionalInfo(); imageAdditionalInfo.HighQualityImage = Images.Where(x => x.Type.ToLower() == "high").ToList(); imageAdditionalInfo.LowQualityImage = Images.Where(x => x.Type.ToLower() == "low").ToList(); imageAdditionalInfo.MediumQualityImage = Images.Where(x => x.Type.ToLower() == "medium").ToList(); return(View(imageAdditionalInfo)); }
public ActionResult Gallery() { if (Session["UserId"] == null) { return(RedirectToAction("Login", "Account")); } string QueryStringValue = Request.QueryString["action"]; ViewBag.Message = QueryStringValue; Utilities.Slider sliderUtility = new Utilities.Slider(); var Images = sliderUtility.GetAllImages(); Models.ImageAdditionalInfo imageAdditionalInfo = new Models.ImageAdditionalInfo(); imageAdditionalInfo.HighQualityImage = Images.Where(x => x.Type.ToLower() == "high").ToList(); imageAdditionalInfo.LowQualityImage = Images.Where(x => x.Type.ToLower() == "low").ToList(); imageAdditionalInfo.MediumQualityImage = Images.Where(x => x.Type.ToLower() == "medium").ToList(); return(View(imageAdditionalInfo)); }
public bool Add(string Name, string EmailId, string Password, string Image, string Status, string Area, string Notes, string MobileNumber, int IsAdmin) { bool Result = false; try { string Id = Guid.NewGuid().ToString(); Result = _userData.AddUser(Id, Name, EmailId, Password, Image, Status, Area, Notes, MobileNumber, IsAdmin); if (IsAdmin == 2) { Utilities.Slider _sliderData = new Utilities.Slider(); Result = _sliderData.Add("Slider One", Id); Result = _sliderData.Add("Slider Two", Id); } } catch (Exception) { } return(Result); }
// GET: Dashboard public ActionResult Dashboard() { if (Session["UserId"] == null) { return(RedirectToAction("Login", "Account")); } string ShopId = ""; if (Session["IsAdmin"].ToString() == "0") { ShopId = Session["ShopId"].ToString(); } else if (Session["IsAdmin"].ToString() == "2") { ShopId = Session["UserId"].ToString(); } Utilities.Slider _sliderUtility = new Utilities.Slider(); List <Models.Slider> sliderslist = _sliderUtility.GetSliderInfoByShopId(ShopId); return(View(sliderslist)); }