protected void Page_Load(object sender, EventArgs e)
    {
        if (Session["COMPANY_CODE"].ToString() == "0")
        {
            FormView1.ChangeMode(FormViewMode.Insert);
            ((Label)FormView1.Row.FindControl("Label_HEAD")).Text = "Customer Configuration Link";
            if (!IsPostBack)
            {
            }
        }
        else
        {
            //((Label)FormView1.FindControl("Label_HEAD")).Text = "Customer Configuration : ";// +Session["COMPANY_CODE"].ToString() + "";

            // / " + Session["CMN_Currency_CurrencyName"].ToString();
            //if (IsPostBack == false)
            //{
            //    ((EO.Web.ToolBar)FormView1.FindControl("DisplayToolBar")).Items[0].Disabled = false;
            //    ((EO.Web.ToolBar)FormView1.FindControl("DisplayToolBar")).Items[2].Disabled = false;
            //    ((EO.Web.ToolBar)FormView1.FindControl("DisplayToolBar")).Items[4].Disabled = false;
            //}
            if (IsPostBack == false)
            {
                string RGS_SUPPORT;
                RGS_SUPPORT = Session["RGS"].ToString();
                //if (RGS_SUPPORT.Substring(2, 1) == "0")
                //{ ((EO.Web.ToolBar)FormView1.FindControl("DisplayToolBar")).Items[0].Disabled = false; /*Edit*/}
                //else if (RGS_SUPPORT.Substring(2, 1) == "1")
                //{ ((EO.Web.ToolBar)FormView1.FindControl("DisplayToolBar")).Items[0].Disabled = false; /*Edit*/}
                //if (RGS_SUPPORT.Substring(4, 1) == "0")
                //{
                //    ((EO.Web.ToolBar)FormView1.FindControl("DisplayToolBar")).Items[4].Disabled = true; /*Authorize / Unauthorize*/
                //    ((EO.Web.ToolBar)FormView1.FindControl("DisplayToolBar")).Items[2].Disabled = false;
                //}
                //else if (RGS_SUPPORT.Substring(4, 1) == "1")
                //{
                //    ((EO.Web.ToolBar)FormView1.FindControl("DisplayToolBar")).Items[4].Disabled = false; /*Authorize / Unauthorize*/
                //    ((EO.Web.ToolBar)FormView1.FindControl("DisplayToolBar")).Items[2].Disabled = false;
                //}
                if (RGS_SUPPORT.Substring(2, 1) == "0")
                {
                    if (FormView1.CurrentMode == FormViewMode.ReadOnly)
                    {
                        ((Button)FormView1.FindControl("BTN_EDIT")).Enabled = false; /*Edit*/
                    }
                }
                else if (RGS_SUPPORT.Substring(2, 1) == "1")
                {
                    if (FormView1.CurrentMode == FormViewMode.ReadOnly)
                    {
                        ((Button)FormView1.FindControl("BTN_EDIT")).Enabled = true; /*Edit*/
                    }
                }

                if (RGS_SUPPORT.Substring(4, 1) == "0")
                {
                    // Master.Authorize_Center_False();
                }
                else if (RGS_SUPPORT.Substring(4, 1) == "1")
                {
                    //  Master.Authorize_Center_True();
                }
            }
        }
    }