Exemplo n.º 1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            DefineFolderId();

            if (!Page.IsPostBack)
            {
                if (!ListManager.CanReadFolder(_folderId))
                {
                    throw new AccessDeniedException();
                }

                if (pc["Lists_FV_Sort"] == null)
                {
                    pc["Lists_FV_Sort"] = "sortName";
                }

                if (Request["Assign"] != null && Request["Assign"] == "1")
                {
                    string listClass = "List_" + Request["ListId"];
                    Dictionary <string, string> dic = new Dictionary <string, string>();
                    dic.Add("ClassName", listClass);
                    CommandParameters cp = new CommandParameters("MC_ListApp_Security", dic);
                    CommandManager    cm = CommandManager.GetCurrent(this.Page);
                    ClientScript.RegisterStartupScript(this.Page, this.GetType(), Guid.NewGuid().ToString("N"),
                                                       cm.AddCommand("", "", "ListInfoList", cp), true);
                }
            }
            BindToolBar();

            ScriptManager.GetCurrent(this.Page).RegisterPostBackControl(btnRefresh);
        }
Exemplo n.º 2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack && ListFolderId > 0 && !ListManager.CanReadFolder(ListFolderId))
            {
                throw new AccessDeniedException();
            }

            if (!IsPostBack)
            {
                BindLists();
                Page.SetFocus(ListNameTextBox);

                MainBlockHeader.AddLink("~/images/IbnFramework/cancel.gif",
                                        GetGlobalResourceObject("IbnFramework.GlobalMetaInfo", "Back").ToString(),
                                        String.Format(CultureInfo.InvariantCulture, "~/Apps/ListApp/Pages/ListInfoList.aspx?ListFolderId={0}", ListFolderId));
            }

            cbWithData.Text = CHelper.GetResFileString("{IbnFramework.ListInfo:tWithData}");
            CancelButton.Attributes.Add("onclick", String.Format(CultureInfo.InvariantCulture, "window.location.href='ListInfoList.aspx?ListFolderId={0}';return false;", ListFolderId));
        }