// Action Method(s)
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                MultiEntryDisallow = false;
                QuaintSessionManager session = new QuaintSessionManager();
                UserInfo    = Convert.ToString(session.ActiveUserInformation);
                StationInfo = Convert.ToString(session.ActiveStationInformation);
                LoadLocation();

                if (Request.QueryString["Id"] != null)
                {
                    this.ModelId = Convert.ToInt32(QuaintSecurityManager.DecryptUrl(Convert.ToString(Request.QueryString["Id"])));
                    Edit(this.ModelId);
                    lblTitleStatus.Text        = "Update";
                    btnSave.Text               = "Update";
                    btnSaveAndContinue.Text    = "Update & Continue";
                    btnSaveAndContinue.Visible = false;
                }
                else
                {
                    GenerateCode();
                }
            }
        }
        // Action Method(s)
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                AccountLogout();
                LoadUser();

                string redirectUrl = "~/Login.aspx?Ref=member";
                if (Request.QueryString["Redirect"] != null)
                {
                    redirectUrl = this.RedirectUrl = QuaintSecurityManager.DecryptUrl(Convert.ToString(Request.QueryString["Redirect"]));
                }

                if (Request.QueryString["Ref"] != null)
                {
                    if (Convert.ToString(Request.QueryString["Ref"]).ToLower() == "logout")
                    {
                        AccountLogout();
                        Response.Redirect(redirectUrl);
                    }
                    else if (Convert.ToString(Request.QueryString["Ref"]).ToLower() == "admin")
                    {
                        this.RedirectUrl = "~/Account/Dashboard.aspx";
                    }
                }
            }
        }
Exemplo n.º 3
0
        // Action Method(s)
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                //MultiEntryDisallow = false;
                QuaintSessionManager session = new QuaintSessionManager();
                UserInfo    = Convert.ToString(session.ActiveUserInformation);
                StationInfo = Convert.ToString(session.ActiveStationInformation);
                GenerateCode();

                if (Request.QueryString["Id"] != null)
                {
                    this.ModelId = Convert.ToInt32(QuaintSecurityManager.DecryptUrl(Convert.ToString(Request.QueryString["Id"])));
                }
            }
        }