コード例 #1
0
//		internal void MoveModuleUp(int idx, ModuleList list)
        override public void MoveModuleUp(int idx, ModuleList list)
        {
            if (idx <= 0)
            {
                return;
            }

            PortalDefinition pd = PortalDefinition.Load();

            PortalDefinition.Tab t = CurrentTab;

            ArrayList a = null;

            if (list == ModuleListCtrl_Left)
            {
                a = t.left;
            }
            else if (list == ModuleListCtrl_Middle)
            {
                a = t.middle;
            }
            else if (list == ModuleListCtrl_Right)
            {
                a = t.right;
            }

            PortalDefinition.Module m = (PortalDefinition.Module)a[idx];
            a.RemoveAt(idx);
            a.Insert(idx - 1, m);

            pd.Save();

            // Rebind
            LoadData(CurrentTab);
        }
コード例 #2
0
        /// <summary>
        /// Thủ tục thực hiện chuyển vị trí của Module đã chọn xuống 1 mức
        /// </summary>
        /// <param name="idx">Vị trí hiện thời</param>
        /// <param name="list">Danh sách Module</param>
        internal void MoveModuleDown(int idx, ModuleList list)
        {
            // Nạp cấu trúc Portal
            PortalDefinition pd = PortalDefinition.Load();

            // Lấy thông tin cột chứa Module hiện thời
            PortalDefinition.Column _objColumnContainer = pd.GetColumn(list.ContainerColumnReference);

            // Lấy danh sách Module của cột
            ArrayList _arrModuleList = _objColumnContainer.ModuleList;

            // Nếu Module đang ở mức cuối cùng thì kết thúc thủ tục
            if (idx >= _arrModuleList.Count - 1)
            {
                return;
            }

            // Lấy thông tin Module hiện thời từ danh sách Module
            PortalDefinition.Module m = (PortalDefinition.Module)_arrModuleList[idx];

            // Gỡ Module ra khỏi vị trí hiện thời
            _arrModuleList.RemoveAt(idx);

            // Chèn Module vào vị trí mới
            _arrModuleList.Insert(idx + 1, m);

            // Lưu cấu trúc Portal
            pd.Save();

            // Rebind
            LoadData(CurrentReference);
            ShowCurrentEditingColumn();
        }
コード例 #3
0
        protected void Page_Load(object sender, System.EventArgs e)
        {
            PortalDefinition.Tab currentTab = PortalDefinition.GetCurrentTab();
            if (currentTab == null || currentTab.tabs == null)
            {
                return;
            }

            ArrayList tabList = new ArrayList();

            foreach (PortalDefinition.Tab t in currentTab.tabs)
            {
                ChannelUsers objUser = new ChannelUsers();
                if (objUser.HasViewRights(Page.User, t.roles))
                {
                    DisplayTabItem dt = new DisplayTabItem();
                    tabList.Add(dt);

                    dt.m_Text = t.title;
                    dt.m_URL  = "../../" + Portal.API.Config.GetTabURL(t.reference);
                }
            }
            Tabs.DataSource = tabList;
            Tabs.DataBind();
        }
コード例 #4
0
        /// <summary>
        /// Ham thuc hien Them mot tab moi khi them mot category. Tabref duoc tinh va chuyen theo dang
        /// Edition.CatParent.Subcat
        /// </summary>
        /// <param name="_EditionRef">Thong tin ve edition ref</param>
        /// <param name="_ParentRef">Thong tin ve catparent reFt</param>
        /// <param name="_NewRef">Thong tin ve ref cua cat moi</param>
        /// <param name="_NewTabTitle">Tieu de cua tab</param>
        public void AddCategoryTab(string _EditionRef, string _ParentRef, string _NewRef, string _NewTabTitle)
        {
            PortalDefinition _objPortal    = PortalDefinition.Load();
            string           strCurrTabRef = _EditionRef;

            if (_ParentRef != "")
            {
                strCurrTabRef += "." + _ParentRef;
            }
            PortalDefinition.Tab _objCurrentCategoryTab = _objPortal.GetTab(strCurrTabRef);

            if (_objCurrentCategoryTab == null)
            {
                PortalDefinition.Tab t = PortalDefinition.Tab.Create();
                t.reference = strCurrTabRef;
                t.title     = strCurrTabRef;

                _objPortal.tabs.Add(t);
                _objCurrentCategoryTab = _objPortal.GetTab(strCurrTabRef);
            }

            if (_objCurrentCategoryTab != null)
            {
                PortalDefinition.Tab      _newtab      = PortalDefinition.Tab.Create(_NewRef);
                PortalDefinition.ViewRole _objViewRole = new PortalDefinition.ViewRole();
                _objViewRole.name = Portal.API.Config.EveryoneRoles;
                _newtab.roles.Add(_objViewRole);
                _newtab.title     = _NewTabTitle;
                _newtab.reference = strCurrTabRef + "." + _NewRef;                //EditionRef+"."+_ParentRef
                _objCurrentCategoryTab.tabs.Add(_newtab);
                _objPortal.Save();
            }
        }
コード例 #5
0
        public void LoadData(string tabRef, string moduleRef)
        {
            CurrentTabReference = tabRef;
            CurrentReference    = moduleRef;

            PortalDefinition pd = PortalDefinition.Load();

            PortalDefinition.Tab    t = pd.GetTab(CurrentTabReference);
            PortalDefinition.Module m = t.GetModule(CurrentReference);

            if (null != m)
            {
                txtTitle.Text     = HttpUtility.HtmlDecode(m.title);
                txtReference.Text = m.reference;

                cbType.ClearSelection();
                ListItem li = cbType.Items.FindByValue(m.type);
                if (li != null)
                {
                    li.Selected = true;
                }

                RolesCtrl.LoadData(m.roles);
            }
            else
            {
                Response.Redirect(Config.MainPage);
            }
        }
コード例 #6
0
        protected void OnSave(object sender, EventArgs args)
        {
            try
            {
                if (Page.IsValid)
                {
                    // Save
                    PortalDefinition        pd = PortalDefinition.Load();
                    PortalDefinition.Tab    t  = pd.GetTab(CurrentTabReference);
                    PortalDefinition.Module m  = t.GetModule(CurrentReference);

                    m.reference = txtReference.Text;
                    m.title     = HttpUtility.HtmlEncode(txtTitle.Text);
                    m.type      = cbType.SelectedItem.Value;
                    m.roles     = RolesCtrl.GetData();

                    pd.Save();

                    CurrentReference = m.reference;

                    if (Save != null)
                    {
                        Save(this, new EventArgs());
                    }
                }
            }
            catch (Exception e)
            {
                lbError.Text = e.Message;
            }
        }
コード例 #7
0
        internal void MoveTabDown(int idx)
        {
            PortalDefinition pd = PortalDefinition.Load();
            ArrayList        a  = null;

            if (CurrentReference == "")
            {
                // Root
                a = pd.tabs;
            }
            else
            {
                PortalDefinition.Tab pt = pd.GetTab(CurrentReference);
                a = pt.tabs;
            }

            if (idx >= a.Count - 1)
            {
                return;
            }

            PortalDefinition.Tab t = (PortalDefinition.Tab)a[idx];
            a.RemoveAt(idx);
            a.Insert(idx + 1, t);

            pd.Save();

            // Rebind
            BuildTree();
            SelectTab(CurrentReference);
        }
コード例 #8
0
        override public void AddModule(ModuleList list)
        {
            PortalDefinition pd = PortalDefinition.Load();

            PortalDefinition.Tab t = CurrentTab;

            PortalDefinition.Module m = PortalDefinition.Module.Create();

            if (list == ModuleListCtrl_Left)
            {
                t.left.Add(m);
            }
            else if (list == ModuleListCtrl_Middle)
            {
                t.middle.Add(m);
            }
            else if (list == ModuleListCtrl_Right)
            {
                t.right.Add(m);
            }

            pd.Save();

            // Rebind
            LoadData(CurrentTab);

            EditModule(m.reference);
        }
コード例 #9
0
        protected void Page_Load(object sender, System.EventArgs e)
        {
            // Load Protal Definition and the current Tab
            PortalDefinition pd = PortalDefinition.Load();

            PortalDefinition.Tab currentTab = pd.GetTab(Request["TabRef"]);
            if (currentTab == null)
            {
                return;
            }

            // Great, we are a top level Tab
            if (currentTab.parent == null)
            {
                return;
            }

            ArrayList tabList = new ArrayList();

            while (currentTab != null)
            {
                DisplayTabItem dt = new DisplayTabItem();
                tabList.Insert(0, dt);

                dt.m_Text = currentTab.title;
                dt.m_URL  = "~/" + Portal.API.Config.GetTabURL(currentTab.reference);

                // one up...
                currentTab = currentTab.parent;
            }

            // Bind Repeater
            tabpath.DataSource = tabList;
            tabpath.DataBind();
        }
コード例 #10
0
        internal void AddModule(ModuleList list)
        {
            PortalDefinition pd = PortalDefinition.Load();

            PortalDefinition.Tab t = pd.GetTab(CurrentReference);

            PortalDefinition.Module m = new PortalDefinition.Module();
            m.reference = Guid.NewGuid().ToString();

            if (list == ModuleListCtrl_Left)
            {
                t.left.Add(m);
            }
            else if (list == ModuleListCtrl_Middle)
            {
                t.middle.Add(m);
            }
            else if (list == ModuleListCtrl_Right)
            {
                t.right.Add(m);
            }

            pd.Save();

            // Rebind
            LoadData(CurrentReference);

            EditModule(m.reference);
        }
コード例 #11
0
        protected void Page_Load(object sender, EventArgs e)
        {
            this.Page.Title = ConfigurationManager.AppSettings["icmsHeader"] ?? "NextCom Content Management System - NextCom.vn";

            // Kiem tra xem neu nguoi nay cua login thi quay ve trang Login.aspx
            if (Context.User.Identity.Name == "" && Context.Request.RawUrl.ToString().IndexOf("/login.aspx") == -1)
            {
                Response.Redirect("/login.aspx");
            }

            DateTime dt = DateTime.Now;
            TimeSpan ts = new TimeSpan(0, 30, 0);

            HttpCookie cookie1 = new HttpCookie("FileManager");

            cookie1.Values["PW"] = Crypto.EncryptByDay(Context.User.Identity.Name);
            cookie1.Expires      = dt.Add(ts);
            Response.Cookies.Add(cookie1);

            PortalDefinition.Tab _objCurrentTab = PortalDefinition.GetCurrentTab();

            if (_objCurrentTab != null)
            {
                if (_objCurrentTab.reference.IndexOf("office") < 0)
                {
                    Session.Remove("cpmode");
                }
            }
        }
コード例 #12
0
        public void SelectTab(string reference)
        {
            PortalDefinition pd = PortalDefinition.Load();

            CurrentReference = reference;
            if (reference == "") // Root Node
            {
                //Hidden TemplateEdit and TabEdit when load first time
                TabCtrl.Visible     = false;
                TabListCtrl.Visible = true;

                //Load data to TabList
                CurrentParentReference = "";
                TabListCtrl.LoadData(pd);
            }
            else
            {
                //Hidden Template control when edit Tab
                TemplateCtrl.Visible     = false;
                TemplateListCtrl.Visible = false;

                PortalDefinition.Tab t = pd.GetTab(reference);
                CurrentParentReference = t.parent != null ? t.parent.reference : "";
                TabListCtrl.LoadData(t);
                TabCtrl.Visible = true;
                TabCtrl.LoadData(reference);
            }
        }
コード例 #13
0
        public PortalDefinition.Tab getTab(string tabRef)
        {
            PortalDefinition pd = PortalDefinition.Load();

            PortalDefinition.Tab t = pd.GetTab(tabRef);
            return(t);
        }
コード例 #14
0
        protected void btnBindModuleEditForm_Click(object sender, EventArgs e)
        {
            string tab = (string)ViewState["TabReference"];

            PortalDefinition pd = PortalDefinition.Load();

            PortalDefinition.Tab t = pd.GetTab(tab);

            string arg        = Request.Form["pageArg"];
            string moduleRef  = string.Empty;
            string moduleType = string.Empty;
            string columnRef  = string.Empty;
            string title      = string.Empty;

            if (arg.Split("$".ToCharArray()).Length == 4)
            {
                moduleRef  = arg.Split("$".ToCharArray())[0];
                moduleType = arg.Split("$".ToCharArray())[1];
                title      = arg.Split("$".ToCharArray())[2];
                columnRef  = arg.Split("$".ToCharArray())[3];
            }
            else
            {
                return;
            }

            PortalDefinition.Column column = pd.GetColumn(columnRef);

            if (moduleRef == null || moduleRef == string.Empty || moduleRef.ToLower() == "null")
            {
                module       = PortalDefinition.Module.Create();
                module.type  = moduleType;
                module.title = title;
                moduleRef    = module.reference;
            }
            else
            {
                module           = new PortalDefinition.Module();
                module.type      = moduleType;
                module.title     = title;
                module.reference = moduleRef;
            }

            if (module != null)
            {
                module.LoadModuleSettings();
                module.LoadRuntimeProperties();

                moduleSettings        = module.moduleSettings;
                moduleRuntimeSettings = module.moduleRuntimeSettings;

                lblModuleType.Text = moduleType;
                txtReference.Text  = module.reference;


                rptRuntimeProperties.DataSource = module.GetRuntimePropertiesSource(true);
                rptRuntimeProperties.DataBind();
                upEditModuleForm.Update();
            }
        }
コード例 #15
0
        protected void OnSaveTemplate(object sender, EventArgs args)
        {
            //Load PortalDefinition to get current Tab and Load TemplateDefinition to Save template
            PortalDefinition _objPortal = PortalDefinition.Load();

            PortalDefinition.Tab _objCurrentTab = _objPortal.GetTab(CurrentReference);

            if (_objCurrentTab != null)
            {
                try
                {
                    //Save to PortalDefinition
                    _objPortal.TemplateColumns   = _objCurrentTab.Columns;
                    _objPortal.TemplateReference = _objCurrentTab.reference;
                    _objPortal.Save();

                    //Save to TemplateDefinition
                    TemplateDefinition          _objTemplate = TemplateDefinition.Load();
                    TemplateDefinition.Template t            = new TemplateDefinition.Template();

                    t.reference = txtReference.Text;
                    t.type      = Definition.CT_TYPE_TEMPLATE;
                    t.Columns   = _objCurrentTab.Columns;
                    _objTemplate.templates.Add(t);

                    _objTemplate.Save();
                }
                catch (Exception e)
                {
                    lbError.Text = e.Message;
                }
            }
        }
コード例 #16
0
        internal void MoveModuleDown(int idx, ModuleList list)
        {
            PortalDefinition pd = PortalDefinition.Load();

            PortalDefinition.Tab t = pd.GetTab(CurrentReference);

            ArrayList a = null;

            if (list == ModuleListCtrl_Left)
            {
                a = t.left;
            }
            else if (list == ModuleListCtrl_Middle)
            {
                a = t.middle;
            }
            else if (list == ModuleListCtrl_Right)
            {
                a = t.right;
            }

            if (idx >= a.Count - 1)
            {
                return;
            }

            PortalDefinition.Module m = (PortalDefinition.Module)a[idx];
            a.RemoveAt(idx);
            a.Insert(idx + 1, m);

            pd.Save();

            // Rebind
            LoadData(CurrentReference);
        }
コード例 #17
0
        /// <summary>
        /// Thủ tục thêm một Module mới
        /// </summary>
        /// <param name="_strColumnRef">Mã tham chiếu đến cột sẽ chứa Module</param>
        internal void AddModule(string _strColumnRef)
        {
            // Nạp cấu trúc portal
            PortalDefinition pd = PortalDefinition.Load();

            // Tìm cột sẽ chứa Module mới
            PortalDefinition.Column _objColumnContainer = pd.GetColumn(_strColumnRef);

            if (_objColumnContainer != null)
            {
                // Tạo Module mới
                PortalDefinition.Module _objNewModule = PortalDefinition.Module.Create();

                // Thêm Module mới vào danh sách Module của cột
                _objColumnContainer.ModuleList.Add(_objNewModule);

                // Lưu cấu trúc Portal
                pd.Save();

                // Nạp lại thông tin Tab hiện thời
                LoadData(CurrentReference);

                // Hiển thị form sửa thông tin Module
                EditModule(_objNewModule.reference);
            }
        }
コード例 #18
0
        internal static Control GetEditControl(Page p)
        {
            PortalDefinition.Tab    tab = PortalDefinition.GetCurrentTab();
            PortalDefinition.Module m   = tab.GetModule(p.Request["ModuleRef"]);


            m.LoadModuleSettings();
            Module em = null;

            if (m.moduleSettings != null)
            {
                // Module Settings are present, use custom ascx Control
                em = (Module)p.LoadControl(Config.GetModuleVirtualPath(m.type) + m.moduleSettings.editCtrl);
            }
            else
            {
                // Use default ascx control (Edit[type].ascx)
                em = (Module)p.LoadControl(Config.GetModuleVirtualPath(m.type) + "Edit" + m.type + ".ascx");
            }

            // Initialize the control
            em.InitModule(
                tab.reference,
                m.reference,
                m.type,
                Config.GetModuleVirtualPath(m.type),
                true);

            return(em);
        }
コード例 #19
0
        protected void OnSave(object sender, EventArgs args)
        {
            try
            {
                if (!Page.IsValid)
                {
                    return;
                }

                PortalDefinition     pd = PortalDefinition.Load();
                PortalDefinition.Tab t  = CurrentTab;

                t.title           = HttpUtility.HtmlEncode(txtTitle.Text);
                t.reference       = txtReference.Text;
                t.imgPathInactive = HttpUtility.HtmlEncode(txtImagePathI.Text);
                t.imgPathActive   = HttpUtility.HtmlEncode(txtImagePathA.Text);
                t.roles           = RolesCtrl.GetData();

                pd.Save();

                CurrentTab = t;

                if (Save != null)
                {
                    Save(this, t);
                }

                ShowModulesList();
            }
            catch (Exception e)
            {
                lbError.Text = e.Message;
            }
        }
コード例 #20
0
//		internal void MoveTabUp(int index)
        override public void MoveTabUp(int index)
        {
            if (index <= 0)
            {
                return;
            }

            PortalDefinition pd = PortalDefinition.Load();
            ArrayList        a  = null;

            if (CurrentReference == "")
            {
                // Root
                a = pd.tabs;
            }
            else
            {
                PortalDefinition.Tab pt = pd.GetTab(CurrentReference);
                a = pt.tabs;
            }

            PortalDefinition.Tab t = (PortalDefinition.Tab)a[index];
            a.RemoveAt(index);
            a.Insert(index - 1, t);

            pd.Save();

            // Rebind
            BuildTree();
            SelectTab(CurrentReference);
        }
コード例 #21
0
        /// <summary>
        /// Nạp chồng Thủ tục khởi tạo các điều khiển con
        /// </summary>
        override protected void CreateChildControls()
        {
            // Lấy thông tin Tab hiện thời
            PortalDefinition.Tab tab = PortalDefinition.GetCurrentTab();
            if (tab == null)
            {
                return;
            }

            // Kiểm tra quyền của người sử dụng
            ChannelUsers objuser = new ChannelUsers();

            // Edit by Tqdat
            // Xu ly viec khong de Session Timeout la BienTapvien out ra khoi fan Admin
            //  - Neu bi Session TimeOut thi kiem tra xem Cookie co ton tai User va Pass hay ko
            //      + Neu Co thi Login lai de lay lai session
            //      + Neu Khong thi Redirect ra trang login.aspx

            //bool isHasViewRights = objuser.HasViewRights(Page.User, tab.roles);

            /*if (isHasViewRights == false)
             * {
             *  // Kiem tra xem co Cookie hay ko
             *  HttpCookie cookie = Request.Cookies["PortalUser"];
             *  if (cookie != null)
             *  {
             *      objuser.Login(cookie.Values["AC"].Trim(), cookie.Values["PW"].Trim());
             *      isHasViewRights = true;
             *  }
             * }*/

            if (objuser.HasViewRights(Page.User, tab.roles))
            {
                RenderColumns(tab, tab.Columns, DisplayRegion);
                if (IsAdmin)
                {
                    // Hiển thị vùng trắng của các cột rỗng
                    foreach (HtmlTableCell _objEmptyColumn in _arrAllEmptyColumn)
                    {
                        LiteralControl _ltrSpace = new LiteralControl();
                        _ltrSpace.Text = "&nbsp;";
                        _objEmptyColumn.Controls.Add(_ltrSpace);
                    }
                }
            }
            else
            {
                Cache  cache           = new Cache(HttpContext.Current.Application);
                string path            = HttpContext.Current.Request.Url.AbsolutePath.ToLower();
                string _strCacheKey    = Config.GetPortalUniqueCacheKey() + path + "_" + HttpContext.Current.User.Identity.Name;
                string _strCacheRawKey = Config.GetPortalUniqueCacheKey() + "_Raw" + HttpContext.Current.Request.RawUrl + "_" + HttpContext.Current.User.Identity.Name;
                cache[_strCacheKey]    = null;
                cache[_strCacheRawKey] = null;

                Session["NotPermission"] = "True";
                Session["lastPath"]      = HttpContext.Current.Request.RawUrl;
                Response.Redirect("/login.aspx");
            }
        }
コード例 #22
0
        protected void Page_Load(object sender, System.EventArgs e)
        {
            tree.Elements.Clear();

            PortalDefinition pd = PortalDefinition.Load();

            InternalBuildTree(PortalDefinition.CurrentTab.tabs, tree.Elements);
        }
コード例 #23
0
        protected void OnDelete(object sender, EventArgs args)
        {
            PortalDefinition.DeleteTab(CurrentReference);

            if (Delete != null)
            {
                Delete(this, new EventArgs());
            }
        }
コード例 #24
0
        private void LoadCategory()
        {
            PortalDefinition _objPortal = PortalDefinition.Load();

            ltrCurrentTemplateTabReference.Text = _objPortal.TemplateReference;
            foreach (PortalDefinition.Tab _objTab in _objPortal.tabs)
            {
                ShowTabItem(_objTab, drdTabsList);
            }
        }
コード例 #25
0
        private void ShowCurrentEditingColumn()
        {
            PortalDefinition pd = PortalDefinition.Load();

            PortalDefinition.Column _objCurrentColumn = pd.GetColumn(CurrentColumnReference);

            if (_objCurrentColumn != null)
            {
                EditColumn(_objCurrentColumn.ColumnReference);
            }
        }
コード例 #26
0
        /// <summary>
        /// Ham thuc hien luu cac response xuong html cache file
        /// </summary>
        protected void OnAddTab(object sender, EventArgs args)
        {
            PortalDefinition pd = PortalDefinition.Load();

            PortalDefinition.Tab t = PortalDefinition.Tab.Create();

            pd.GetTab(Request["TabRef"]).tabs.Add(t);

            pd.Save();

            Response.Redirect(Helper.GetEditTabLink(t.reference));
        }
コード例 #27
0
        /// <summary>
        /// Lưu các thiết lập của Module
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="args"></param>
        protected void OnSave(object sender, EventArgs args)
        {
            try
            {
                if (Page.IsValid)
                {
                    // Nạp cấu trúc Portal
                    PortalDefinition     pd = PortalDefinition.Load();
                    PortalDefinition.Tab t  = pd.GetTab(CurrentTabReference);
                    // Truy xuất đến cấu trúc Module hiện thời
                    PortalDefinition.Module m = t.GetModule(CurrentReference);

                    // Thay đổi các thông số tương ứng
                    m.reference = txtReference.Text;
                    m.title     = HttpUtility.HtmlEncode(txtTitle.Text);
                    m.type      = cboPath.SelectedValue + "/" + cbType.SelectedItem.Value;
                    m.roles     = RolesCtrl.GetData();
                    m.CacheTime = Convert.ToInt32(txtCacheTime.Text);

                    // Lưu các thông số và cấu trúc
                    pd.Save();

                    // Lưu các thông số khi thực thi của module
                    m.LoadModuleSettings();
                    m.LoadRuntimeProperties();
                    for (int _intPropertyCount = 0; _intPropertyCount < rptRuntimeProperties.Items.Count; _intPropertyCount++)
                    {
                        HtmlInputHidden _hihPropertyName   = rptRuntimeProperties.Items[_intPropertyCount].FindControl("lblPropertyName") as HtmlInputHidden;
                        TextBox         _txtPropertyValue  = rptRuntimeProperties.Items[_intPropertyCount].FindControl("txtPropertyValue") as TextBox;
                        DropDownList    _drdAvaiableValues = rptRuntimeProperties.Items[_intPropertyCount].FindControl("drdAvaiableValues") as DropDownList;

                        if (_hihPropertyName != null && _txtPropertyValue != null)
                        {
                            string _strPropertyValue = _txtPropertyValue.Visible ? _txtPropertyValue.Text : _drdAvaiableValues.SelectedValue;
                            m.moduleRuntimeSettings.SetRuntimePropertyValue(true, _hihPropertyName.Value, _strPropertyValue);
                        }
                    }
                    m.SaveRuntimeSettings();

                    CurrentReference = m.reference;

                    // Phát sinh sự kiện lưu thông tin thành công
                    if (Save != null)
                    {
                        Save(this, new EventArgs());
                    }
                }
            }
            catch (Exception e)
            {
                lbError.Text = e.Message;
            }
        }
コード例 #28
0
        public void LoadData(string _strColumnRef)
        {
            PortalDefinition _objPortal = PortalDefinition.Load();

            PortalDefinition.Column _objColumn = _objPortal.GetColumn(_strColumnRef);

            if (_objColumn != null)
            {
                moduleList = _objColumn.ModuleList;
                Bind();
            }
        }
コード例 #29
0
        protected void OnDelete(object sender, EventArgs args)
        {
            PortalDefinition pd = PortalDefinition.Load();

            PortalDefinition.Tab t = pd.GetTab(CurrentReference);
            PortalDefinition.DeleteTab(CurrentReference);

            if (Delete != null)
            {
                Delete(this, t);
            }
        }
コード例 #30
0
        internal void BuildTree()
        {
            PortalDefinition pd = PortalDefinition.Load();

            tree.Elements[0].Elements.Clear();

            InternalBuildTree(pd.tabs, tree.Elements[0]);

            tree.Elements[0].Expand();
            tree.Elements[0].Text = "<a class=\"LinkButton\" href=" +
                                    Page.GetPostBackClientHyperlink(this, "") +
                                    ">Portal</a>";
        }
コード例 #31
0
		override public void LoadData(PortalDefinition.Tab t)
		{
			CurrentTab = t;

			txtTitle.Text = HttpUtility.HtmlDecode(t.title);
			txtReference.Text = CurrentTab.reference;
      txtImagePathI.Text = HttpUtility.HtmlDecode(t.imgPathInactive);
      txtImagePathA.Text = HttpUtility.HtmlDecode(t.imgPathActive);

			RolesCtrl.LoadData(t.roles);
			ModuleListCtrl_Left.LoadData(t.left);
			ModuleListCtrl_Middle.LoadData(t.middle);
			ModuleListCtrl_Right.LoadData(t.right);
		}
コード例 #32
0
		protected void OnSave(object sender, PortalDefinition.Tab t)
		{
			BuildTree();
		}
コード例 #33
0
ファイル: Tab.cs プロジェクト: dineshkummarc/Portal-V2.8.1
 abstract public void LoadData(PortalDefinition.Tab t);
コード例 #34
0
		protected void OnCancel(object sender, PortalDefinition.Tab t)
		{
		}
コード例 #35
0
 public void LoadData(PortalDefinition.Tab tab)
 {
     LoadData(tab.tabs);
 }
コード例 #36
0
 public void LoadData(PortalDefinition pd)
 {
     LoadData(pd.tabs);
 }
コード例 #37
0
		protected void OnDelete(object sender, PortalDefinition.Tab t)
		{
			BuildTree();
			SelectTab(CurrentParentReference);
		}