コード例 #1
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (Session[Constants.SES_USER_CONFIG] != null)
     {
         if (!Page.IsPostBack)
         {
             InitializeData();
             //This is for Page Permission
             CheckPermission chkPer  = new CheckPermission();
             Config          oConfig = (Config)Session[Constants.SES_USER_CONFIG];
             if (!chkPer.CheckPagePermission((Control)this.Page, oConfig, (int)Constants.PAGEINDEX_CLAIM.COMMISSION))
             {
                 Response.Redirect(Constants.PAGE_ERROR, false);
             }
             //End Of Page Permission
         }
     }
     else
     {
         Response.Redirect(Constants.PAGE_LOGIN, false);
     }
 }
コード例 #2
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (Session[Constants.SES_USER_CONFIG] != null)
     {
         if (!Page.IsPostBack)
         {
             Util.InvalidateSession();
             InitializeData();
             CheckPermission chkPer  = new CheckPermission();
             Config          oConfig = (Config)Session[Constants.SES_USER_CONFIG];
             if (!chkPer.CheckPagePermission((Control)this.Page, oConfig, (int)Constants.PAGEINDEX_TRANS.SP_ISSUE))
             {
                 Response.Redirect(Constants.PAGE_ERROR, false);
             }
             //End Of Page Permission
         }
     }
     else
     {
         Response.Redirect(Constants.PAGE_LOGIN, false);
     }
 }
コード例 #3
0
        protected void Page_Load(object sender, EventArgs e)
        {
            try
            {
                ScriptManager sm;
                sm = (ScriptManager)this.Master.FindControl("ToolkitScriptManager1");
                sm.AsyncPostBackTimeout = 96000;

                if (!IsPostBack)
                {
                    Util.InvalidateSession();

                    if (Session["ConStr"] == null)
                    {
                        Session["ConStr"] = ConfigurationManager.ConnectionStrings["SPMSConnectionString"].ConnectionString;
                    }
                    //This is for Page Permission
                    CheckPermission chkPer  = new CheckPermission();
                    Config          oConfig = (Config)Session[Constants.SES_USER_CONFIG];
                    if (!chkPer.CheckPagePermission((Control)this.Page, oConfig, (int)Constants.PAGEINDEX_UTILITY.DOWNLOAD_EBBS_CUSTOMER))
                    {
                        Response.Redirect(Constants.PAGE_ERROR, false);
                    }
                    //End Of Page Permission


                    //this.LoadCombo();
                    this.SetDate();
                    this.ResetStatus();
                }
                this.PrepareImportHistory();
            }
            catch (Exception ex)
            {
                lblMessage.Text = ex.Message;
            }
        }