예제 #1
0
 protected void Page_Load(object sender, EventArgs e)
 {
     try {
         if (!IsPostBack)
         {
             txtDayofExpired.Text = AppCode.GetDayofPasswdExp(Page).ToString();
         }
     }
     catch (Exception ex)
     {
         lblErr.Text = ex.Message;
         PH_ExceptionManager.WriteError(ex.Message);
     }
 }
예제 #2
0
 protected void Page_Load(object sender, EventArgs e)
 {
     try {
         if (!IsPostBack)
         {
             txtPasswordExpired.Text = DateTime.Now.AddDays(AppCode.GetDayofPasswdExp(Page)).ToString("dd/MM/yyyy");
         }
     }
     catch (Exception ex)
     {
         lblErr.Text = ex.Message;
         PH_ExceptionManager.WriteError(ex.Message);
     }
 }
예제 #3
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                try
                {
                    /*eStatus = new PHCore_Status();
                     * string strRoleId = PH_EncrptHelper.MD5Decryp(PH_Utility.GetCookie(Request, ConfigurationManager.AppSettings["PH_RoleUserCookie"]));
                     * if( strRoleId != "" )
                     * eStatus.RoleId = (PHCore_Status.RoleID)Enum.Parse(typeof(PHCore_Status.RoleID), strRoleId, true);*/

                    #region Check Type
                    string[] type = (Request["type"] != null) ? Request["type"].Split(',') : null;
                    if (type != null && type[0] == PHCore_Status.RoleID.A1.ToString())
                    {
                        divContact.Visible = false;
                        divHaulier.Visible = false;
                        divVender.Visible  = false;
                    }
                    else if (type != null && type[0] == PHCore_Status.RoleID.HL.ToString())
                    {
                        divVender.Visible = false;
                        divRole.Visible   = false;
                    }
                    else if (type != null && type[0] == PHCore_Status.RoleID.VD.ToString())
                    {
                        divHaulier.Visible = false;
                        divRole.Visible    = false;
                    }
                    else
                    {
                        Response.Redirect("logout.aspx", false);
                    }
                    #endregion


                    lblHeader.Text         = (type != null) ? ConfigurationManager.AppSettings["PH_AddNew_" + type[0]] : "";
                    txtPasswrdExpried.Text = DateTime.Now.AddDays(AppCode.GetDayofPasswdExp(Page)).ToString(ConfigurationManager.AppSettings["PH_Date_format"]);
                }

                catch (Exception ex)
                {
                    lblError.Text = ex.Message;
                    PH_ExceptionManager.WriteError(ex.Message);
                }
            }
        }