コード例 #1
0
 protected void btnSubmit_Click(object sender, EventArgs e)
 {
     try
     {
         if (PH_DayofPasswrdExp.PH_DayofExp_Insert(AppCode.strConnDB, int.Parse(txtDayofExpired.Text)) > 0)
         {
             lblErr.Text = "Date of Expired has changed! ";
         }
         Session[ConfigurationManager.AppSettings["PH_Day_PasswordExpired_Session"]] = txtDayofExpired.Text;
     }
     catch (Exception ex)
     {
         lblErr.Text = ex.Message;
         PH_ExceptionManager.WriteError(ex.Message);
     }
 }
コード例 #2
0
 public static int GetDayofPasswdExp(System.Web.UI.Page page)
 {
     try
     {
         return(page.Session[ConfigurationManager.AppSettings["PH_Day_PasswordExpired_Session"]] == null?int.Parse(PH_DayofPasswrdExp.PH_DayOfExp_Sel(AppCode.strConnDB).ToString()) : int.Parse(page.Session[ConfigurationManager.AppSettings["PH_Day_PasswordExpired_Session"]].ToString()));
     }
     catch (Exception ex)
     {
         throw new Exception("GetDayofPasswdExp >>" + ex.Message);
     }
 }