public JsonResult changeBank() { Hashtable aHT = Authorizes.GetAuthorizeCache(Request); if (aHT != null) { DictSetUtil ds_digest = new DictSetUtil(new DataSet()); ds_digest.SetValue("realname", Request["realname"]); ds_digest.SetValue("bankno", Request["bankno"]); ds_digest.SetValue("bankname", Request["bankname"]); ds_digest.SetValue("province", Request["province"]); ds_digest.SetValue("province_name", Request["province_name"]); ds_digest.SetValue("city", Request["city"]); ds_digest.SetValue("city_name", Request["city_name"]); ds_digest.SetValue("subbank", Request["subbank"]); ds_digest.SetValue("cardnum", Request["cardnum"]); ParamUtil aPU = new ParamUtil() .SetCmd(AAccountUtil.CChangeBank) .SetParam(aHT["DOMAINUSER"]).SetParam("c_pass", Request["c_pass"]).SetParam("realname", Request["realname"]).SetParam("digest", ds_digest.MyDS) .ExecuteCmd(new AAccountUtil()); if (aPU.IsOK()) { return(Json(new { flag = "y", message = "success" })); } else { return(Json(new { flag = "n", message = aPU.GetError() })); } } return(Json(new { flag = "n", message = "账户登录状态失效" })); }
public JsonResult postMember() { Hashtable aHT = Authorizes.GetAuthorizeCache(Request); if (aHT != null) { DictSetUtil ds_member = new DictSetUtil(new DataSet()); ds_member.SetValue("nickname", Request["nickname"]); ds_member.SetValue("email", Request["email"]); ds_member.SetValue("realname", Request["realname"]); ds_member.SetValue("idtype", Request["idtype"]); ds_member.SetValue("id", Request["id"]); ds_member.SetValue("ask", Request["ask"]); ds_member.SetValue("answer", Request["answer"]); ParamUtil aPU = new ParamUtil() .SetCmd(AAccountUtil.CPostMemberInfo) .SetParam(aHT["DOMAINUSER"]).SetParam("c_pass", Request["c_pass"]).SetParam("member", ds_member.MyDS) .ExecuteCmd(new AAccountUtil()); if (aPU.IsOK()) { return(Json(new { flag = "y", message = "success" })); } else { return(Json(new { flag = "n", message = aPU.GetError() })); } } return(Json(new { flag = "n", message = "账户登录状态失效" })); }
private void ChangeBank(Hashtable Params) { string account = PickParam(Params).GetValueAsString(); string c_pass = PickParam(Params).GetValueAsString("c_pass"); string realname = PickParam(Params).GetValueAsString("realname"); DataSet ds_digest = PickParam(Params).GetValueAsDataSet("digest"); try { if (string.IsNullOrEmpty(account)) { throw new ArgumentNullException("account", "未传入账户名"); } if (string.IsNullOrEmpty(c_pass)) { throw new ArgumentNullException("c_pass", "未传入支付密码"); } if (string.IsNullOrEmpty(realname)) { throw new ArgumentNullException("realname", "未传入开户人姓名"); } if (ds_digest == null) { throw new ArgumentNullException("digest", "未传入银行卡签名数据"); } // 验证密码 ParamUtil verifyPwd = new ParamUtil().SetCmd(CVerifyPasswrod).SetParam(account).SetParam("pwd", c_pass).SetParam("type", "pay").ExecuteCmd(this); if (verifyPwd.GetValueAsBool() == false) { throw new Exception(verifyPwd.GetError()); } else { // 修改银行卡信息 string passport = string.Format("{0}@caika.com", account); DataSet dsMember = new ParamUtil() .SQLCmdLoadData() .SQLEntityScript("CAIKA_MEMBER", string.Format("SELECT * FROM CAIKA_MEMBER WHERE SSOPST='{0}'", passport)) .ExecuteCmd(ADataLoader.DataLoader()) .GetValueAsDataSet(); string key = new DictSetUtil(null).PushSLItem(passport).PushSLItem(c_pass).PushSLItem("Bank").DoSignature(); if (AEntryDic.Pick(GetControl()).SetDic(ds_digest, key)) { dsMember.Tables[0].Rows[0]["REALNAME"] = realname; dsMember.Tables[0].Rows[0]["BANKDIGEST"] = key; dsMember.Tables[0].Rows[0]["ETIME"] = DateTime.Now; new ParamUtil().SQLCmdPersistent().SetParam(dsMember).ExecuteCmd(ADataLoader.DataLoader()); } } } catch (Exception ex1) { PickParam(Params).Clear().SetError(ex1.Message); } }
private void PostMemberInfo(Hashtable Params) { string account = PickParam(Params).GetValueAsString(); string c_pass = PickParam(Params).GetValueAsString("c_pass"); DataSet ds_member = PickParam(Params).GetValueAsDataSet("member"); try { if (string.IsNullOrEmpty(account)) { throw new ArgumentNullException("account", "未传入账户名"); } if (string.IsNullOrEmpty(c_pass)) { throw new ArgumentNullException("c_pass", "未传入登录密码"); } if (ds_member == null) { throw new ArgumentNullException("member", "未传入会员数据"); } DictSetUtil dsinfo = new DictSetUtil(ds_member); // 验证密码 ParamUtil verifyPwd = new ParamUtil().SetCmd(CVerifyPasswrod).SetParam(account).SetParam("pwd", c_pass).SetParam("type", "pay").ExecuteCmd(this); if (verifyPwd.GetValueAsBool() == false) { throw new Exception(verifyPwd.GetError()); } else { // 修改会员信息 string passport = string.Format("{0}@caika.com", account); DataSet dsMember = new ParamUtil() .SQLCmdLoadData() .SQLEntityScript("CAIKA_MEMBER", string.Format("SELECT * FROM CAIKA_MEMBER WHERE SSOPST='{0}'", passport)) .ExecuteCmd(ADataLoader.DataLoader()) .GetValueAsDataSet(); dsMember.Tables[0].Rows[0]["NICKNAME"] = dsinfo.GetValue("nickname"); dsMember.Tables[0].Rows[0]["EMAIL"] = dsinfo.GetValue("email"); dsMember.Tables[0].Rows[0]["REALNAME"] = dsinfo.GetValue("realname"); dsMember.Tables[0].Rows[0]["IDTYPE"] = dsinfo.GetValue("idtype"); dsMember.Tables[0].Rows[0]["UID"] = dsinfo.GetValue("id"); dsMember.Tables[0].Rows[0]["ASKID"] = dsinfo.GetValue("ask"); dsMember.Tables[0].Rows[0]["ANSWER"] = dsinfo.GetValue("answer"); dsMember.Tables[0].Rows[0]["ETIME"] = DateTime.Now; new ParamUtil().SQLCmdPersistent().SetParam(dsMember).ExecuteCmd(ADataLoader.DataLoader()); } } catch (Exception ex1) { PickParam(Params).Clear().SetError(ex1.Message); } }
public JsonResult postRequest(string id) { Hashtable aHT = Authorizes.GetAuthorizeCache(Request); if (aHT != null) { ParamUtil aPU = new ParamUtil() .SetCmd(AAccountUtil.CPostRequest) .SetParam(aHT["DOMAINUSER"]).SetParam("type", id).SetParam("msgid", Request["msgid"]) .ExecuteCmd(new AAccountUtil()); if (aPU.IsOK()) { return(Json(new { flag = "y", message = "success" })); } else { return(Json(new { flag = "n", message = aPU.GetError() })); } } return(Json(new { flag = "n", message = "账户登录失效" })); }
public JsonResult changePwd() { Hashtable aHT = Authorizes.GetAuthorizeCache(Request); if (aHT != null) { ParamUtil aPU = new ParamUtil() .SetCmd(AAccountUtil.CChangePassword) .SetParam(aHT["DOMAINUSER"]).SetParam("type", Request["t"]).SetParam("c_pass", Request["c_pass"]).SetParam("n_pass", Request["n_pass"]) .ExecuteCmd(new AAccountUtil()); if (aPU.IsOK()) { return(Json(new { flag = "y", message = "success" })); } else { return(Json(new { flag = "n", message = aPU.GetError() })); } } return(Json(new { flag = "n", message = "账户登录状态失效" })); }
public JsonResult doRegister() { string flag = "success"; string message = ""; if (!string.IsNullOrEmpty(Request["vcode"])) { string strAccountId = Request["account"]; string strPassword = Request["password"]; string strAgentCode = Request["agentcode"]; if (string.IsNullOrEmpty(strAgentCode)) { strAgentCode = "000101999"; } // 是否存在? if (MemberDBUtils.MemberIsExist(GetControl(), strAccountId)) { flag = "failed"; message = "用户名已存在"; } else { Hashtable aHT = new Hashtable(); PickParam(aHT).SetParam("DOMAINUSER", strAccountId); PickParam(aHT).SetParam("DOMAINNAME", "caika.com"); PickParam(aHT).SetParam("PSTPWD", strPassword); PickParam(aHT).SetParam("TYPE", account_type.NormalAcount); PickParam(aHT).SetParam("IP", Request.UserHostAddress); PickParam(aHT).SetParam(MemberDBUtils.GetMemberDigest(GetControl())); PickParam(aHT).SetParam("PARENTAGENT", strAgentCode); // 校验应用许可权的合法性 ParamUtil checkLicense = PickParam().Merge(aHT).SetCmd(ADomain.CCheckLicense).ExecuteCmd(new ADomain()); if (!checkLicense.IsOK()) { flag = "failed"; message = checkLicense.GetError(); } else { // 先注册通行证、然后再添加会员账户 // 执行CRegister命令后会破坏aHT参数信息,所以在此创建一个临时aHT1用于避免原始参数集合不被破坏。 Hashtable aHT1 = new Hashtable(); if (PickParam(aHT1).Merge(aHT).SetCmd(APassport.CRegister).ExecuteCmd(new APassport()).IsOK()) { // 创建会员账户 Hashtable aHT2 = new Hashtable(); MemberDBUtils.CreateMemberRecord(GetControl(), PickParam(aHT2).Merge(aHT).ParamTable); if (!PickParam(aHT2).IsOK()) { flag = "failed"; message = PickParam(aHT2).GetError(); } else { // 注册完成后直接登录 if (PickParam(aHT).SetCmd(APassport.CSignOn).ExecuteCmd(new APassport()).IsOK()) { Authorizes.SetAuthorizeCache(Request, Response, PickParam(aHT).GetValue("passport") as Hashtable); } else { flag = "failed"; message = PickParam(aHT).GetError(); } } } else { flag = "failed"; message = PickParam(aHT1).GetError(); } } } } else { flag = "failed"; message = "验证码失效"; } return(Json(new { state = flag, message = message })); }
private void AppendNode4List(Hashtable Params) { IModelForm instance = PickParam(Params).GetValue <IModelForm>(ActionUtil.ActionID); if (instance != null) { string userId = GetControl().GetContext().GetValue <string>("USERID"); StandardGrid gridList = instance.GetActived <ListModelFormProxy>().GridControl; if (gridList.CurrentRow != null) { DataRowView curRow = (DataRowView)gridList.CurrentRow.DataBoundItem; // 得到当前层级最大编号 DataView curLevel = new DataView(((DataSet)gridList.DataSource).Tables[gridList.DataMember], "PARENTID='" + curRow["PARENTID"] + "'", "CATEGORYID DESC", DataViewRowState.CurrentRows); if (curLevel.Count == 0) { return; } int idx; string cId = curLevel[0]["CATEGORYID"].ToString().Trim(); if (int.TryParse(cId.Substring(cId.Length - 3), out idx)) { if (idx + 1 > 999) { AlertBox.ShowTips("已超过最大编码范围(0-999)!", instance, MessageBoxButtons.OK); return; } // 新编码 string nId = string.Format("{0}{1:000}", cId.Substring(0, cId.Length - 3), idx + 1); ParamUtil aPU = new ParamUtil() .SQLCmdLoadData().SQLEntityScript("BASE_CATEGORY", string.Format("SELECT * FROM BASE_CATEGORY WHERE CATEGORYID='{0}'", nId)) .ExecuteCmd(ADataLoader.DataLoader()); if (aPU.IsOK()) { bool isNew = false; #region 构建分类数据 DataRow rowNew = ((DataSet)gridList.DataSource).Tables[gridList.DataMember].NewRow(); if (aPU.GetValueAsDataSet().Tables["BASE_CATEGORY"].Rows.Count == 0) { rowNew["CATEGORYID"] = nId; rowNew["PARENTID"] = curRow["PARENTID"]; rowNew["CTYPE"] = curRow["CTYPE"]; rowNew["SEQNO"] = curRow.Row.Field <int>("SEQNO") + 1; rowNew["LEVEL"] = curRow["LEVEL"]; rowNew["ISEND"] = "Y"; rowNew["STATE"] = AosuApp.state.Enabled; rowNew["CTIME"] = DateTime.Now; rowNew["CUSER"] = userId; rowNew["ETIME"] = DateTime.Now; rowNew["EUSER"] = userId; isNew = true; } else { if (AlertBox.ShowWarning(string.Format("{0}编号已经存在,是否将数据放入当前窗体上下文中?", nId), instance, MessageBoxButtons.YesNo) != DialogResult.Yes) { return; } rowNew.ItemArray = aPU.GetValueAsDataSet().Tables["BASE_CATEGORY"].Rows[0].ItemArray; rowNew["STATE"] = AosuApp.state.Enabled; rowNew["ETIME"] = DateTime.Now; rowNew["EUSER"] = userId; } #endregion #region 插入到列表 int newIdx = 0; DataView dvChild = new DataView(((DataSet)gridList.DataSource).Tables[gridList.DataMember], "CATEGORYID LIKE '" + cId + "%'", "CATEGORYID DESC", DataViewRowState.CurrentRows); if (dvChild.Count > 0) { DataGridViewRow gridRow = gridList.Rows.OfType <DataGridViewRow>().FirstOrDefault(cm => ((DataRowView)cm.DataBoundItem)["CATEGORYID"] == dvChild[0]["CATEGORYID"]); if (gridRow != null) { newIdx = gridRow.Index + 1; } } else { DataGridViewRow gridRow = gridList.Rows.OfType <DataGridViewRow>().FirstOrDefault(cm => ((DataRowView)cm.DataBoundItem)["CATEGORYID"] == curLevel[0]["CATEGORYID"]); if (gridRow != null) { newIdx = gridRow.Index + 1; } } ((DataSet)gridList.DataSource).Tables[gridList.DataMember].Rows.InsertAt(rowNew, newIdx); if (!isNew) { // 行状态改为"Modified" rowNew.AcceptChanges(); rowNew["EUSER"] = userId; rowNew["ETIME"] = DateTime.Now; } gridList.CurrentCell = gridList[0, newIdx]; #endregion } else { AlertBox.ShowError(aPU.GetError(), instance, MessageBoxButtons.OK); } } else { AlertBox.ShowTips(string.Format("无效的分类编号{0}!"), instance, MessageBoxButtons.OK); } } } }
private void ChangePassword(Hashtable Params) { string account = PickParam(Params).GetValueAsString(); string type = PickParam(Params).GetValueAsString("type"); try { string c_pwd = PickParam(Params).GetValueAsString("c_pass"); string n_pwd = PickParam(Params).GetValueAsString("n_pass"); if (string.IsNullOrEmpty(n_pwd)) { throw new ArgumentNullException("n_pwd", "未传入新密码"); } if (type == "pay") { // 是否设置过提款密码? if (AAccountUtil.WithdrawIsEmpty(account) == false) { if (string.IsNullOrEmpty(c_pwd)) { throw new ArgumentNullException("c_pwd", "未传入当前密码"); } // 验证密码 ParamUtil verifyPwd = new ParamUtil().SetCmd(CVerifyPasswrod).SetParam(account).SetParam("pwd", c_pwd).SetParam("type", type).ExecuteCmd(this); if (verifyPwd.GetValueAsBool() == false) { throw new Exception(verifyPwd.GetError()); } } // 修改密码 DataSet dsMember = new ParamUtil() .SQLCmdLoadData() .SQLEntityScript("CAIKA_MEMBER", string.Format("SELECT * FROM CAIKA_MEMBER WHERE SSOPST='{0}@caika.com'", account)) .ExecuteCmd(ADataLoader.DataLoader()) .GetValueAsDataSet(); dsMember.Tables[0].Rows[0]["WITHDRAWALS"] = new DictSetUtil(null).DoSignature(n_pwd); dsMember.Tables[0].Rows[0]["ETIME"] = DateTime.Now; new ParamUtil().SQLCmdPersistent().SetParam(dsMember).ExecuteCmd(ADataLoader.DataLoader()); } else { if (string.IsNullOrEmpty(c_pwd)) { throw new ArgumentNullException("c_pwd", "未传入当前密码"); } ParamUtil aPU = new ParamUtil() .SetCmd(CChangePassword) .SetParam("DOMAINUSER", account) .SetParam("DOMAINNAME", BaseControl.GlobalControl.GetContext()[Context.CAppName]) .SetParam("PSTPWD", c_pwd) .SetParam("NEWPWD", n_pwd) .ExecuteCmd(new APassport()); PickParam(Params).Clear().SetError(aPU.GetError()); } } catch (Exception ex1) { PickParam(Params).Clear().SetError(ex1.Message); } }
private void VerifyPasswrod(Hashtable Params) { string account = PickParam(Params).GetValueAsString(); string pwd = PickParam(Params).GetValueAsString("pwd"); string type = PickParam(Params).GetValueAsString("type"); try { if (type == "pay") { DataSet dsMember = new ParamUtil() .SQLCmdLoadData() .SQLWithOutSchema() .SQLEntityScript("CAIKA_MEMBER", string.Format("SELECT * FROM CAIKA_MEMBER WHERE SSOPST='{0}@caika.com'", account)) .ExecuteCmd(ADataLoader.DataLoader()) .GetValueAsDataSet(); DataRow rowMember = dsMember.Tables[0].Rows[0]; string signature = new DictSetUtil(null).DoSignature(pwd); if (signature == rowMember.Field <string>("WITHDRAWALS").Trim()) { PickParam(Params).Clear().SetParam(true); } else { PickParam(Params).Clear().SetError("密码输入不正确"); PickParam(Params).SetParam(false); } } else { // 得到通行证数据 DataSet dsPassport = new ParamUtil() .SQLCmdLoadData() .SQLEntityScript("SSODOMAINREF", string.Format("SELECT * FROM SSODOMAINREF WHERE DOMAINNAME='caika.com' AND DOMAINUSER='******'", account)) .SQLEntityScript("SSOPASSPORT", string.Format("SELECT * FROM SSOPASSPORT WHERE SSOPST = '{0}@caika.com'", account)) .ExecuteCmd(ADataLoader.DataLoader()) .GetValueAsDataSet(); if (dsPassport.Tables["SSODOMAINREF"].Rows.Count == 0 || dsPassport.Tables["SSOPASSPORT"].Rows.Count == 0) { PickParam(Params).Clear().SetError("用户名或密码错误"); PickParam(Params).SetParam(false); } else { ParamUtil aPU = new ParamUtil().SetCmd(CVerifyPasswrod).SetParam(dsPassport).SetParam("PSTPWD", pwd).ExecuteCmd(new APassport()); if (aPU.IsOK()) { PickParam(Params).Clear(); PickParam(Params).SetParam(aPU.GetValue()); } else { PickParam(Params).Clear().SetError(aPU.GetError()); PickParam(Params).SetParam(false); } } } } catch (Exception) { PickParam(Params).Clear().SetError("校验密码出错"); PickParam(Params).SetParam(false); } }
private void CreateNewAccount(Hashtable Params) { string account = PickParam(Params).GetValueAsString("DOMAINUSER"); string domain = PickParam(Params).GetValueAsString("DOMAINNAME"); try { // 注册通行证 ParamUtil register = PickParam(Params).SetCmd(APassport.CRegister).ExecuteCmd(new APassport()); if (register.IsOK()) { ParamUtil aPU = new ParamUtil() .SQLCmdLoadData() .SQLEntityScript("CAIKA_MEMBER", string.Format("SELECT * FROM CAIKA_MEMBER WHERE SSOPST='{0}'", register.GetValue())) .SQLEntityScript("CAIKA_MEMBER_MESSAGE", string.Format("SELECT * FROM CAIKA_MEMBER_MESSAGE WHERE SSOPST='{0}'", register.GetValue())) .ExecuteCmd(ADataLoader.DataLoader()); if (aPU.IsOK()) { DataSet dsPersistent = aPU.GetValueAsDataSet(); if (dsPersistent.Tables["CAIKA_MEMBER"].Rows.Count == 0) { DataRow rowNew = dsPersistent.Tables["CAIKA_MEMBER"].NewRow(); rowNew["SSOPST"] = register.GetValue(); rowNew["NICKNAME"] = account; rowNew["UPDFLAG"] = "Y"; rowNew["STATE"] = AosuApp.state.Enabled; rowNew["CTIME"] = DateTime.Now; rowNew["ETIME"] = DateTime.Now; dsPersistent.Tables["CAIKA_MEMBER"].Rows.Add(rowNew); // 添加提示信息 - 详细资料 DataRow row_message1 = AosuApp.Functions.FindRow(string.Format("MSGTYPE={0}", message_id.Account_KeyIn_DetailInfo), dsPersistent.Tables["CAIKA_MEMBER_MESSAGE"]); if (row_message1 == null) { row_message1 = dsPersistent.Tables["CAIKA_MEMBER_MESSAGE"].NewRow(); row_message1["MSGID"] = Guid.NewGuid(); row_message1["SSOPST"] = register.GetValue(); row_message1["MSGTYPE"] = message_id.Account_KeyIn_DetailInfo; row_message1["MSGTITLE"] = "请完善用户基本资料"; row_message1["MSGBODY"] = "<strong>完善用户基本资料提醒</strong><br/></br/>为了确保彩咖网更好的服务于您,请您完善<a href='/member/usercenter/grzl'><strong>个人资料信息</strong></a>。"; row_message1["STATE"] = message_state.UnRead; row_message1["CTIME"] = DateTime.Now; dsPersistent.Tables["CAIKA_MEMBER_MESSAGE"].Rows.Add(row_message1); } // 添加提示信息 - 设置提款密码 DataRow row_message2 = AosuApp.Functions.FindRow(string.Format("MSGTYPE={0}", message_id.Account_KeyIn_Withdrawals), dsPersistent.Tables["CAIKA_MEMBER_MESSAGE"]); if (row_message2 == null) { row_message2 = dsPersistent.Tables["CAIKA_MEMBER_MESSAGE"].NewRow(); row_message2["MSGID"] = Guid.NewGuid(); row_message2["SSOPST"] = register.GetValue(); row_message2["MSGTYPE"] = message_id.Account_KeyIn_Withdrawals; row_message2["MSGTITLE"] = "请设置提款密码"; row_message2["MSGBODY"] = "<strong>设置提款密码提醒</strong><br/></br/>提款密码用于提取彩咖网账户可用余额的安全密码,请您务必设置<a href='/member/usercenter/zhmm'><strong>提款密码</strong></a>。定期重新设置提款密码能提高您的账户安全性!"; row_message2["STATE"] = message_state.UnRead; row_message2["CTIME"] = DateTime.Now; dsPersistent.Tables["CAIKA_MEMBER_MESSAGE"].Rows.Add(row_message2); } // 添加提示信息 - 绑定银行卡 DataRow row_message3 = AosuApp.Functions.FindRow(string.Format("MSGTYPE={0}", message_id.Account_KeyIn_BankCard), dsPersistent.Tables["CAIKA_MEMBER_MESSAGE"]); if (row_message3 == null) { row_message3 = dsPersistent.Tables["CAIKA_MEMBER_MESSAGE"].NewRow(); row_message3["MSGID"] = Guid.NewGuid(); row_message3["SSOPST"] = register.GetValue(); row_message3["MSGTYPE"] = message_id.Account_KeyIn_BankCard; row_message3["MSGTITLE"] = "请绑定银行卡"; row_message3["MSGBODY"] = "<strong>绑定银行卡提醒</strong><br/></br/>当您购彩中奖后,彩咖网将会依据您提交的银行卡信息将彩金转入你的真实有效的银行卡账户中;所以请您务必<a href='/member/usercenter/bdyhk'><strong>绑定银行卡</strong></a>,并确保银行卡的真实有效。"; row_message3["STATE"] = message_state.UnRead; row_message3["CTIME"] = DateTime.Now; dsPersistent.Tables["CAIKA_MEMBER_MESSAGE"].Rows.Add(row_message3); } if (new ParamUtil().SQLCmdPersistent().SetParam(dsPersistent).ExecuteCmd(ADataLoader.DataLoader()).IsOK()) { // 生成账户的摘要集 DictSetUtil ds_summary = new DictSetUtil(new DataSet()); ds_summary.SetValue("TOTALAMOUNT", "0.00"); // 账户总额 ds_summary.SetValue("AVAILABLE", "0.00"); // 可用余额 ds_summary.SetValue("FREEZED", "0.00"); // 冻结金额 ds_summary.SetValue("SCORE", "0"); // 积分 ds_summary.SetValue("DEPOSITED", "0.0"); // 充值金额 ds_summary.SetValue("BONUS", "0.0"); // 中奖金额 ds_summary.SetValue("EXCHANGED", "0.0"); // 积分兑换 ds_summary.SetValue("RETURNED", "0.0"); // 游戏返点 ds_summary.SetValue("CONSUME", "0.0"); // 投注金额 ds_summary.SetValue("WITHDRAW", "0.0"); // 提款金额 // 通行证+超级密码 string key = new DictSetUtil(null).PushSLItem(PickParam(Params).GetValueAsString()).PushSLItem("6B276432FFAF4FD4E086E739009256B3") .DoSignature(); AEntryDic.Pick(GetControl()).SetDic(ds_summary.MyDS, key); } else { PickParam(Params).Clear().SetError("注册失败"); } } else { PickParam(Params).Clear().SetError("账户名已存在"); } } else { PickParam(Params).Clear().SetError(aPU.GetError()); } } else { PickParam(Params).Clear().SetError(register.GetError()); } } catch { PickParam(Params).Clear().SetError("注册失败"); } }
private void Controls_RequestValidationEvent(object sender, EventArgs e) { IControlValidation objControl = (IControlValidation)sender; objControl.IsValid = true; objControl.IsValidated = true; switch (((Control)sender).Name) { case "TxtAgentCode": if (objControl.IsEmpty) { objControl.IsValid = false; objControl.ValidationErrorMsg = "上级代理商编号不能为空!"; } else { ParamUtil aPU = new ParamUtil().SQLCmdLoadData().SQLWithOutSchema() .SQLEntityScript("BASE_CATEGORY", string.Format("SELECT CATEGORYID FROM BASE_CATEGORY WHERE CATEGORYID='{0}'", objControl.CurrentText)) .ExecuteCmd(ADataLoader.DataLoader()); if (!aPU.IsOK()) { objControl.IsValid = false; objControl.ValidationErrorMsg = aPU.GetError(); } else { if (aPU.GetValueAsDataSet().Tables["BASE_CATEGORY"].Rows.Count == 0) { objControl.IsValid = false; objControl.ValidationErrorMsg = string.Format("代理商编号[{0}]无效!", objControl.CurrentText); } } } break; case "TxtAccountID": if (objControl.IsEmpty) { objControl.IsValid = false; objControl.ValidationErrorMsg = "账户名不能为空!"; } else { if (objControl.CurrentText.Length < 4 || objControl.CurrentText.Length > 18) { objControl.IsValid = false; objControl.ValidationErrorMsg = "账户名长度必须在(4-18)之间!"; } else { // 是否存在? if (MemberDBUtils.MemberIsExist(GetControl(), TxtAccountID.Text)) { objControl.IsValid = false; objControl.ValidationErrorMsg = string.Format("账号[{0}]已经存在!", TxtAccountID.Text); } } } break; case "TxtPassword": case "TxtConfirm": if (objControl.IsEmpty) { objControl.IsValid = false; objControl.ValidationErrorMsg = "密码不能为空!"; } else { if (objControl.CurrentText.Length < 4 || objControl.CurrentText.Length > 18) { objControl.IsValid = false; objControl.ValidationErrorMsg = "密码长度必须在(4-18)之间!"; } } if (objControl.IsValidated && objControl.IsValid) { if (TxtPassword.Text != TxtConfirm.Text) { objControl.IsValid = false; objControl.ValidationErrorMsg = "两次密码输入不一致!"; if (objControl == TxtPassword && string.IsNullOrEmpty(TxtConfirm.Text)) { objControl.IsValid = true; } } else { TxtPassword.IsValid = true; TxtConfirm.IsValid = true; } } break; } if (!objControl.IsValid && objControl.IsValidated) { ((Control)objControl).Focus(); } }