public void ProcessRequest(HttpContext context) { context.Response.ContentType = "text/plain"; string action = context.Request.Form["action"]; string res = ""; switch (action) { case "login": string user = context.Request.Form["user"]; string password = context.Request.Form["password"]; int userid = new ZhongLi.BLL.User_Managers().checkuser(user, password); if (userid == 0) { res = "2"; } else { //context.Session["UserID"] = userid; User_Managers usermng = new ZhongLi.BLL.User_Managers().GetModel(userid); Roles role = new ZhongLi.BLL.Roles().GetModel(usermng.RoleId); Utils.WriteCookie("role", role.ColValue); Utils.WriteCookie("UserID", userid + ""); webHelper.addLog("登录系统"); res = "1"; } break; } context.Response.Write(res); }
protected void Page_Load(object sender, EventArgs e) { role = Utils.GetCookie("role"); int UserID = Convert.ToInt32(Utils.GetCookie("UserID")); User_Managers user = new ZhongLi.BLL.User_Managers().GetModel(UserID); ltlUserName.Text = user.UserName; }
protected void Repeater1_ItemCommand(object source, RepeaterCommandEventArgs e) { if (e.CommandName.Equals("payFail")) { int ID = Convert.ToInt32(e.CommandArgument); int adminid = Convert.ToInt32(Utils.GetCookie("UserID")); string adminname = new ZhongLi.BLL.User_Managers().GetModel(adminid).RealName; string realname = ((Literal)e.Item.FindControl("ltlrealname")).Text; ZhongLi.Model.PresentApplication p = bll.GetModel(ID); if (bll.PayFail(adminid, adminname, ID, p.UserType.Value, p.UserID.Value, p.Money.Value)) { //推送通知 PushClass push = new PushClass(); push.title = "优青通知:"; push.content = "您的提现申请支付失败了,资金已退回到您的钱包,请检查您提现时填的资料是否正确"; push.type = "1"; push.platform = "0"; push.groupName = ""; if (p.UserType.Value == 0)//用户类型为人才 { push.userIds = "p" + p.UserID; } else { push.userIds = "s" + p.UserID; } push.ts_01(); webHelper.addLog(adminname + "设置" + realname + "的提现申请支付失败"); Page.ClientScript.RegisterStartupScript(Page.GetType(), "set", "<script>window.onload=showmsg('审核提现申请','操作成功!','',1)</script>"); databind(); } else { Page.ClientScript.RegisterStartupScript(Page.GetType(), "set", "<script>window.onload=showmsg('审核提现申请','操作失败!','',2)</script>"); } } }
protected void Repeater1_ItemCommand(object source, RepeaterCommandEventArgs e) { int ID = Convert.ToInt32(e.CommandArgument); int adminid = Convert.ToInt32(Utils.GetCookie("UserID")); string adminname = new ZhongLi.BLL.User_Managers().GetModel(adminid).RealName; string realname = ((Literal)e.Item.FindControl("ltlrealname")).Text; ZhongLi.Model.PresentApplication p = bll.GetModel(ID); if (e.CommandName.Equals("auth")) { if (bll.authPass(adminid, adminname, ID, p.UserType.Value, p.UserID.Value)) { //推送通知 string UserID = ""; if (p.UserType.Value == 0) //用户类型为人才 { UserID = "p" + p.UserID; } else { UserID = "s" + p.UserID; } JPushApiExample.ALERT = "您的提现申请审核通过啦,优青将会在3个工作日之内将体现金额支付到您的账户"; JPushApiExample.MSG_CONTENT = "您的提现申请审核通过啦,优青将会在3个工作日之内将体现金额支付到您的账户"; PushPayload pushsms = JPushApiExample.PushObject_ios_audienceMore_messageWithExtras(UserID, "Present"); JPushApiExample.push(pushsms); webHelper.addLog(adminname + "通过了:" + realname + "的提现申请"); Page.ClientScript.RegisterStartupScript(Page.GetType(), "set", "<script>window.onload=showmsg('审核提现申请','操作成功!','',1)</script>"); databind(); } else { Page.ClientScript.RegisterStartupScript(Page.GetType(), "set", "<script>window.onload=showmsg('审核提现申请','操作失败!','',2)</script>"); } } if (e.CommandName.Equals("noauth")) { if (bll.noauthPass(adminid, adminname, ID, p.UserType.Value, p.UserID.Value)) { //推送通知 //推送通知 string UserID = ""; if (p.UserType.Value == 0) //用户类型为人才 { UserID = "p" + p.UserID; } else { UserID = "s" + p.UserID; } JPushApiExample.ALERT = "您的提现申请没有通过审核"; JPushApiExample.MSG_CONTENT = "您的提现申请没有通过审核"; PushPayload pushsms = JPushApiExample.PushObject_ios_audienceMore_messageWithExtras(UserID, "Present"); JPushApiExample.push(pushsms); webHelper.addLog(adminname + "没通过:" + realname + "的提现申请"); Page.ClientScript.RegisterStartupScript(Page.GetType(), "set", "<script>window.onload=showmsg('审核提现申请','操作成功!','',1)</script>"); databind(); } else { Page.ClientScript.RegisterStartupScript(Page.GetType(), "set", "<script>window.onload=showmsg('审核提现申请','操作失败!','',2)</script>"); } } }