/// <summary> /// btnUpdate_Click /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void btnUpdate_Click(object sender, EventArgs e) { EyouSoft.Model.SysStructure.MWebmasterInfo webmasterInfo = new EyouSoft.Model.SysStructure.MWebmasterInfo(); EyouSoft.SSOComponent.Entity.MasterUserInfo loginUserInfo = Utils.GetWebmaster(); if (loginUserInfo != null) { webmasterInfo.UserId = loginUserInfo.UserId; webmasterInfo.Username = EyouSoft.Common.Utils.InputText(this.txtUsername.Value); webmasterInfo.Password = new EyouSoft.Model.CompanyStructure.PassWord(); webmasterInfo.Password.NoEncryptPassword = this.txtPassword.Value; if (string.IsNullOrEmpty(webmasterInfo.Username)) { this.RegisterAlertAndRedirectScript("登录账号不能为空", ""); return; } EyouSoft.BLL.SysStructure.BSys bll = new EyouSoft.BLL.SysStructure.BSys(); if (bll.UpdateWebmasterInfo(webmasterInfo)) { this.RegisterAlertAndRedirectScript("账号信息更新成功", ""); } else { this.RegisterAlertAndRedirectScript("账号信息更新失败", ""); } } }
/// <summary> /// init self info /// </summary> private void InitSelfInfo() { EyouSoft.SSOComponent.Entity.MasterUserInfo loginUserInfo = Utils.GetWebmaster(); if (loginUserInfo != null) { this.txtUsername.Value = loginUserInfo.Username; } }
/// <summary> /// set login webmaster /// </summary> /// <param name="webmasterInfo"></param> public static void SetWebmaster(EyouSoft.SSOComponent.Entity.MasterUserInfo webmasterInfo) { //HttpContext.Current.Session[Utils.WebmasterLoginSessionName] = webmasterInfo; EyouSoft.Security.Membership.UserProvider provider = new EyouSoft.Security.Membership.UserProvider(); string token = EyouSoft.Security.Membership.UserProvider.GenerateSSOToken(webmasterInfo.Username); EyouSoft.Security.Membership.UserProvider.GenerateYunYingUserLoginCookies(token, webmasterInfo.Username); }
/// <summary> /// 审核 /// </summary> private void Cashier() { string pid = EyouSoft.Common.Utils.InputText(Request.QueryString["pid"]); string status = EyouSoft.Common.Utils.InputText(Request.QueryString["status"]); decimal amount = EyouSoft.Common.Utils.GetDecimal(Request.QueryString["amount"], 0); string webmasterRealname = EyouSoft.Common.Utils.InputText(Request.QueryString["wn"]); if (string.IsNullOrEmpty(pid)) { ResponseClearAndWrite("0"); } if (string.IsNullOrEmpty(webmasterRealname)) { ResponseClearAndWrite("-1"); } if (amount < 0) { ResponseClearAndWrite("-2"); } EyouSoft.BLL.SMSStructure.Account bll = new EyouSoft.BLL.SMSStructure.Account(); EyouSoft.Model.SMSStructure.PayMoneyInfo info = new EyouSoft.Model.SMSStructure.PayMoneyInfo(); EyouSoft.SSOComponent.Entity.MasterUserInfo loginUserInfo = Utils.GetWebmaster(); info.CheckOperatorName = webmasterRealname; info.CheckTime = DateTime.Now; info.CheckUserName = loginUserInfo.Username; info.ID = pid; info.IsChecked = status == "true" ? 1 : 2; info.UseMoney = amount; if (info.IsChecked != 1) { info.UseMoney = 0; } if (bll.CheckPayMoney(info)) { ResponseClearAndWrite("1"); } else { ResponseClearAndWrite("-3"); } }
protected void Page_Load(object sender, EventArgs e) { if (EyouSoft.Common.Utils.GetInt(Request.QueryString["cashier"], 0) == 1)//审核操作 { this.Cashier(); } else { EyouSoft.SSOComponent.Entity.MasterUserInfo loginUserInfo = Utils.GetWebmaster(); if (loginUserInfo != null) { WebmasterRealname = loginUserInfo.Realname; } this.InitRecharge(); } }
/// <summary> /// btnLogin click event /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void btnLogin_Click(object sender, EventArgs e) { StringBuilder error = new StringBuilder(); var webmasterInfo = new EyouSoft.SSOComponent.Entity.MasterUserInfo() { Username = Request.Form["t_u"] }; webmasterInfo.PassWordInfo.NoEncryptPassword = Request.Form["t_p"]; if (string.IsNullOrEmpty(webmasterInfo.Username)) { error.Append("Please enter your login information.\\n"); } if (string.IsNullOrEmpty(webmasterInfo.PassWordInfo.NoEncryptPassword)) { error.Append("Please enter a password."); } if (!string.IsNullOrEmpty(error.ToString())) { this.RegisterAlertScript(error.ToString()); return; } EyouSoft.Security.Membership.UserProvider userProvider = new EyouSoft.Security.Membership.UserProvider(); webmasterInfo = userProvider.MasterLogin(webmasterInfo.Username, webmasterInfo.PassWordInfo.MD5Password); if (webmasterInfo != null) { Utils.SetWebmaster(webmasterInfo); Response.Redirect("default.aspx"); } else { this.RegisterAlertScript("Please enter the correct password."); return; } }