private void ProcessAddAmountApply(HttpContext context) { context.Response.ContentType = "text/json"; string msg = ""; if (this.CheckAddAmountApply(context, ref msg)) { string str2 = context.Request["account"].Trim(); decimal num = decimal.Parse(context.Request["applymoney"].Trim()); int result = 0; int.TryParse(context.Request["requesttype"].Trim(), out result); string str3 = context.Request["remark"].Trim(); string str4 = context.Request["realname"].Trim(); string str5 = context.Request["bankname"].Trim(); MemberAmountRequestInfo applyInfo = new MemberAmountRequestInfo(); MemberInfo currentMember = MemberProcessor.GetCurrentMember(); applyInfo.UserId = currentMember.UserId; applyInfo.UserName = currentMember.UserName; applyInfo.RequestTime = DateTime.Now; applyInfo.Amount = num; applyInfo.RequestType = (RequesType)result; applyInfo.AccountCode = str2; switch (result) { case 3: case 0: applyInfo.AccountCode = currentMember.OpenId; break; } string userName = string.IsNullOrEmpty(str4) ? currentMember.RealName : str4; if (string.IsNullOrEmpty(userName)) { userName = currentMember.UserName; } if (string.IsNullOrEmpty(userName)) { userName = "******"; } applyInfo.AccountName = userName; applyInfo.BankName = str5; applyInfo.Remark = str3; applyInfo.State = RequesState.未审核; applyInfo.CellPhone = currentMember.CellPhone; if ((string.IsNullOrEmpty(currentMember.OpenId) || (currentMember.OpenId.Length < 0x1c)) && ((result == 3) || (result == 0))) { msg = "{\"success\":false,\"msg\":\"您的帐号未绑定,无法通过微信支付余额!\"}"; } else if (MemberAmountProcessor.CreatAmountApplyRequest(applyInfo)) { try { MemberAmountRequestInfo balance = applyInfo; if (balance != null) { Messenger.SendWeiXinMsg_MemberAmountDrawCashRequest(balance); } } catch (Exception) { } msg = "{\"success\":true,\"msg\":\"申请成功!\"}"; } else { msg = "{\"success\":false,\"msg\":\"申请失败!\"}"; } } context.Response.Write(msg); context.Response.End(); }
private void ProcessAddAmountApply(System.Web.HttpContext context) { context.Response.ContentType = "text/json"; string s = ""; if (this.CheckAddAmountApply(context, ref s)) { string accountCode = context.Request["account"].Trim(); decimal amount = decimal.Parse(context.Request["applymoney"].Trim()); int num = 0; int.TryParse(context.Request["requesttype"].Trim(), out num); string remark = context.Request["remark"].Trim(); string text = context.Request["realname"].Trim(); string bankName = context.Request["bankname"].Trim(); MemberAmountRequestInfo memberAmountRequestInfo = new MemberAmountRequestInfo(); MemberInfo currentMember = MemberProcessor.GetCurrentMember(); memberAmountRequestInfo.UserId = currentMember.UserId; memberAmountRequestInfo.UserName = currentMember.UserName; memberAmountRequestInfo.RequestTime = System.DateTime.Now; memberAmountRequestInfo.Amount = amount; memberAmountRequestInfo.RequestType = (RequesType)num; memberAmountRequestInfo.AccountCode = accountCode; if (num == 3 || num == 0) { memberAmountRequestInfo.AccountCode = currentMember.OpenId; } string text2 = string.IsNullOrEmpty(text) ? currentMember.RealName : text; if (string.IsNullOrEmpty(text2)) { text2 = currentMember.UserName; } if (string.IsNullOrEmpty(text2)) { text2 = "未设置"; } memberAmountRequestInfo.AccountName = text2; memberAmountRequestInfo.BankName = bankName; memberAmountRequestInfo.Remark = remark; memberAmountRequestInfo.State = RequesState.未审核; memberAmountRequestInfo.CellPhone = currentMember.CellPhone; if ((string.IsNullOrEmpty(currentMember.OpenId) || currentMember.OpenId.Length < 28) && (num == 3 || num == 0)) { s = "{\"success\":false,\"msg\":\"您的帐号未绑定,无法通过微信支付余额!\"}"; } else if (MemberAmountProcessor.CreatAmountApplyRequest(memberAmountRequestInfo)) { try { MemberAmountRequestInfo memberAmountRequestInfo2 = memberAmountRequestInfo; if (memberAmountRequestInfo2 != null) { Messenger.SendWeiXinMsg_MemberAmountDrawCashRequest(memberAmountRequestInfo2); } } catch (System.Exception) { } s = "{\"success\":true,\"msg\":\"申请成功!\"}"; } else { s = "{\"success\":false,\"msg\":\"申请失败!\"}"; } } context.Response.Write(s); context.Response.End(); }