コード例 #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            iLoginClient objService = new iLoginClient();

            try
            {
                CustomProfile profile = CustomProfile.GetProfile();
                objService.ClearTempDataBySessionID(Session.SessionID, profile.Personal.UserID.ToString(), profile.DBConnection._constr);
                Session.RemoveAll();
                Session.Abandon();
            }
            catch { }
            finally { objService.Close(); }
        }
コード例 #2
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (Session["Lang"] == "")
     {
         Session["Lang"] = Request.UserLanguages[0];
     }
     loadstring();
     txtConfirmNewPassword.Attributes.Add("onblur", "CheckPassword();");
     if (!IsPostBack)
     {
         CustomProfile profile = CustomProfile.GetProfile();
         lblLoginName.Text = profile.UserName;
     }
 }
コード例 #3
0
        protected void Page_PreInit(Object sender, EventArgs e)
        {
            CustomProfile profile = CustomProfile.GetProfile();

            if (profile.Personal.Theme == null || profile.Personal.Theme == string.Empty)
            {
                Page.Theme = "Blue";
            }
            else
            {
                Page.Theme = profile.Personal.Theme;
            }

            //var onBlurScript = Page.ClientScript.GetPostBackEventReference(txtConfirmNewPassword, "OnBlur");
            //txtConfirmNewPassword.Attributes.Add("onblur", onBlurScript);
        }
コード例 #4
0
        public static void ErrorHandling(Exception ex, string header, string errorCause)
        {
            CustomProfile profile = CustomProfile.GetProfile();

            BrilliantWMS.LoginService.iLoginClient log = new BrilliantWMS.LoginService.iLoginClient();
            ErrorLog err = new ErrorLog();

            err.Data    = ex.Data.ToString();
            err.Source  = ex.Source.ToString();
            err.Message = ex.Message.ToString() + "/" + header + "/" + errorCause;
            err.GetType = ex.GetType().ToString();
            err.UserID  = profile.Personal.UserID.ToString();
            if (profile.DBConnection._constr != null)
            {
                log.ErrorTracking1(err.Data, err.Source, "Error", err.Message, errorCause, DateTime.Now, err.UserID, profile.DBConnection._constr);
                //log.ErrorTracking(err, profile.DBConnection._constr);
                //switch (ex.Message)
                //{

                //    case "Input string was not in a correct format.":
                //        {
                //            WebMsgBox.MsgBox.Show(ex.Message + "Please fill currect Informations");
                //            break;

                //        }
                //    case "An error occurred while updating the entries. See the inner exception for details.":
                //        {
                //            WebMsgBox.MsgBox.Show(ex.Message);
                //            break;
                //        }
                //    default:
                //        {
                //            WebMsgBox.MsgBox.Show("An unexpected error has occured");
                //            break;
                //        }
                //}
            }
            else
            {
                WebMsgBox.MsgBox.Show("An unexpected error has occured");
            }
        }