public Shop() { Active = true; InStorePickUpEnabled = true; Kosher = true; IsShipEnabled = true; CreateTime = DateTime.Now; RadiusLatitude = 32.0677778m; RadiusLongitude = 34.7647222m; var settings = RP.GetAdminCurrentSettingsRepository(); if (settings != null) { this.CreditGuardMid = settings.CreditGuardMid; this.CreditGuardPass = settings.CreditGuardPass; this.CreditGuardTerminal = settings.CreditGuardTerminal; this.CreditGuardUrl = settings.CreditGuardUrl; this.CreditGuardUser = settings.CreditGuardUser; } if (PaymentMethodIDs == null) { PaymentMethodIDs = ",1,2,3,4,5,"; } }
public JsonpResult _TreeViewLoading(int?ID) { int parentId = (ID == null ? 0 : (int)ID); var pages = RP.GetAdminMenuRepository(); string domain = string.Empty; if (!HttpContext.Request.IsLocal && SF.UseMultiDomain()) { domain = "http://" + RP.GetAdminCurrentSettingsRepository().Domain; } IEnumerable nodes = pages.Where(r => r.ParentID == parentId) .Select(item => new { Text = item.Title, ID = item.ID.ToString(), hasChildren = (pages.Count(r2 => r2.ParentID == item.ID) > 0), imageUrl = domain + Url.Content(item.Image), Url = (string.IsNullOrEmpty(item.RedirectTo) ? (domain + item.Url) : item.RedirectTo), SpriteCssClass = "", expanded = (item.IsLangRoot), ReportsTo = parentId }); return(this.Jsonp(nodes)); }
public ActionResult Index(int?DomainPageID) { ViewBag.MessageRed = TempData["MessageRed"]; ViewBag.MessageYellow = TempData["MessageYellow"]; ViewBag.MessageGreen = TempData["MessageGreen"]; if (DomainPageID == 0 || DomainPageID == null) { DomainPageID = RP.GetAdminCurrentSettingsRepository().DomainPageID; } Settings s = _db.SettingsAll.FirstOrDefault(r => r.DomainPageID == DomainPageID); if (s != null) { return(View(s)); } else { s = new Settings(); s.DomainPageID = (int)DomainPageID; _db.SettingsAll.Add(s); _db.SaveChanges(); return(View(s)); } }
public OutEmail() { if (RP.GetAdminCurrentSettingsRepository() == null) { this.DomainID = 0; } else { this.DomainID = RP.GetAdminCurrentSettingsRepository().ID; } }
public static bool CheckAdminControlersPermissions(Type item) { List <string> RolesList = LS.CurrentUser.RolesList; if (RolesList.Contains("Admin")) { return(true); } else if (RolesList.Count() == 0) { return(false); } else if (RolesList.Count() == 1 && RolesList.Contains("Anonymous")) { return(false); } List <string> DomainRolesList = RP.GetAdminCurrentSettingsRepository().RolesList; List <string> SystemRolesList = RP.GetRolesReprository().Where(r => r.IsSystem).Select(r => r.Title).ToList(); foreach (string SystemRoles in SystemRolesList) { DomainRolesList.Remove(SystemRoles); } if (DomainRolesList.Intersect(RolesList).Count() == 0) { return(false); } List <string> MenuPermissionsList = new List <string>(); foreach (Role role in RP.GetRolesReprository().Where(r => RolesList.Contains(r.Title)).ToList()) { MenuPermissionsList.AddRange(role.MenuPermissionsList); } if (MenuPermissionsList.Contains(item.Name)) { return(true); } else { return(false); } }
public ActionResult _AjaxInsert([DataSourceRequest] DataSourceRequest request, NavigationData item) { if (ModelState.IsValid) { item.Segment = Request["Segment"]; item.DomainID = RP.GetAdminCurrentSettingsRepository().ID; if (string.IsNullOrEmpty(item.LangCode)) { item.LangCode = SF.GetLangCodeThreading(); } _db.NavigationDatas.Add(item); _db.SaveChanges(); RP.CleanNavigationDataRepository(AdminCurrentSettingsRepository.ID); } return(Json(new[] { item }.ToDataSourceResult(request, ModelState))); }
public ActionResult Index(string Segment) { ViewBag.MessageRed = TempData["MessageRed"]; ViewBag.MessageYellow = TempData["MessageYellow"]; ViewBag.MessageGreen = TempData["MessageGreen"]; if (string.IsNullOrEmpty(Segment)) { string NavigationSegments = RP.GetAdminCurrentSettingsRepository().NavigationSegments; if (NavigationSegments == null) { NavigationSegments = string.Empty; } List <String> l = NavigationSegments.Split(',').ToList(); if (l.Count != 0) { Segment = l.FirstOrDefault(); } } ViewBag.CurrentSegment = Segment; return(View()); }
public NavigationData() { this.DomainID = RP.GetAdminCurrentSettingsRepository().ID; this.Segment = "-"; this.LangCode = SF.GetLangCodeCurrentSettings(); }
public static void CleanMenuCache() { RP.CleanMenuRepository(RP.GetCurrentSettings().ID); RP.CleanMenuRepository(RP.GetAdminCurrentSettingsRepository().ID); }
public Newsletter() { this.DomainID = RP.GetAdminCurrentSettingsRepository().ID; }
public Contact() { this.DomainID = RP.GetAdminCurrentSettingsRepository().ID; }
public Error() { this.DomainID = RP.GetAdminCurrentSettingsRepository().ID; }
public TextComponent() { this.DomainID = RP.GetAdminCurrentSettingsRepository().ID; }