protected void ctlIO_TextChanged(object sender, EventArgs e) { if (NotifyPopupResult != null) { if (!string.IsNullOrEmpty(ctlReturnAction.Value)) { long ioId = UIHelper.ParseLong(ctlReturnValue.Value); DbInternalOrder selectedIO = ScgDbQueryProvider.DbIOQuery.FindByIdentity(ioId); if (DateTime.Now > selectedIO.ExpireDate) { ModalPopupExtender1ShowMessage.Show(); } else { NotifyPopupResult(this, ctlReturnAction.Value, ctlReturnValue.Value); } ctlReturnAction.Value = string.Empty; } else { NotifyPopupResult(this, "textchanged", ctlIO.Text); } } }
private void GetAuthentication() { string signinStatus = UserEngine.CheckSignIn(ctlUserName.Text.Trim(), ctlPassword.Text.Trim()); if (signinStatus.Equals("PasswordExpired") || signinStatus.Equals("RequiredChangePassword")) { //ChangePassword.ShowPopup("Login", true, ctlUserName.Text.Trim()); ChangePassword ctlChangePassword = LoadPopup <ChangePassword>("~/UserControls/ChangePassword.ascx", ctlPopUpUpdatePanel); ctlChangePassword.ShowPopup("Login", true, ctlUserName.Text.Trim()); } else if (signinStatus.Equals("success")) { bool UseECC = ScgDbQueryProvider.DbCompanyQuery.getUseECCOfComOfUserByUserName(ctlUserName.Text.Trim()); if (UseECC) { string url = HttpContext.Current.Request.Url.ToString(); if (ParameterServices.EnableSSLOnLoginPage && IsHttps()) { url = url.Replace(Uri.UriSchemeHttps, Uri.UriSchemeHttp); } if (string.IsNullOrEmpty(WFID)) { Response.Redirect(url.Replace(HttpContext.Current.Request.RawUrl, ResolveUrl("~/Menu.aspx")), true); } else { Response.Redirect(url.Replace(HttpContext.Current.Request.RawUrl, ResolveUrl("~/Forms/SCG.eAccounting/Programs/DocumentView.aspx?wfid=" + WFID)), true); } } else { HttpCookie cookieUserToken = System.Web.HttpContext.Current.Request.Cookies["expUserToken"]; if (cookieUserToken != null) { System.Web.HttpContext.Current.Request.Cookies.Remove("expUserToken"); } HttpCookie cookieUserName = System.Web.HttpContext.Current.Request.Cookies["expUserName"]; if (cookieUserName != null) { System.Web.HttpContext.Current.Request.Cookies.Remove("expUserName"); } string token = SuUserLoginTokenService.InsertToken(); string url = ParameterServices.eXpenseUrl; System.Web.HttpContext.Current.Response.Cookies.Add(new HttpCookie("expUserToken", token)); System.Web.HttpContext.Current.Response.Cookies.Add(new HttpCookie("expUserName", UserAccount.UserName)); //Response.Redirect(url + "?username="******"&token=" + token); Response.Redirect(url); } } else { ctlErrorValidationLabel.Text = GetMessage(signinStatus); ModalPopupExtender1ShowMessage.Show(); } }
protected void ctlClose_Click(object sender, EventArgs e) { ModalPopupExtender1ShowMessage.Hide(); }