private void Control_Init() { if (!DataEval.IsEmptyQuery(_htmlid)) { if (_isshared) { Lib.HTMLMgr myHTMLMgr = new Lib.HTMLMgr(); Lib.HTML myHTML = myHTMLMgr.Get_HTML_Content(_contentid); tbx_TextContent.Text = myHTML.HTML_Content; } else { tbx_TextContent.Text = _html_content; } } else { if (_isshared) { Lib.HTMLMgr myHTMLMgr = new Lib.HTMLMgr(); Lib.HTML myHTML = myHTMLMgr.Get_HTML_Content(_contentid); tbx_TextContent.Text = myHTML.HTML_Content; } } Reset_Buttons(); MultiView_Editor.SetActiveView(View_Editor); }
private void Control_Init() { #region Form Default setting File_Images(); File_Media(); RadEditor_TextContent.Content = ""; RadEditor_TextContent.ToolsFile = "~/App_Data/Editor/BasicTools.xml"; #endregion if (!DataEval.IsEmptyQuery(_richtextid)) { if (_isshared) { Lib.RichTextMgr myRichTextMgr = new Lib.RichTextMgr(); Lib.RichText myRichText = myRichTextMgr.Get_RichText_Content(_contentid); RadEditor_TextContent.Content = myRichText.RichText_Content; } else { RadEditor_TextContent.Content = _richtext_content; } } else { if (_isshared) { Lib.RichTextMgr myRichTextMgr = new Lib.RichTextMgr(); Lib.RichText myRichText = myRichTextMgr.Get_RichText_Content(_contentid); RadEditor_TextContent.Content = myRichText.RichText_Content; } } Reset_Buttons(); MultiView_Editor.SetActiveView(View_Editor); }
protected void btn_ShareContent_Click(object sender, EventArgs e) { if (Page.IsValid) { Lib.ScriptMgr myScriptMgr = new Lib.ScriptMgr(); DateTime nowTime = DateTime.Now; string ScriptID = Nexus.Core.Tools.IDGenerator.Get_New_GUID(); e2Data[] UpdateData = { new e2Data("ScriptID", ScriptID), new e2Data("CategoryID", CategoryTree_Share.Selected_CategoryID), new e2Data("Display_Name", tbx_DisplayName.Text), new e2Data("Script_Type", droplist_Script_Type.SelectedValue), new e2Data("Script_Content", tbx_TextContent.Text), new e2Data("Create_Date", nowTime.ToString()), new e2Data("LastUpdate_Date", nowTime.ToString()), new e2Data("LastUpdate_UserID", Security.Users.UserStatus.Current_UserID(this.Page)) }; myScriptMgr.Add_Script_Content(UpdateData); // Add Item to Category CategoryMgr myCategoryMgr = new CategoryMgr(); myCategoryMgr.Add_ComponentInCategory_Item(CategoryTree_Share.Selected_CategoryID, "076A591E-1BFE-47A7-8B40-D6621C7D3DF9"); _isshared = true; ViewState["IsShared"] = _isshared; _contentid = ScriptID; ViewState["ContentID"] = _contentid; Reset_Buttons(); MultiView_Editor.SetActiveView(View_Editor); } }
protected void btn_ShareContent_Click(object sender, EventArgs e) { if (Page.IsValid) { Lib.HTMLMgr myHTMLMgr = new Lib.HTMLMgr(); DateTime nowTime = DateTime.Now; string HTMLID = Nexus.Core.Tools.IDGenerator.Get_New_GUID(); e2Data[] UpdateData = { new e2Data("HTMLID", HTMLID), new e2Data("CategoryID", CategoryTree_Share.Selected_CategoryID), new e2Data("Display_Name", tbx_DisplayName.Text), new e2Data("HTML_Content", tbx_TextContent.Text), new e2Data("Create_Date", nowTime.ToString()), new e2Data("LastUpdate_Date", nowTime.ToString()), new e2Data("LastUpdate_UserID", Security.Users.UserStatus.Current_UserID(this.Page)) }; myHTMLMgr.Add_HTML_Content(UpdateData); // Add Item to Category CategoryMgr myCategoryMgr = new CategoryMgr(); myCategoryMgr.Add_ComponentInCategory_Item(CategoryTree_Share.Selected_CategoryID, "B1CD6348-796C-4E92-8C39-5CEF3D600B7C"); _isshared = true; ViewState["IsShared"] = _isshared; _contentid = HTMLID; ViewState["ContentID"] = _contentid; Reset_Buttons(); MultiView_Editor.SetActiveView(View_Editor); } }
protected void btn_ShareContent_Click(object sender, EventArgs e) { if (Page.IsValid) { Lib.RichTextMgr myRichTextMgr = new Lib.RichTextMgr(); DateTime nowTime = DateTime.Now; string RichTextID = Nexus.Core.Tools.IDGenerator.Get_New_GUID(); e2Data[] UpdateData = { new e2Data("RichTextID", RichTextID), new e2Data("CategoryID", CategoryTree_Share.Selected_CategoryID), new e2Data("Display_Name", tbx_DisplayName.Text), new e2Data("RichText_Content", RadEditor_TextContent.Content), new e2Data("Create_Date", nowTime.ToString()), new e2Data("LastUpdate_Date", nowTime.ToString()), new e2Data("LastUpdate_UserID", Security.Users.UserStatus.Current_UserID(this.Page)) }; myRichTextMgr.Add_RichText_Content(UpdateData); // Add Item to Category CategoryMgr myCategoryMgr = new CategoryMgr(); myCategoryMgr.Add_ComponentInCategory_Item(CategoryTree_Share.Selected_CategoryID, "A2E21E10-FF09-4D3F-9D70-DF9376FCF8B7"); _isshared = true; ViewState["IsShared"] = _isshared; _contentid = RichTextID; ViewState["ContentID"] = _contentid; Reset_Buttons(); MultiView_Editor.SetActiveView(View_Editor); } }
protected void btn_Cancel_Click(object sender, EventArgs e) { MultiView_Editor.SetActiveView(View_Editor); }
protected void lbtn_ShareContent_Click(object sender, EventArgs e) { CategoryTree_Share.LoadCategoryRoot(); MultiView_Editor.SetActiveView(View_ShareContent); }
protected void lbtn_SelectContent_Click(object sender, EventArgs e) { CategoryTree_Menu.LoadCategoryRoot(); CategoryTree_Menu_CategorySelected(sender, null); MultiView_Editor.SetActiveView(View_SelectContent); }
private void Control_Init() { #region Default setting //Gets your enum names and adds it to a string array Array enumNames = Enum.GetValues(typeof(Lib.Script_Type)); //Creates an ArrayList ArrayList myScriptTypes = new ArrayList(); //Loop through your string array and poppulates the ArrayList foreach (Lib.Script_Type myScriptType in enumNames) { myScriptTypes.Add(new { Value = StringEnum.GetStringValue(myScriptType), Name = myScriptType.ToString() }); } //Bind the ArrayList to your DropDownList droplist_Script_Type.DataSource = myScriptTypes; droplist_Script_Type.DataTextField = "Name"; droplist_Script_Type.DataValueField = "Value"; droplist_Script_Type.DataBind(); tbx_TextContent.Text = ""; #endregion if (!DataEval.IsEmptyQuery(_scriptid)) { if (_isshared) { Lib.ScriptMgr myScriptMgr = new Lib.ScriptMgr(); Lib.Script myScript = myScriptMgr.Get_Script_Content(_contentid); _script_type = StringEnum.GetStringValue(myScript.Script_Type); ViewState["Script_Type"] = _script_type; _script_content = myScript.Script_Content; ViewState["Script_Content"] = _script_content; } droplist_Script_Type.SelectedValue = _script_type; tbx_TextContent.Text = _script_content; } else { if (_isshared) { Lib.ScriptMgr myScriptMgr = new Lib.ScriptMgr(); Lib.Script myScript = myScriptMgr.Get_Script_Content(_contentid); _script_type = StringEnum.GetStringValue(myScript.Script_Type); ViewState["Script_Type"] = _script_type; _script_content = myScript.Script_Content; ViewState["Script_Content"] = _script_content; droplist_Script_Type.SelectedValue = _script_type; tbx_TextContent.Text = _script_content; } } Reset_Buttons(); MultiView_Editor.SetActiveView(View_Editor); }