//public string AdditionalLinkClassIfActive(string path1ToCheck, string path2ToCheck) //{ // string url = Request.Url.AbsolutePath; // url = url.ToLower(); // path1ToCheck = path1ToCheck.ToLower(); // path2ToCheck = path2ToCheck.ToLower(); // if (url.IndexOf(path1ToCheck) > -0 && url.IndexOf(path2ToCheck) > -0) // { // return "class=\"active\""; // } // else // { return ""; } //} #region ----------------BuildStaticPagesLinks--------------- //---------------------------------------------------------- //BuildStaticPagesLinks //---------------------------------------------------------- public string BuildStaticPagesLinks() { ItemsModulesOptions SitePagesModule = ItemsModulesOptions.GetType((int)StandardItemsModuleTypes.SitePages); string links = ""; string folder = SitePagesModule.Identifire.ToString(); if (SitePagesModule.IsAvailabe && ZecurityManager.CheckFolderPermission("/AdminCP/Items/" + folder + "/")) { links += "<li " + AdditionalLinkClassIfActive("/AdminCP/Items/" + folder + "/") + "><a href=\"#\"><i class=\"icon-stack2\"></i><span>" + Resources.AdminText.StaticContents + "</span></a>"; links += "<ul>"; //------------------------------------------------------------------- SiteModulesManager siteModules = SiteModulesManager.Instance; foreach (SitePageOptions page in siteModules.SitePagesList) { if (page.IsAvailabe && page.AddInAdminMenuAutmaticly && !page.HasComments) { links += "<li " + AdditionalLinkClassIfActive("/Items/" + folder + "/StaticContents.aspx?id=" + page.PageID) + "><a href=\"/AdminCP/Items/" + folder + "/StaticContents.aspx?id=" + page.PageID + "\">" + page.Title + "</a></li>"; } } //------------------------------------------------------------------- links += "</ul>"; } return(links); }
//---------------------------------------------------------- public void AddCategories(ItemsModulesOptions ItemsModule, int ParentID, ModuleBaseTypes ModuleBaseType) { //------------------------------------------------------------- InitialCategory.ParentID = ParentID; InitialCategory.ModuleTypeID = ItemsModule.ModuleTypeID; //------------------------------------------------------------- for (int i = 0; i < 3; i++) { if (SiteSettings.Languages_HasArabicLanguages) { InitialCategory.Details[Languages.Ar] = InitialCategoryArDetails; } if (SiteSettings.Languages_HasEnglishLanguages) { InitialCategory.Details[Languages.En] = InitialCategoryEnDetails; } ExecuteCommandStatus status = ItemCategoriesFactory.Create(InitialCategory, ItemsModule); if (status == ExecuteCommandStatus.Done) { if (ModuleBaseType == ModuleBaseTypes.Items) { AddItems(ItemsModule, InitialCategory.CategoryID); } else if (ModuleBaseType == ModuleBaseTypes.Messages) { AddMessages(ItemsModule.ModuleTypeID, InitialCategory.CategoryID); } } } }
//-------------------------------------------------------- #endregion #region --------------EditCommand-------------- //--------------------------------------------------------- //EditCommand //--------------------------------------------------------- protected void EditCommand(DataGrid dg, Label lblResult, object source, DataGridCommandEventArgs e) { ImageButton lbtnUserActivation = (ImageButton)e.Item.FindControl("lbtnUserActivation"); int ModuleTypeID = (int)dg.DataKeys[e.Item.ItemIndex]; ItemsModulesOptions moduleOptions = ItemsModulesOptions.GetType(ModuleTypeID); SiteModulesManager sm = SiteModulesManager.Instance; if (moduleOptions.IsAvailabe) { //----------------------------------------------------------------------- moduleOptions.IsAvailabe = false; sm.SaveModule(moduleOptions); //----------------------------------------------------------------------- lblResult.CssClass = "operation_error"; lblResult.Text = "Êã ÅáÛÇÁ ÇáÊÝÚíá"; lbtnUserActivation.ImageUrl = "/Content/images/Boolean/false.gif"; } else { //----------------------------------------------------------------------- moduleOptions.IsAvailabe = true; sm.SaveModule(moduleOptions); //----------------------------------------------------------------------- lblResult.CssClass = "operation_done"; lblResult.Text = "Êã ÇáÊÝÚíá"; lbtnUserActivation.ImageUrl = "/Content/images/Boolean/True.gif"; } }
//----------------------------------------------- //Page_Load //----------------------------------------------- public void Page_Load(object sender, System.EventArgs e) { //------------------------------------------------- currentModule = ItemsModulesOptions.GetType(ModuleTypeID); siteUrls = DCSiteUrls.Instance; //------------------------------------------------- //Prepaare user control CatchControls(); Prepare(); //------------------------------------------------- lblResult.Text = ""; //--------------------------------------------------------- //Load Cart //--------------------------------------------------------- if (Session["Cart"] == null) { Session["Cart"] = new List <ItemsOrdersDetailsModel>(); } CartList = (List <ItemsOrdersDetailsModel>)Session["Cart"]; //--------------------------------------------------------- if (!IsPostBack) { LoadData(); } }
//----------------------------------------------- //Page_Load //----------------------------------------------- private void Page_Load(object sender, System.EventArgs e) { //----------------------------------------------- ItemsModulesOptions currentModule = (ItemsModulesOptions)HttpContext.Current.Items["CurrentItemsModule"]; MessagesModuleOptions CurrentMessagesModule = MessagesModuleOptions.GetType(currentModule.MessagesModuleID); //----------------------------------------------- int itemID = -1; if (MoversFW.Components.UrlManager.ChechIsValidIntegerParameter("id")) { itemID = Convert.ToInt32(Request.QueryString["id"]); } //----------------------------------------------- ucGetNew.ModuleTypeID = CurrentMessagesModule.ModuleTypeID; ucGetNew.ToItemID = itemID; //----------------------------------------------- if (!IsPostBack) { if (currentModule.HasSpecialAdminText) { this.Page.Title = currentModule.GetModuleAdminSpecialTitle() + " - " + DynamicResource.GetText(currentModule, "Module_NewMessage"); } else { this.Page.Title = currentModule.GetModuleAdminSpecialTitle() + " - " + Resources.Modules.Module_NewMessage; } } //----------------------------------------------- }
//----------------------------------------------------------------- #region -----------------PopulateXmlNodeFromModule----------------- //----------------------------------------------------------------- //PopulateXmlNodeFromModule //----------------------------------------------------------------- private XmlElement PopulateXmlNodeFromModule(ItemsModulesOptions itemsModule, XmlElement node) { ItemsModulesOptions defaultModule = new ItemsModulesOptions(); /****************************************************/ Type myType = typeof(ItemsModulesOptions); PropertyInfo[] piT = myType.GetProperties(); object moduleValue; object defaultValue; foreach (PropertyInfo myPropInfo in piT) { if (myPropInfo.CanWrite) { moduleValue = myPropInfo.GetValue(itemsModule, null); defaultValue = myPropInfo.GetValue(defaultModule, null); if (moduleValue.ToString() != defaultValue.ToString()) { AddAttribute(node, myPropInfo.Name, moduleValue); } } } return(node); }
//---------------------------------------------------------- public void AddItems(ItemsModulesOptions itemsModule, int categoryID) { //------------------------------------------------------------- InitialItem.CategoryID = categoryID; InitialItem.ModuleTypeID = itemsModule.ModuleTypeID; //------------------------------------------------------------- for (int i = 0; i < 15; i++) { if (SiteSettings.Languages_HasArabicLanguages) { InitialItem.Details[Languages.Ar] = InitialItemArDetails; } if (SiteSettings.Languages_HasEnglishLanguages) { InitialItem.Details[Languages.En] = InitialItemEnDetails; } ExecuteCommandStatus status = ItemsFactory.Create(InitialItem, itemsModule); if (status == ExecuteCommandStatus.Done) { if (itemsModule.HasComments) { AddComments(itemsModule.ModuleTypeID, InitialItem.ItemID, ModuleBaseTypes.Items); } } } }
//----------------------------------------------- //Page_Load //----------------------------------------------- private void Page_Load(object sender, System.EventArgs e) { ItemsModulesOptions currentModule = (ItemsModulesOptions)HttpContext.Current.Items["CurrentItemsModule"]; MessagesModuleOptions CurrentMessagesModule = MessagesModuleOptions.GetType(currentModule.MessagesModuleID); ucUpdate.ModuleTypeID = CurrentMessagesModule.ModuleTypeID; ucUpdate.DefaultPagePath = "/AdminCP/Items/" + currentModule.Identifire + "/Messages/default.aspx"; //----------------------------------------------- int messageID = -1; if (MoversFW.Components.UrlManager.ChechIsValidIntegerParameter("id")) { messageID = Convert.ToInt32(Request.QueryString["id"]); } //----------------------------------------------- if (messageID > 0) { MessagesEntity msg = MessagesFactory.GetMessagesObject(messageID, UsersTypes.Admin, SitesHandler.GetOwnerIDAsGuid()); ucUpdate.DefaultPagePath += "?id=" + msg.ToItemID; } //----------------------------------------------- if (!IsPostBack) { if (currentModule.HasSpecialAdminText) { this.Page.Title = currentModule.GetModuleAdminSpecialTitle() + " - " + DynamicResource.GetText(currentModule, "Module_MessageData"); } else { this.Page.Title = currentModule.GetModuleAdminSpecialTitle() + " - " + Resources.Modules.Module_MessageData; } } //----------------------------------------------- }
//---------------------------------------------------------- #endregion #region ----------------BuildStaticPagesLinks--------------- //---------------------------------------------------------- //BuildStaticPagesLinks //---------------------------------------------------------- public string BuildStaticPagesLinks() { ItemsModulesOptions SitePagesModule = ItemsModulesOptions.GetType((int)StandardItemsModuleTypes.SitePages); string links = ""; string folder = SitePagesModule.Identifire.ToString(); if (SitePagesModule.IsAvailabe && ZecurityManager.CheckFolderPermission("/AdminCP/Items/" + folder + "/")) { links += "<tr><td class=\"menuheader expandable\">" + Resources.AdminText.StaticContents + "</td></tr>"; links += "<tr><td><ul class=\"categoryitems\">"; //------------------------------------------------------------------- SiteModulesManager siteModules = SiteModulesManager.Instance; foreach (SitePageOptions page in siteModules.SitePagesList) { if (page.IsAvailabe && page.AddInAdminMenuAutmaticly && !page.HasComments) { links += "<li><a href=\"/AdminCP/Items/" + folder + "/StaticContents.aspx?id=" + page.PageID + "\">" + page.Title + "</a></li>"; } } //------------------------------------------------------------------- links += "</ul></td></tr>"; } return(links); }
//----------------------------------------------- //Page_Load //----------------------------------------------- private void Page_Load(object sender, System.EventArgs e) { ItemsModulesOptions currentModule = (ItemsModulesOptions)HttpContext.Current.Items["CurrentItemsModule"]; ucEdit.ModuleTypeID = currentModule.ModuleTypeID; ucEdit.Identifire = currentModule.Identifire; ucEdit.BaseModuleType = ModuleBaseTypes.Items; if (!IsPostBack) { if (currentModule.ModuleTypeID != (int)ModuleTypes.StaticPages && currentModule.ModuleTypeID != (int)ModuleTypes.StaticContents) { this.Page.Title = currentModule.GetModuleAdminSpecialTitle() + " - " + Resources.Modules.Module_Comments; } else if (MoversFW.Components.UrlManager.ChechIsValidIntegerParameter("id")) { int pageid = Convert.ToInt32(Request.QueryString["id"]); SitePageOptions page = SitePageOptions.GetPage(pageid); this.Page.Title = page.Title + " - " + Resources.Modules.Module_Comments; } else { this.Page.Title = Resources.Modules.Module_Comments; } } }
//[OutputCache(Duration = int.MaxValue, VaryByParam = "*")] public ActionResult Details(int?id, string module) { //module ItemsModulesOptions currentModule = ItemsModulesOptions.GetType(module); if (id.HasValue) { ViewBag.Message = "Your application description page."; FrontItemsModel currentItem = FrontItemsController.GetItemObject(id.Value, SiteSettings.GetCurrentLanguage()); ViewData["CurrentItem"] = currentItem; ViewData["CurrentItemsModule"] = currentModule; ViewBag.CurrentModule = currentModule; NavigationManager.Instance.BuilDetailsPathesLinks(currentModule, currentItem); ViewBag.Title = NavigationManager.Instance.PageTitle; if (id.HasValue) { ViewBag.ActiveID = id.Value; } return(View("~/Views/" + module + "/details.cshtml", currentItem)); } else { return(HttpNotFound()); } }
/// <summary> /// Creates ItemCategories object by calling ItemCategories data provider create method. /// <example>[Example]bool status=ItemCategoriesFactory.Create(itemCategoriesObject);.</example> /// </summary> /// <param name="itemCategoriesObject">The ItemCategories object.</param> /// <returns>Status of create operation.</returns> public static ExecuteCommandStatus Create(ItemCategoriesEntity category, ItemsModulesOptions currentModule) { //Insert user name------------------------------------------ string username = ""; if (HttpContext.Current.User.Identity.IsAuthenticated) { username = HttpContext.Current.User.Identity.Name; category.InsertUserName = username; } //---------------------------------------------------------- ExecuteCommandStatus status = ItemCategoriesSqlDataPrvider.Instance.Create(category, currentModule); //------------------------------------- if (status == ExecuteCommandStatus.Done) { string folder = DCSiteUrls.GetPath_ItemCategoriesDirectory(category.OwnerName, category.ModuleTypeID, category.CategoryID); string folderPhysicalPath = DCServer.MapPath(folder); if (!Directory.Exists(folderPhysicalPath)) { string defaultFolder = DCSiteUrls.GetPath_DefaultCategoryFolder(); string defaultFolderPhysicalPath = DCServer.MapPath(defaultFolder); DirectoryInfo diSource = new DirectoryInfo(defaultFolderPhysicalPath); DirectoryInfo diTarget = new DirectoryInfo(folderPhysicalPath); DcDirectoryManager.CopyAll(diSource, diTarget); } } //------------------------------------- return(status); }
//---------------------------------------------------------------------------------------------------------- public static void AddProfilePageDetails(UsersDataEntity usersDataObject) { ItemsEntity page = new ItemsEntity(); page.ModuleTypeID = (int)ModuleTypes.UsersProfiles; page.OwnerID = usersDataObject.UserId; //----------------------------------------------------- //AddDetails //---------------------------- ItemsDetailsEntity itemDetailsObject; if (SiteSettings.Languages_HasArabicLanguages) { itemDetailsObject = new ItemsDetailsEntity(); itemDetailsObject.LangID = Languages.Ar; itemDetailsObject.Title = DynamicResource.GetText("Modules", "PageTitle_UserProfilePage"); itemDetailsObject.ExtraData.Add(""); page.Details[Languages.Ar] = itemDetailsObject; } if (SiteSettings.Languages_HasEnglishLanguages) { itemDetailsObject = new ItemsDetailsEntity(); itemDetailsObject.LangID = Languages.En; itemDetailsObject.Title = DynamicResource.GetText("Modules", "PageTitle_UserProfilePage"); itemDetailsObject.ExtraData.Add(""); page.Details[Languages.En] = itemDetailsObject; } //----------------------------------------------------- ItemsModulesOptions UsersProfilesModule = ItemsModulesOptions.GetType((int)ModuleTypes.UsersProfiles); ItemsFactory.Create(page, UsersProfilesModule); //----------------------------------------------------- usersDataObject.ProfilePageID = page.ItemID; }
//---------------------------------------------------------------------------------------------------------- public static int AddSubSitePageDetails(int PageNo, UsersDataEntity usersDataObject) { ItemsEntity page = new ItemsEntity(); page.ModuleTypeID = (int)ModuleTypes.SubSitePages; page.OwnerID = usersDataObject.UserId; //----------------------------------------------------- //AddDetails //---------------------------- ItemsDetailsEntity itemDetailsObject; if (SiteSettings.Languages_HasArabicLanguages) { itemDetailsObject = new ItemsDetailsEntity(); itemDetailsObject.LangID = Languages.Ar; itemDetailsObject.Title = DynamicResource.GetText("SubSites", "Page_" + PageNo); itemDetailsObject.ExtraData.Add(""); page.Details[Languages.Ar] = itemDetailsObject; } if (SiteSettings.Languages_HasEnglishLanguages) { itemDetailsObject = new ItemsDetailsEntity(); itemDetailsObject.LangID = Languages.En; itemDetailsObject.Title = DynamicResource.GetText("SubSites", "Page_" + PageNo); itemDetailsObject.ExtraData.Add(""); page.Details[Languages.En] = itemDetailsObject; } //----------------------------------------------------- ItemsModulesOptions subSitePagesModule = ItemsModulesOptions.GetType((int)ModuleTypes.SubSitePages); ItemsFactory.Create(page, subSitePagesModule); //----------------------------------------------------- return(page.ItemID); }
//------------------------------------------ #endregion #region ---------------Page_Load--------------- //----------------------------------------------- //Page_Load //----------------------------------------------- private void Page_Load(object sender, System.EventArgs e) { currentModule = ItemsModulesOptions.GetType(ModuleTypeID); PrepareValidation(); //------------------------------------------------------------------------ //New code for pages //------------------------------ if (currentModule.ModuleTypeID == (int)StandardItemsModuleTypes.SitePages || currentModule.ModuleTypeID == (int)StandardItemsModuleTypes.StaticContents) { if (ItemID <= 0 && MoversFW.Components.UrlManager.ChechIsValidIntegerParameter("id")) { ItemID = Convert.ToInt32(Request.QueryString["id"]); currentModule = SitePageOptions.GetPage(ItemID); } } //------------------------------------------------------------------------ if (!IsPostBack) { PrepareValidation(); //trTitle.Visible = ViewTitle; txtShortDescription.Attributes.Add("onfocus", "return ismaxlength(this,document.forms[0]." + txtSDLengthControler.ClientID + ")"); txtShortDescription.Attributes.Add("onkeyup", "return ismaxlength(this,document.forms[0]." + txtSDLengthControler.ClientID + ")"); LoadData(); } }
//---------------------------------------------------------- //UpdateTestingDataForStaticPages //---------------------------------------------------------- public void UpdateTestingDataForStaticPages() { ItemsModulesOptions SitePagesModule = ItemsModulesOptions.GetType((int)StandardItemsModuleTypes.SitePages); //------------------------------------------------------------- InitialItem.CategoryID = 0; InitialItem.ModuleTypeID = SitePagesModule.ModuleTypeID; //------------------------------------------------------------- foreach (SitePageOptions page in SiteModulesManager.Instance.SitePagesList) { if (page.IsAvailabe) { InitialItem.ItemID = page.PageID; if (SiteSettings.Languages_HasArabicLanguages) { InitialItem.Details[Languages.Ar] = InitialItemArDetails; } if (SiteSettings.Languages_HasEnglishLanguages) { InitialItem.Details[Languages.En] = InitialItemEnDetails; } ExecuteCommandStatus status = ItemsFactory.Update(InitialItem, SitePagesModule); if (status == ExecuteCommandStatus.Done) { if (page.HasComments) { AddComments(SitePagesModule.ModuleTypeID, page.PageID, ModuleBaseTypes.Items); } } } } }
protected void Page_Load(object sender, EventArgs e) { currentModule = ItemsModulesOptions.GetType(ModuleTypeID); if (!IsPostBack) { HandleOptionalControls(); LoadData(); } }
//----------------------------------------------- //Page_Load //----------------------------------------------- private void Page_Load(object sender, System.EventArgs e) { ItemsModulesOptions currentModule = (ItemsModulesOptions)HttpContext.Current.Items["CurrentItemsModule"]; ucUpdate1.ModuleTypeID = currentModule.ModuleTypeID; if (!IsPostBack) { this.Page.Title = currentModule.GetModuleAdminSpecialTitle() + " - " + Resources.Modules.Module_ItemsEdit; } }
//------------------------------------------ #endregion #region ---------------Page_Load--------------- //----------------------------------------------- //Page_Load //----------------------------------------------- private void Page_Load(object sender, System.EventArgs e) { currentModule = ItemsModulesOptions.GetType(ModuleTypeID); MLangsDetails1.ModuleTypeID = ModuleTypeID; lblResult.Text = ""; if (!IsPostBack) { PrepareValidation(); LoadData(); } }
public void BuilDetailsPathesLinks(ItemsModulesOptions currentModule, FrontItemsModel currentItem) { string homeText = (string)HttpContext.GetGlobalResourceObject("Modules", "_Home"); string moduleTitle = currentModule.GetModuleTitle(); this.AddLink(homeText, "/"); this.AddLink(moduleTitle, string.Format("/{0}/all", currentModule.Identifire)); this.AddLastTitle(currentItem.Title); this.PageTitle = currentItem.Title; this.TopHeader = moduleTitle; }
//----------------------------------------------- //Page_Load //----------------------------------------------- private void Page_Load(object sender, System.EventArgs e) { ItemsModulesOptions currentModule = (ItemsModulesOptions)HttpContext.Current.Items["CurrentItemsModule"]; ucSendSms.ModuleTypeID = currentModule.ModuleTypeID; ucSendSms.FormSmsTo = FormSMSToTypes.All; if (!IsPostBack) { this.Page.Title = currentModule.GetModuleAdminSpecialTitle() + " - " + Resources.AdminText.SendSms; } }
//----------------------------------------------- //Page_Load //----------------------------------------------- private void Page_Load(object sender, System.EventArgs e) { currentModule = ItemsModulesOptions.GetType(ModuleTypeID); MLangsDetails1.ModuleTypeID = ModuleTypeID; MLangsDetails1.TypeOfDetails = DetailsTypes.Category; lblResult.Text = ""; if (!IsPostBack) { LoadData(); } }
//----------------------------------------------- //Page_Load //----------------------------------------------- private void Page_Load(object sender, System.EventArgs e) { ItemsModulesOptions currentModule = (ItemsModulesOptions)HttpContext.Current.Items["CurrentItemsModule"]; MessagesModuleOptions CurrentMessagesModule = MessagesModuleOptions.GetType(currentModule.MessagesModuleID); ucExport.ModuleTypeID = CurrentMessagesModule.ModuleTypeID; if (!IsPostBack) { this.Page.Title = CurrentMessagesModule.GetModuleTitle() + " - " + DynamicResource.GetMessageModuleText(CurrentMessagesModule, "Module_ExportData"); } }
//-------------------------------------------------------------------------------- #endregion #region --------------------------InisializeItemModulesMetaTags---------------------------- //---------------------------------------------------------------------------- //InisializeItemModulesMetaTags //---------------------------------------------------------------------------- public static void InisializeItemModulesMetaTags(ItemsModulesOptions currentModule) { DCMetaBuilder metaBuilder = DCMetaBuilder.Instance; string moduleTitle = currentModule.GetModuleTitle(); metaBuilder.Title = moduleTitle; metaBuilder.Section = currentModule.GetModuleTitle(); metaBuilder.Keywords = currentModule.ModuleMetaKeyWords; metaBuilder.Description = currentModule.ModuleMetaDescription; metaBuilder.GlobalLastModification = SiteSettings.Site_LastModification; }
public void BuilDefaultPathesLinks() { ItemsModulesOptions currentModule = (ItemsModulesOptions)HttpStore.Items["CurrentItemsModule"]; string homeText = (string)HttpContext.GetGlobalResourceObject("Modules", "_Home"); string moduleTitle = currentModule.GetModuleTitle(); this.AddLink(homeText, "/Default.aspx"); this.AddLastTitle(moduleTitle); this.PageTitle = moduleTitle; this.TopHeader = moduleTitle; }
//----------------------------------------------- //Page_Load //----------------------------------------------- private void Page_Load(object sender, System.EventArgs e) { ItemsModulesOptions currentModule = (ItemsModulesOptions)HttpContext.Current.Items["CurrentItemsModule"]; MessagesModuleOptions CurrentMessagesModule = MessagesModuleOptions.GetType(currentModule.MessagesModuleID); ucSendMail.ModuleTypeID = CurrentMessagesModule.ModuleTypeID; ucSendMail.FormMailTo = FormMailToTypes.All; if (!IsPostBack) { this.Page.Title = CurrentMessagesModule.GetModuleTitle() + " - " + Resources.AdminText.SendEmail; } }
//----------------------------------------------- //Page_Load //----------------------------------------------- private void Page_Load(object sender, System.EventArgs e) { ItemsModulesOptions currentModule = (ItemsModulesOptions)HttpContext.Current.Items["CurrentItemsModule"]; ucEdit.ModuleTypeID = currentModule.ModuleTypeID; ucEdit.Identifire = currentModule.Identifire; ucEdit.BaseModuleType = ModuleBaseTypes.Items; if (!IsPostBack) { this.Page.Title = currentModule.GetModuleAdminSpecialTitle() + " - " + Resources.Modules.Module_Comments; } }
//--------------------------------------------------------------------------------------------- public static string CreateItemsModuleLink(int ModuleTypeID) { if (ModuleTypeID < 500) { ItemsModulesOptions currentModule = ItemsModulesOptions.GetType(ModuleTypeID); return(string.Format(ItemsModuleLink, new string[] { currentModule.Identifire })); } else { return(SiteUrls.HomePage); } }
//----------------------------------------------------------------- public bool SaveModule(ItemsModulesOptions itemsModule) { XmlNodeList nodeList = XmlDoc.SelectNodes("/SiteItemsModules/Module[@ModuleTypeID='" + itemsModule.ModuleTypeID + "']"); if (nodeList.Count == 0) { return(AddModule(itemsModule)); } else { return(UpdateModule(itemsModule)); } }
//----------------------------------------------- //Page_Load //----------------------------------------------- private void Page_Load(object sender, System.EventArgs e) { ItemsModulesOptions currentModule = (ItemsModulesOptions)HttpContext.Current.Items["CurrentItemsModule"]; ucComments.ModuleTypeID = currentModule.ModuleTypeID; if (currentModule.HasSpecialAdminText) { this.Page.Title = currentModule.GetModuleAdminSpecialTitle() + " - " + DynamicResource.GetText(currentModule, "Module_CommentsInactive"); } else { this.Page.Title = currentModule.GetModuleAdminSpecialTitle() + " - " + Resources.Modules.Module_CommentsInactive; } }