protected void btn_Update_Click(object sender, EventArgs e)
        {
            string BlogPostID = Nexus.Core.Tools.IDGenerator.Get_New_GUID();

            Control_Property[] Update_Properties = { };

            #region Update for Control Data

            // Check Control is New
            if (DataEval.IsEmptyQuery(_blogpostsid))
            {
                // The Control Does not have extra table

                // Create Page_Control Property
                Control_Property[] PropertieData =
                {
                    new Control_Property(_page_controlid, "BlogPostsID",     BlogPostID),
                    new Control_Property(_page_controlid, "PostViewURL",     tbx_PostViewURL.Text),
                    new Control_Property(_page_controlid, "ShowContent",     rbtn_ShowContent.SelectedValue),
                    new Control_Property(_page_controlid, "NumberPerPage",   RadNumericTbx_NumPerPage.Value.ToString()),
                    new Control_Property(_page_controlid, "ShowPublicPosts", rbtn_ShowPublicPosts.SelectedValue),
                    new Control_Property(_page_controlid, "MaxNumberPosts",  RadNumericTbx_MaxNumberPosts.Value.ToString()),
                    new Control_Property(_page_controlid, "ReturnURL",       tbx_ReturnURL.Text)
                };

                Update_Properties = PropertieData;
            }
            else
            {
                // The Control Does not have extra table

                // Update Page_Control Property
                Control_Property[] PropertieData =
                {
                    new Control_Property(_page_controlid, "BlogPostsID",     _blogpostsid),
                    new Control_Property(_page_controlid, "PostViewURL",     tbx_PostViewURL.Text),
                    new Control_Property(_page_controlid, "ShowContent",     rbtn_ShowContent.SelectedValue),
                    new Control_Property(_page_controlid, "NumberPerPage",   RadNumericTbx_NumPerPage.Value.ToString()),
                    new Control_Property(_page_controlid, "ShowPublicPosts", rbtn_ShowPublicPosts.SelectedValue),
                    new Control_Property(_page_controlid, "MaxNumberPosts",  RadNumericTbx_MaxNumberPosts.Value.ToString()),
                    new Control_Property(_page_controlid, "ReturnURL",       tbx_ReturnURL.Text)
                };

                Update_Properties = PropertieData;
            }

            #endregion

            #region Update for Control Properties

            ControlMgr myControlMgr = new ControlMgr();
            myControlMgr.Update_Control_Properties(_editmode, _blogpostsid, _page_controlid, Update_Properties);

            #endregion


            // Finish Update Close Window
            string _finishupdate_script = string.Format("CloseAndRebind({0});", _page_controlid);
            ScriptManager.RegisterStartupScript(this.Page, typeof(Page), "myScript", _finishupdate_script, true);
        }
Example #2
0
        protected void btn_Update_Click(object sender, EventArgs e)
        {
            string CSS_MenuID = Nexus.Core.Tools.IDGenerator.Get_New_GUID();

            Control_Property[] Update_Properties = { };

            #region Update for Control Data

            // Check Control is New
            if (DataEval.IsEmptyQuery(_css_menuid))
            {
                // Menu Does not have extra table

                // Create Page_Control Property
                Control_Property[] PropertieData =
                {
                    new Control_Property(_page_controlid, "CSS_MenuID",       CSS_MenuID),
                    new Control_Property(_page_controlid, "IsStatic",         rbtnlist_IsStatic.SelectedValue),
                    new Control_Property(_page_controlid, "RootPageIndexID",  tbx_RootPageID.Text),
                    new Control_Property(_page_controlid, "DisplaySameLevel", rbtnlist_DisplaySameLevel.SelectedValue),
                    new Control_Property(_page_controlid, "DisplayCategory",  rbtnlist_DisplayCategory.SelectedValue),
                    new Control_Property(_page_controlid, "CssClass",         tbx_CSS.Text),
                    new Control_Property(_page_controlid, "Active_CssClass",  tbx_ActiveCSS.Text)
                };

                Update_Properties = PropertieData;
            }
            else
            {
                // Menu Does not have extra table

                // Update Page_Control Property
                Control_Property[] PropertieData =
                {
                    new Control_Property(_page_controlid, "CSS_MenuID",       _css_menuid),
                    new Control_Property(_page_controlid, "IsStatic",         rbtnlist_IsStatic.SelectedValue),
                    new Control_Property(_page_controlid, "RootPageIndexID",  tbx_RootPageID.Text),
                    new Control_Property(_page_controlid, "DisplaySameLevel", rbtnlist_DisplaySameLevel.SelectedValue),
                    new Control_Property(_page_controlid, "DisplayCategory",  rbtnlist_DisplayCategory.SelectedValue),
                    new Control_Property(_page_controlid, "CssClass",         tbx_CSS.Text),
                    new Control_Property(_page_controlid, "Active_CssClass",  tbx_ActiveCSS.Text)
                };

                Update_Properties = PropertieData;
            }

            #endregion

            #region Update for Control Properties

            ControlMgr myControlMgr = new ControlMgr();
            myControlMgr.Update_Control_Properties(_editmode, _css_menuid, _page_controlid, Update_Properties);

            #endregion


            // Finish Update Close Window
            string _finishupdate_script = string.Format("CloseAndRebind({0});", _page_controlid);
            ScriptManager.RegisterStartupScript(this.Page, typeof(Page), "myScript", _finishupdate_script, true);
        }
        protected void btn_Update_Click(object sender, EventArgs e)
        {
            string ItemDetailID = Nexus.Core.Tools.IDGenerator.Get_New_GUID();

            Control_Property[] Update_Properties = { };

            #region Update for Control Data

            // Check Control is New
            if (DataEval.IsEmptyQuery(_itemdetailid))
            {
                // The Control Does not have extra table

                // Create Page_Control Property
                Control_Property[] PropertieData =
                {
                    new Control_Property(_page_controlid, "ItemDetailID",    ItemDetailID),
                    new Control_Property(_page_controlid, "IsPageTitle",     rbtn_IsPageTitle.SelectedValue),
                    new Control_Property(_page_controlid, "DisplayID",       droplist_DisplayID.SelectedValue),
                    new Control_Property(_page_controlid, "ItemTemplate",    rbtn_ItemTemplate.SelectedValue),
                    new Control_Property(_page_controlid, "ItemTemplateURL", tbx_ItemTemplateURL.Text)
                };

                Update_Properties = PropertieData;
            }
            else
            {
                // The Control Does not have extra table

                // Update Page_Control Property
                Control_Property[] PropertieData =
                {
                    new Control_Property(_page_controlid, "ItemDetailID",    _itemdetailid),
                    new Control_Property(_page_controlid, "IsPageTitle",     rbtn_IsPageTitle.SelectedValue),
                    new Control_Property(_page_controlid, "DisplayID",       droplist_DisplayID.SelectedValue),
                    new Control_Property(_page_controlid, "ItemTemplate",    rbtn_ItemTemplate.SelectedValue),
                    new Control_Property(_page_controlid, "ItemTemplateURL", tbx_ItemTemplateURL.Text)
                };

                Update_Properties = PropertieData;
            }

            #endregion

            #region Update for Control Properties

            ControlMgr myControlMgr = new ControlMgr();
            myControlMgr.Update_Control_Properties(_editmode,
                                                   _itemdetailid,
                                                   _page_controlid,
                                                   Update_Properties,
                                                   Security.Users.UserStatus.Current_UserID(this.Page));

            #endregion

            // Finish Update Close Window
            string _finishupdate_script = string.Format("CloseAndRebind({0});", _page_controlid);
            ScriptManager.RegisterStartupScript(this.Page, typeof(Page), "myScript", _finishupdate_script, true);
        }
Example #4
0
        protected void btn_Update_Click(object sender, EventArgs e)
        {
            string CreateUserID = Nexus.Core.Tools.IDGenerator.Get_New_GUID();

            Control_Property[] Update_Properties = { };

            #region Update for Control Data

            // Check Control is New
            if (DataEval.IsEmptyQuery(_createuserid))
            {
                // The Control Does not have extra table

                // Create Page_Control Property
                Control_Property[] PropertieData =
                {
                    new Control_Property(_page_controlid, "CreateUserID",   CreateUserID),
                    new Control_Property(_page_controlid, "DisplayResult",  rbtn_DisplayResult.SelectedValue),
                    new Control_Property(_page_controlid, "SuccessfulURL",  tbx_SuccessfulURL.Text),
                    new Control_Property(_page_controlid, "SuccessfulText", RadEditor_SuccessfulText.Content),
                    new Control_Property(_page_controlid, "UserGroupID",    droplist_UserGroup.SelectedValue)
                };

                Update_Properties = PropertieData;
            }
            else
            {
                // The Control Does not have extra table

                // Update Page_Control Property
                Control_Property[] PropertieData =
                {
                    new Control_Property(_page_controlid, "CreateUserID",   _createuserid),
                    new Control_Property(_page_controlid, "DisplayResult",  rbtn_DisplayResult.SelectedValue),
                    new Control_Property(_page_controlid, "SuccessfulURL",  tbx_SuccessfulURL.Text),
                    new Control_Property(_page_controlid, "SuccessfulText", RadEditor_SuccessfulText.Content),
                    new Control_Property(_page_controlid, "UserGroupID",    droplist_UserGroup.SelectedValue)
                };

                Update_Properties = PropertieData;
            }

            #endregion

            #region Update for Control Properties

            ControlMgr myControlMgr = new ControlMgr();
            myControlMgr.Update_Control_Properties(_editmode, _createuserid, _page_controlid, Update_Properties);

            #endregion


            // Finish Update Close Window
            string _finishupdate_script = string.Format("CloseAndRebind({0});", _page_controlid);
            ScriptManager.RegisterStartupScript(this.Page, typeof(Page), "myScript", _finishupdate_script, true);
        }
        protected void btn_Update_Click(object sender, EventArgs e)
        {
            string LoginStatusID = Nexus.Core.Tools.IDGenerator.Get_New_GUID();

            Control_Property[] Update_Properties = { };

            #region Update for Control Data

            // Check Control is New
            if (DataEval.IsEmptyQuery(_loginstatusid))
            {
                // Login Refresh Does not have extra table

                // Create Page_Control Property
                Control_Property[] PropertieData =
                {
                    new Control_Property(_page_controlid, "LoginStatusID", LoginStatusID),
                    new Control_Property(_page_controlid, "LoginURL",      tbx_LoginURL.Text),
                    new Control_Property(_page_controlid, "LogoutURL",     tbx_LogoutURL.Text)
                };

                Update_Properties = PropertieData;
            }
            else
            {
                // Login Refresh Does not have extra table

                // Update Page_Control Property
                Control_Property[] PropertieData =
                {
                    new Control_Property(_page_controlid, "LoginStatusID", _loginstatusid),
                    new Control_Property(_page_controlid, "LoginURL",      tbx_LoginURL.Text),
                    new Control_Property(_page_controlid, "LogoutURL",     tbx_LogoutURL.Text)
                };

                Update_Properties = PropertieData;
            }

            #endregion

            #region Update for Control Properties

            ControlMgr myControlMgr = new ControlMgr();
            myControlMgr.Update_Control_Properties(_editmode, _loginstatusid, _page_controlid, Update_Properties);

            #endregion


            // Finish Update Close Window
            string _finishupdate_script = string.Format("CloseAndRebind({0});", _page_controlid);
            ScriptManager.RegisterStartupScript(this.Page, typeof(Page), "myScript", _finishupdate_script, true);
        }
        protected void btn_Update_Click(object sender, EventArgs e)
        {
            if (Page.IsValid)
            {
                string             Ebay_ItemListID   = Nexus.Core.Tools.IDGenerator.Get_New_GUID();
                Control_Property[] Update_Properties = { };

                #region Update for Control Data

                // Check Control is New
                if (DataEval.IsEmptyQuery(_ebay_itemlistid))
                {
                    // The Control Does not have extra table

                    // Create Page_Control Property
                    Control_Property[] PropertieData =
                    {
                        new Control_Property(_page_controlid, "Ebay_ItemListID",    Ebay_ItemListID),
                        new Control_Property(_page_controlid, "CategoryID",         CategoryTree_Menu.Get_CheckdNodes_String()),
                        new Control_Property(_page_controlid, "Ebay_ItemDetailURL", tbx_EbayDetailURL.Text),
                        new Control_Property(_page_controlid, "SortOrder",          droplist_SortOrder.SelectedValue),
                        new Control_Property(_page_controlid, "Orientation",        droplist_Orientation.SelectedValue),
                        new Control_Property(_page_controlid, "ItemTemplate",       rbtn_ItemTemplate.SelectedValue),
                        new Control_Property(_page_controlid, "ItemTemplateURL",    tbx_ItemTemplateURL.Text),
                        new Control_Property(_page_controlid, "RepeatColumn",       RadNumericTbx_RepeatColumn.Value.ToString()),
                        new Control_Property(_page_controlid, "Enable_Pager",       rbtn_Enable_Pager.SelectedValue),
                        new Control_Property(_page_controlid, "NumberPerPage",      RadNumericTbx_NumPerPage.Value.ToString()),
                        new Control_Property(_page_controlid, "TotalNumber",        RadNumericTbx_TotalNumber.Value.ToString())
                    };

                    Update_Properties = PropertieData;
                }
                else
                {
                    // The Control Does not have extra table

                    // Update Page_Control Property
                    Control_Property[] PropertieData =
                    {
                        new Control_Property(_page_controlid, "Ebay_ItemListID",    _ebay_itemlistid),
                        new Control_Property(_page_controlid, "CategoryID",         CategoryTree_Menu.Get_CheckdNodes_String()),
                        new Control_Property(_page_controlid, "Ebay_ItemDetailURL", tbx_EbayDetailURL.Text),
                        new Control_Property(_page_controlid, "SortOrder",          droplist_SortOrder.SelectedValue),
                        new Control_Property(_page_controlid, "Orientation",        droplist_Orientation.SelectedValue),
                        new Control_Property(_page_controlid, "ItemTemplate",       rbtn_ItemTemplate.SelectedValue),
                        new Control_Property(_page_controlid, "ItemTemplateURL",    tbx_ItemTemplateURL.Text),
                        new Control_Property(_page_controlid, "RepeatColumn",       RadNumericTbx_RepeatColumn.Value.ToString()),
                        new Control_Property(_page_controlid, "Enable_Pager",       rbtn_Enable_Pager.SelectedValue),
                        new Control_Property(_page_controlid, "NumberPerPage",      RadNumericTbx_NumPerPage.Value.ToString()),
                        new Control_Property(_page_controlid, "TotalNumber",        RadNumericTbx_TotalNumber.Value.ToString())
                    };

                    Update_Properties = PropertieData;
                }

                #endregion

                #region Update for Control Properties

                ControlMgr myControlMgr = new ControlMgr();
                myControlMgr.Update_Control_Properties(_editmode,
                                                       _ebay_itemlistid,
                                                       _page_controlid,
                                                       Update_Properties,
                                                       Security.Users.UserStatus.Current_UserID(this.Page));

                #endregion


                // Finish Update Close Window
                string _finishupdate_script = string.Format("CloseAndRebind({0});", _page_controlid);
                ScriptManager.RegisterStartupScript(this.Page, typeof(Page), "myScript", _finishupdate_script, true);
            }
        }
Example #7
0
        protected void btn_Update_Click(object sender, EventArgs e)
        {
            Lib.ImageMgr myImageMgr = new Lib.ImageMgr();

            DateTime nowTime = DateTime.Now;

            string ImageID = Nexus.Core.Tools.IDGenerator.Get_New_GUID();

            Control_Property[] Update_Properties = { };

            #region Update for Control Data

            // Check Control is New
            if (DataEval.IsEmptyQuery(_imageid))
            {
                if (_isshared)
                {
                    e2Data[] UpdateData =
                    {
                        new e2Data("ImageID",           _contentid),
                        new e2Data("ImageURL",          tbx_ImageURL.Text),
                        new e2Data("AlternateText",     tbx_AlternateText.Text),
                        new e2Data("LinkURL",           tbx_LinkURL.Text),
                        new e2Data("Link_Target",       RadComboBox_LinkTarget.Text),
                        new e2Data("Create_Date",       nowTime.ToString()),
                        new e2Data("LastUpdate_Date",   nowTime.ToString()),
                        new e2Data("LastUpdate_UserID", Security.Users.UserStatus.Current_UserID(this.Page))
                    };

                    myImageMgr.Add_Image_Content(UpdateData);
                }

                // Create Page_Control Property
                Control_Property[] PropertieData =
                {
                    new Control_Property(_page_controlid, "ImageID",       ImageID),
                    new Control_Property(_page_controlid, "Height",        RadNumericTbx_Height.Value.ToString()),
                    new Control_Property(_page_controlid, "Width",         RadNumericTbx_Width.Value.ToString()),
                    new Control_Property(_page_controlid, "Border",        RadNumericTbx_Border.Value.ToString()),
                    new Control_Property(_page_controlid, "ImageURL",      tbx_ImageURL.Text),
                    new Control_Property(_page_controlid, "AlternateText", tbx_AlternateText.Text),
                    new Control_Property(_page_controlid, "LinkURL",       tbx_LinkURL.Text),
                    new Control_Property(_page_controlid, "Link_Target",   RadComboBox_LinkTarget.Text),
                    new Control_Property(_page_controlid, "IsShared",      _isshared.ToString()),
                    new Control_Property(_page_controlid, "ContentID",     _contentid)
                };

                Update_Properties = PropertieData;
            }
            else
            {
                if (_isshared)
                {
                    e2Data[] UpdateData =
                    {
                        new e2Data("ImageID",           _imageid),
                        new e2Data("ImageURL",          tbx_ImageURL.Text),
                        new e2Data("AlternateText",     tbx_AlternateText.Text),
                        new e2Data("LinkURL",           tbx_LinkURL.Text),
                        new e2Data("Link_Target",       RadComboBox_LinkTarget.Text),
                        new e2Data("LastUpdate_Date",   nowTime.ToString()),
                        new e2Data("LastUpdate_UserID", Security.Users.UserStatus.Current_UserID(this.Page))
                    };

                    myImageMgr.Edit_Image_Content(UpdateData);
                }

                // Update Page_Control Property
                Control_Property[] PropertieData =
                {
                    new Control_Property(_page_controlid, "ImageID",       _imageid),
                    new Control_Property(_page_controlid, "Height",        RadNumericTbx_Height.Value.ToString()),
                    new Control_Property(_page_controlid, "Width",         RadNumericTbx_Width.Value.ToString()),
                    new Control_Property(_page_controlid, "Border",        RadNumericTbx_Border.Value.ToString()),
                    new Control_Property(_page_controlid, "ImageURL",      tbx_ImageURL.Text),
                    new Control_Property(_page_controlid, "AlternateText", tbx_AlternateText.Text),
                    new Control_Property(_page_controlid, "LinkURL",       tbx_LinkURL.Text),
                    new Control_Property(_page_controlid, "Link_Target",   RadComboBox_LinkTarget.Text),
                    new Control_Property(_page_controlid, "IsShared",      _isshared.ToString()),
                    new Control_Property(_page_controlid, "ContentID",     _contentid)
                };

                Update_Properties = PropertieData;
            }

            #endregion

            #region Update for Control Properties

            ControlMgr myControlMgr = new ControlMgr();
            myControlMgr.Update_Control_Properties(_editmode, _imageid, _page_controlid, Update_Properties);

            #endregion

            // Finish Update Close Window
            //OnFinishUpdate(this, EventArgs.Empty);
            string _finishupdate_script = string.Format("CloseAndRebind({0});", _page_controlid);
            ScriptManager.RegisterStartupScript(this.Page, typeof(Page), "myScript", _finishupdate_script, true);
        }
Example #8
0
        protected void btn_Update_Click(object sender, EventArgs e)
        {
            string PostViewID = Nexus.Core.Tools.IDGenerator.Get_New_GUID();

            Control_Property[] Update_Properties = { };

            #region Update for Control Data

            // Check Control is New
            if (DataEval.IsEmptyQuery(_postviewid))
            {
                // The Control Does not have extra table

                // Create Page_Control Property
                Control_Property[] PropertieData =
                {
                    new Control_Property(_page_controlid, "PostViewID",               PostViewID),
                    new Control_Property(_page_controlid, "IsPageTitle",              rbtn_IsPageTitle.SelectedValue),
                    new Control_Property(_page_controlid, "PostView_ItemTemplate",    rbtn_PostView_ItemTemplate.SelectedValue),
                    new Control_Property(_page_controlid, "PostView_ItemTemplateURL", tbx_PostView_ItemTemplateURL.Text),
                    new Control_Property(_page_controlid, "IsGuestComment",           rbtn_IsGuestComment.SelectedValue),
                    new Control_Property(_page_controlid, "Comment_ItemTemplate",     rbtn_Comment_ItemTemplate.SelectedValue),
                    new Control_Property(_page_controlid, "Comment_ItemTemplateURL",  tbx_Comment_ItemTemplateURL.Text),
                    new Control_Property(_page_controlid, "Enable_Pager",             rbtn_Enable_Pager.SelectedValue),
                    new Control_Property(_page_controlid, "NumberPerPage",            RadNumericTbx_NumPerPage.Value.ToString())
                };

                Update_Properties = PropertieData;
            }
            else
            {
                // The Control Does not have extra table

                // Update Page_Control Property
                Control_Property[] PropertieData =
                {
                    new Control_Property(_page_controlid, "PostViewID",               _postviewid),
                    new Control_Property(_page_controlid, "IsPageTitle",              rbtn_IsPageTitle.SelectedValue),
                    new Control_Property(_page_controlid, "PostView_ItemTemplate",    rbtn_PostView_ItemTemplate.SelectedValue),
                    new Control_Property(_page_controlid, "PostView_ItemTemplateURL", tbx_PostView_ItemTemplateURL.Text),
                    new Control_Property(_page_controlid, "IsGuestComment",           rbtn_IsGuestComment.SelectedValue),
                    new Control_Property(_page_controlid, "Comment_ItemTemplate",     rbtn_Comment_ItemTemplate.SelectedValue),
                    new Control_Property(_page_controlid, "Comment_ItemTemplateURL",  tbx_Comment_ItemTemplateURL.Text),
                    new Control_Property(_page_controlid, "Enable_Pager",             rbtn_Enable_Pager.SelectedValue),
                    new Control_Property(_page_controlid, "NumberPerPage",            RadNumericTbx_NumPerPage.Value.ToString())
                };

                Update_Properties = PropertieData;
            }

            #endregion

            #region Update for Control Properties

            ControlMgr myControlMgr = new ControlMgr();
            myControlMgr.Update_Control_Properties(
                _editmode,
                _postviewid,
                _page_controlid,
                Update_Properties,
                Security.Users.UserStatus.Current_UserID(this.Page)
                );

            #endregion


            // Finish Update Close Window
            string _finishupdate_script = string.Format("CloseAndRebind({0});", _page_controlid);
            ScriptManager.RegisterStartupScript(this.Page, typeof(Page), "myScript", _finishupdate_script, true);
        }
Example #9
0
 private void Awake()
 {
     inst = this;
 }
Example #10
0
        protected void btn_Update_Click(object sender, EventArgs e)
        {
            Lib.ScriptMgr myScriptMgr = new Lib.ScriptMgr();

            DateTime nowTime = DateTime.Now;

            // Create New
            string ScriptID = Nexus.Core.Tools.IDGenerator.Get_New_GUID();

            Control_Property[] Update_Properties = { };

            #region Update for Control Data

            // Update Extra Database
            if (_isshared)
            {
                e2Data[] UpdateData =
                {
                    new e2Data("ScriptID",          _contentid),
                    new e2Data("Script_Type",       droplist_Script_Type.SelectedValue),
                    new e2Data("Script_Content",    tbx_TextContent.Text),
                    new e2Data("LastUpdate_Date",   nowTime.ToString()),
                    new e2Data("LastUpdate_UserID", Security.Users.UserStatus.Current_UserID(this.Page))
                };

                myScriptMgr.Edit_Script_Content(UpdateData);
            }


            // Check Control is New
            if (DataEval.IsEmptyQuery(_scriptid))
            {
                // Create Control Property
                Control_Property[] PropertieData =
                {
                    new Control_Property(_page_controlid, "ScriptID",       ScriptID),
                    new Control_Property(_page_controlid, "Script_Type",    droplist_Script_Type.SelectedValue),
                    new Control_Property(_page_controlid, "Script_Content", tbx_TextContent.Text),
                    new Control_Property(_page_controlid, "IsShared",       _isshared.ToString()),
                    new Control_Property(_page_controlid, "ContentID",      _contentid)
                };
                Update_Properties = PropertieData;
            }
            else
            {
                // Update Control Property
                Control_Property[] PropertieData =
                {
                    new Control_Property(_page_controlid, "ScriptID",       _scriptid),
                    new Control_Property(_page_controlid, "Script_Type",    droplist_Script_Type.SelectedValue),
                    new Control_Property(_page_controlid, "Script_Content", tbx_TextContent.Text),
                    new Control_Property(_page_controlid, "IsShared",       _isshared.ToString()),
                    new Control_Property(_page_controlid, "ContentID",      _contentid)
                };
                Update_Properties = PropertieData;
            }

            #endregion

            #region Update for Control Properties

            ControlMgr myControlMgr = new ControlMgr();
            myControlMgr.Update_Control_Properties(_editmode, _scriptid, _page_controlid, Update_Properties);

            #endregion

            // Finish Update Close Window
            //OnFinishUpdate(this, EventArgs.Empty);
            string _finishupdate_script = string.Format("CloseAndRebind({0});", _page_controlid);
            ScriptManager.RegisterStartupScript(this.Page, typeof(Page), "myScript", _finishupdate_script, true);
        }
        protected void btn_Update_Click(object sender, EventArgs e)
        {
            DateTime nowTime = DateTime.Now;

            string UserControlID = Nexus.Core.Tools.IDGenerator.Get_New_GUID();

            Control_Property[] Update_Properties = { };

            #region Update for Control Data

            // Check Control is New
            if (DataEval.IsEmptyQuery(_webusercontrolid))
            {
                // UserControl Does not have extra table

                // Create Page_Control Property
                Control_Property[] PropertieData =
                {
                    new Control_Property(_page_controlid, "WebUserControlID", UserControlID),
                    new Control_Property(_page_controlid, "Path",             tbx_UserControlPath.Text)
                };

                Update_Properties = PropertieData;
            }
            else
            {
                // UserControl Does not have extra table

                // Update Page_Control Property
                Control_Property[] PropertieData =
                {
                    new Control_Property(_page_controlid, "WebUserControlID", _webusercontrolid),
                    new Control_Property(_page_controlid, "Path",             tbx_UserControlPath.Text)
                };

                Update_Properties = PropertieData;
            }

            #endregion

            #region Update for Control Properties

            ControlMgr myControlMgr = new ControlMgr();

            switch (_editmode)
            {
            case "PageAdvancedMode":
                if (DataEval.IsEmptyQuery(_webusercontrolid))
                {
                    // Create Lock Page_Control Property
                    myControlMgr.Add_Page_Control_Properties_AdvanceMode(Update_Properties);
                }
                else
                {
                    // Update Page_Control Property
                    myControlMgr.Edit_Page_Control_Properties_AdvanceMode(_page_controlid, Update_Properties);
                }
                break;

            case "PageDesignMode":
                if (DataEval.IsEmptyQuery(_webusercontrolid))
                {
                    // Create Lock Page_Control Property
                    myControlMgr.Add_Page_Control_Properties_DesignMode(Update_Properties);
                }
                else
                {
                    // Update Page_Control Property
                    myControlMgr.Edit_Page_Control_Properties_DesignMode(_page_controlid, Update_Properties);
                }
                break;

            case "TemplateAdvancedMode":
                if (DataEval.IsEmptyQuery(_webusercontrolid))
                {
                    // Create Lock Page_Control Property
                    myControlMgr.Add_MasterPage_Control_Properties_AdvanceMode(Update_Properties);
                }
                else
                {
                    // Update Page_Control Property
                    myControlMgr.Edit_MasterPage_Control_Properties_AdvanceMode(_page_controlid, Update_Properties);
                }
                break;

            case "TemplateDesignMode":
                if (DataEval.IsEmptyQuery(_webusercontrolid))
                {
                    // Create Lock Page_Control Property
                    myControlMgr.Add_MasterPage_Control_Properties_DesignMode(Update_Properties);
                }
                else
                {
                    // Update Page_Control Property
                    myControlMgr.Edit_MasterPage_Control_Properties_DesignMode(_page_controlid, Update_Properties);
                }
                break;
            }

            #endregion


            // Finish Update Close Window
            string _finishupdate_script = string.Format("CloseAndRebind({0});", _page_controlid);
            ScriptManager.RegisterStartupScript(this.Page, typeof(Page), "myScript", _finishupdate_script, true);
        }