private void Page_Load(object sender, System.EventArgs e)
        {
            Utils.SetPageTitle(Page, L10n.Term("EditCustomFields.LBL_LIST_FORM_TITLE"));
            // 06/04/2006 Paul.  Visibility is already controlled by the ASPX page, but it is probably a good idea to skip the load.
            this.Visible = SplendidCRM.Security.IS_ADMIN;
            if (!this.Visible)
            {
                return;
            }

            // 06/09/2006 Paul.  Remove data binding in the user controls.  Binding is required, but only do so in the ASPX pages.
            //Page.DataBind();
            ctlHeader = Page.FindControl("ctlHeader") as _controls.Header;
            if (ctlHeader != null)
            {
                ctlNewRecord = ctlHeader.FindControl("ctlNewRecord") as NewRecord;
            }
            if (IsPostBack)
            {
                sMODULE_NAME = ctlSearch.MODULE_NAME;
            }
            else
            {
                sMODULE_NAME = Sql.ToString(Request["MODULE_NAME"]);
                // 01/05/2006 Paul.  Fix Form Action so that Query String parameters will not continue to get passed around.
                if (!Sql.IsEmptyString(sMODULE_NAME))
                {
                    Page.RegisterClientScriptBlock("frmRedirect", "<script>document.forms[0].action='default.aspx';</script>");
                }
            }

            grdMain.Visible = IsPostBack || !Sql.IsEmptyString(sMODULE_NAME);
            FIELDS_META_DATA_Bind();
        }
Пример #2
0
        private void Page_Load(object sender, System.EventArgs e)
        {
            Utils.SetPageTitle(Page, L10n.Term("EditCustomFields.LBL_LIST_FORM_TITLE"));
            // 06/04/2006 Paul.  Visibility is already controlled by the ASPX page, but it is probably a good idea to skip the load.
            this.Visible = SplendidCRM.Security.IS_ADMIN;
            if ( !this.Visible )
                return;

            // 06/09/2006 Paul.  Remove data binding in the user controls.  Binding is required, but only do so in the ASPX pages.
            //Page.DataBind();
            ctlHeader = Page.FindControl("ctlHeader") as _controls.Header;
            if ( ctlHeader != null )
            {
                ctlNewRecord = ctlHeader.FindControl("ctlNewRecord") as NewRecord;
            }
            if ( IsPostBack )
            {
                sMODULE_NAME = ctlSearch.MODULE_NAME;
            }
            else
            {
                sMODULE_NAME = Sql.ToString(Request["MODULE_NAME"]);
                // 01/05/2006 Paul.  Fix Form Action so that Query String parameters will not continue to get passed around.
                if ( !Sql.IsEmptyString(sMODULE_NAME) )
                    Page.RegisterClientScriptBlock("frmRedirect", "<script>document.forms[0].action='default.aspx';</script>");
            }

            grdMain.Visible = IsPostBack || !Sql.IsEmptyString(sMODULE_NAME);
            FIELDS_META_DATA_Bind();
        }