/// <summary> /// 更新基本资料 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected override string btnModify_Click() { Hashtable MyHs = new Hashtable(); if (Request.Form["chkCloseAll"] == "on" || Request.Form["chkClockAll"] == "on") { List <Model.Member> list = BllModel.GetMemberEntityList("MID in (select mid from getTreeBuyMID('" + MemberModel.MID + "'))"); foreach (Model.Member item in list) { if (Request.Form["chkCloseAll"] == "on") { item.IsClose = MemberModel.IsClose; item.IsClock = MemberModel.IsClock; } if (Request.Form["chkClockAll"] == "on") { item.IsClock = MemberModel.IsClock; } BllModel.Update(item, MyHs); } } BllModel.Update(MemberModel, MyHs); BLL.Member.UpdateConfigTran(MemberModel.MID, "EPXingCount", MemberModel.MConfig.EPXingCount.ToString(), null, true, System.Data.SqlDbType.Int, MyHs); //更新会员的密保问题 UpdateQuestion(MemberModel.ID.ToString(), MyHs); if (BLL.CommonBase.RunHashtable(MyHs)) { return("操作成功"); } return("操作失败"); }
/// <summary> /// 更新基本资料 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected override string btnModify_Click() { Hashtable MyHs = new Hashtable(); if (Request.Form["chkCloseAll"] == "on" || Request.Form["chkClockAll"] == "on") { string where = ""; if (Request.Form["chkCloseAll"] == "on") { where += string.Format(" IsClose = {0} ", (MemberModel.IsClose ? 1 : 0)); } if (Request.Form["chkClockAll"] == "on") { where += string.Format(" IsClock = {0} ", (MemberModel.IsClock ? 1 : 0)); } if (!string.IsNullOrEmpty(where)) { MyHs.Add(string.Format("update Member set {0} where MID in (select mid from [dbo].[getSubBDMember]('{1}'))", where, MemberModel.MID), null); } //List<Model.Member> list = BllModel.GetMemberEntityList("MID in (select mid from getTreeBuyMID('" + MemberModel.MID + "'))"); //foreach (Model.Member item in list) //{ // if (Request.Form["chkCloseAll"] == "on") // item.IsClose = MemberModel.IsClose; // if (Request.Form["chkClockAll"] == "on") // item.IsClock = MemberModel.IsClock; // BllModel.Update(item, MyHs); //} } BllModel.Update(MemberModel, MyHs); //string error = BLL.Member.CanSetAgency(MemberModel); //if (!string.IsNullOrEmpty(error)) //{ // return error; //} //MyHs.Add(" update member set MSH = '" + MemberModel.MID + "' where " + BLL.Member.GetLeaderCondition(MemberModel) + " and MID <> '" + MemberModel.MID + "'", null); if (MemberModel.Role.IsAdmin) { UpdateQuestion(MemberModel.ID, MyHs); } if (BLL.CommonBase.RunHashtable(MyHs)) { BLL.OperationRecordBLL.Add(TModel.MID, ChangeType.O_XGHYZL, string.Format("修改{0}的资料", MemberModel.MID)); return("操作成功"); } return("操作失败"); }
/// <summary> /// 更新基本资料 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected override string btnModify_Click() { string error = ""; if (string.IsNullOrEmpty(error)) { if (BllModel.Update(MemberModel)) { BLL.OperationRecordBLL.Add(TModel.MID, "自助修改资料", "修改资料"); return("操作成功"); } return("操作失败"); } return(error); }
/// <summary> /// 更新基本资料 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected override string btnModify_Click() { string error = ""; if (string.IsNullOrEmpty(error)) { if (Request.Form["txtBankNumber"].Trim() != null) { List <Model.Member> list1 = BllModel.GetMemberEntityList("BankNumber='" + Request.Form["txtBankNumber"].Trim() + "' and MID <> '" + TModel.MID + "'"); if (list1.Count > 0) { error += "该银行卡已绑定,请更换其它帐号"; return(error); } } //if (Request.Form["txtAliPay"].Trim() != null) //{ // List<Model.Member> list2 = BllModel.GetMemberEntityList("Alipay='" + Request.Form["txtAliPay"].Trim() + "' and MID <> '" + TModel.MID + "'"); // if (list2.Count > 0) // { // error += "该支付宝已绑定,请更换其它帐号"; // return error; // } //} Model.Member m = BLL.Member.GetModelByMID(MemberModel.MID); if (!m.ZDStatus && MemberModel.ZDStatus) { return("防撞单关闭后不可再次开启"); } if (!BLL.Member.getCardNameCount(MemberModel)) { return("三代内不能有同名开户账号"); } Hashtable hs = new Hashtable(); BllModel.Update(MemberModel, hs); BLL.Member.UpdateConfigTran(MemberModel.MID, "HLMoneyState", MemberModel.MConfig.HLMoneyState.ToString(), null, true, System.Data.SqlDbType.Bit, hs); if (BLL.CommonBase.RunHashtable(hs)) { return("1"); } return("操作失败"); } return(error); }
protected override string btnModify_Click() { //string code = BLL.SMS.GetSKeyBuyTel(Request.Form["txtNumID"].Trim(), Model.SMSType.MMYZ); //if ((string.IsNullOrEmpty(code) || code != Request.Form["txtTelCode"].Trim())) //{ // return "手机验证码错误"; //} Model.Member model = TModel; model.SecPsd = Request.Form["lbNSecPsd"].Trim(); model.SecPsd = System.Web.Security.FormsAuthentication.HashPasswordForStoringInConfigFile(model.SecPsd + model.Salt, "MD5").ToUpper(); if (BllModel.Update(model)) { return("操作成功"); } return("操作失败"); }
/// <summary> /// 更新基本资料 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected override string btnModify_Click() { string error = ""; if (string.IsNullOrWhiteSpace(MemberModel.Province)) { return("省不能为空"); } if (string.IsNullOrWhiteSpace(MemberModel.City)) { return("市不能为空"); } if (BLL.WebBase.Model.TelVerify) { List <Model.Member> list = BllModel.GetMemberEntityList("Tel='" + Request.Form["txtTel"].Trim() + "' and MID<>'" + TModel.MID + "'"); if (list.Count > 0) { error += "该手机号码已被绑定"; } else { //string code = BLL.SMS.GetSKeyBuyTel(Request.Form["txtTel"].Trim(), Model.SMSType.ZCYZ); ////if ((string.IsNullOrEmpty(code) || code != Request.Form["txtTelCode"].Trim()) && !TModel.Role.Super) //if ((string.IsNullOrEmpty(code) || code != Request.Form["txtTelCode"].Trim())) //{ // error += "手机验证码错误!"; //} } } if (string.IsNullOrEmpty(error)) { if (BllModel.Update(MemberModel)) { BLL.OperationRecordBLL.Add(TModel.MID, ChangeType.O_XGZL, "修改资料"); return("操作成功"); } return("操作失败"); } return(error); }
/// <summary> /// 货币转移 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected override string btnModify_Click() { //if (Check_SQ_Answer()) { Model.Member model = TModel; if (System.Web.Security.FormsAuthentication.HashPasswordForStoringInConfigFile(Request.Form["lbOPassword"].Trim() + model.Salt, "MD5").ToUpper() == model.Password) { model.Password = Request.Form["lbNPassword"].Trim(); model.Password = System.Web.Security.FormsAuthentication.HashPasswordForStoringInConfigFile(model.Password + model.Salt, "MD5").ToUpper(); if (BllModel.Update(model)) { return("操作成功"); } return("操作失败"); } else { return("原密码不正确"); } } //else // return "密保问题错误"; }
protected override string btnModify_Click() { //if (Check_SQ_Answer()) { Model.Member model = TModel; string code = BLL.SMS.GetSKeyBuyTel(model.Tel, Model.SMSType.MMYZ); if ((!BLL.WebBase.Model.EmailVerify && !BLL.WebBase.Model.TelVerify) || (!string.IsNullOrEmpty(code) && code == Request.Form["txtTelCode"])) { model.SecPsd = Request.Form["lbNSecPsd"].Trim(); model.SecPsd = System.Web.Security.FormsAuthentication.HashPasswordForStoringInConfigFile(model.SecPsd + model.Salt, "MD5").ToUpper(); if (BllModel.Update(model)) { return("操作成功"); } return("操作失败"); } else { return("验证码不正确"); } } //else // return "密保问题错误"; }
/// <summary> /// 更新基本资料 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected override string btnModify_Click() { Hashtable MyHs = new Hashtable(); if (Request.Form["chkCloseAll"] == "on" || Request.Form["chkClockAll"] == "on") { string where = ""; if (Request.Form["chkCloseAll"] == "on") { where += string.Format(" IsClose = {0} ", (MemberModel.IsClose ? 1 : 0)); } if (Request.Form["chkClockAll"] == "on") { where += string.Format(" IsClock = {0} ", (MemberModel.IsClock ? 1 : 0)); } if (!string.IsNullOrEmpty(where)) { MyHs.Add(string.Format("update Member set {0} where MID in (select mid from [dbo].[getSubBDMember]('{1}'))", where, MemberModel.MID), null); } //List<Model.Member> list = BllModel.GetMemberEntityList("MID in (select mid from getTreeBuyMID('" + MemberModel.MID + "'))"); //foreach (Model.Member item in list) //{ // if (Request.Form["chkCloseAll"] == "on") // item.IsClose = MemberModel.IsClose; // if (Request.Form["chkClockAll"] == "on") // item.IsClock = MemberModel.IsClock; // BllModel.Update(item, MyHs); //} } BllModel.Update(MemberModel, MyHs); //string error = BLL.Member.CanSetAgency(MemberModel); //if (!string.IsNullOrEmpty(error)) //{ // return error; //} //MyHs.Add(" update member set MSH = '" + MemberModel.MID + "' where " + BLL.Member.GetLeaderCondition(MemberModel) + " and MID <> '" + MemberModel.MID + "'", null); if (MemberModel.Role.IsAdmin) { UpdateQuestion(MemberModel.ID, MyHs); } if (BLL.CommonBase.RunHashtable(MyHs)) { Hashtable MyHs2 = new Hashtable(); List <Model.Account> listaccount = BLL.Account.GetModelList(""); foreach (var item in listaccount) { Model.C_CarTast tast = BLL.C_CarTast.GetModelname(item.CName); Model.Goods g = null; if (tast != null) { if (!string.IsNullOrWhiteSpace(tast.OCode)) { Model.Member mc1 = BLL.Member.GetModelByMID(tast.CarSJ1); Model.Member mc2 = BLL.Member.GetModelByMID(tast.CarSJ2); if (mc1 != null) { item.SJ1 = mc1.MName; } if (mc2 != null) { item.SJ2 = mc2.MName; } Model.OrderDetail od = BLL.OrderDetail.GetModelCode(tast.OCode); g = BLL.Goods.GetModel(od.GId); if (g != null) { item.GName = g.GName; item.Unit = g.Unit; } } } BLL.Account.Update(item, MyHs2); } BLL.CommonBase.RunHashtable(MyHs2); BLL.OperationRecordBLL.Add(TModel.MID, ChangeType.O_XGHYZL, string.Format("修改{0}的资料", MemberModel.MID)); return("操作成功"); } return("操作失败"); }
protected override string btnModify_Click() { string midlist = Request.Form["hdMIDList"]; Hashtable MyHs = new Hashtable(); Model.Member model; foreach (string mid in midlist.Split(',')) { model = BllModel.GetModel(mid); if (model.Role.Super) { continue; } //if (Request.Form["ddlJXCode"] != "0" && model.MConfig != null) // model.MConfig.JXCode = Request.Form["ddlJXCode"]; if (!string.IsNullOrEmpty(Request.Form["ddlSHMoney"])) { model.AgencyCode = Request.Form["ddlSHMoney"]; } if (!string.IsNullOrEmpty(Request.Form["ddlMemberType"])) { model.RoleCode = Request.Form["ddlMemberType"]; } if (!string.IsNullOrEmpty(Request.Form["txtTel"].Trim())) { model.Tel = Request.Form["txtTel"].Trim(); } if (!string.IsNullOrEmpty(Request.Form["txtEmail"].Trim())) { model.Email = Request.Form["txtEmail"].Trim(); } if (!string.IsNullOrEmpty(Request.Form["txtMTJ"].Trim())) { model.MTJ = Request.Form["txtMTJ"].Trim(); } if (!string.IsNullOrEmpty(Request.Form["txtMSH"].Trim())) { model.MSH = Request.Form["txtMSH"].Trim(); } if (Request.Form["ddlProvince"].Trim() != "省名") { model.Province = Request.Form["ddlProvince"]; } if (Request.Form["ddlCity"] != "地市") { model.City = Request.Form["ddlCity"]; } if (Request.Form["ddlZone"] != "县市") { model.Zone = Request.Form["ddlZone"]; } if (!string.IsNullOrEmpty(Request.Form["txtAddress"].Trim())) { model.Address = Request.Form["txtAddress"].Trim(); } if (!string.IsNullOrEmpty(Request.Form["ddlIsClock"])) { model.IsClock = bool.Parse(Request.Form["ddlIsClock"]); } if (!string.IsNullOrEmpty(Request.Form["ddlIsClose"])) { model.IsClose = bool.Parse(Request.Form["ddlIsClose"]); } if (model.MConfig != null) { model.MConfig.JJTypeList = Request.Form["txtJJTypeList"].Trim(); } if (!string.IsNullOrEmpty(Request.Form["txtPassword"].Trim())) { model.Password = Request.Form["txtPassword"].Trim(); model.Password = System.Web.Security.FormsAuthentication.HashPasswordForStoringInConfigFile(model.Password + model.Salt, "MD5").ToUpper(); } if (!string.IsNullOrEmpty(Request.Form["txtSecPsd"].Trim())) { model.SecPsd = Request.Form["txtSecPsd"].Trim(); model.SecPsd = System.Web.Security.FormsAuthentication.HashPasswordForStoringInConfigFile(model.SecPsd + model.Salt, "MD5").ToUpper(); } BllModel.Update(model, MyHs); } if (BLL.CommonBase.RunHashtable(MyHs)) { return("操作成功"); } return("操作失败"); }