本文整理汇总了C#中Users.Clone方法的典型用法代码示例。如果您正苦于以下问题:C# Users.Clone方法的具体用法?C# Users.Clone怎么用?C# Users.Clone使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Users
的用法示例。
在下文中一共展示了Users.Clone方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: btnGO_Click
protected void btnGO_Click(object sender, EventArgs e)
{
string input = "[email protected]#$%^&*()__";
try
{
input = this.ViewState["MobileValidNumber_" + base._User.ID.ToString()].ToString();
input = Encrypt.UnEncryptString(PF.GetCallCert(), Encrypt.Decrypt3DES(PF.GetCallCert(), input, PF.DesKey));
}
catch
{
}
if (input != this.tbValidPassword.Text.Trim())
{
JavaScript.Alert(this.Page, "验证串错误。");
}
else
{
Users user = new Users(base._Site.ID);
base._User.Clone(user);
base._User.Mobile = this.tbUserMobile.Text;
base._User.isMobileValided = true;
string returnDescription = "";
if (base._User.EditByID(ref returnDescription) < 0)
{
user.Clone(base._User);
JavaScript.Alert(this.Page, returnDescription);
}
else
{
JavaScript.Alert(this.Page, "手机绑定成功。", "UserMobileBind.aspx");
}
}
}
示例2: btnOK_Click
protected void btnOK_Click(object sender, EventArgs e)
{
if (this.lbQuestion.Text == "")
{
base.Response.Write("<script type='text/javascript'>alert('为了您的账户安全,请先设置安全保护问题,谢谢!');window.location='SafeSet.aspx?FromUrl=EditPassWord.aspx';</script>");
}
else if (this.tbOldPassWord.Text.Trim() == "")
{
JavaScript.Alert(this.Page, "请输入密码。");
}
else if (this.tbNewPassWord.Text.Trim() == "")
{
JavaScript.Alert(this.Page, "请输入新密码。");
}
else if (PF.EncryptPassword(this.tbOldPassWord.Text.Trim()) != base._User.Password)
{
JavaScript.Alert(this.Page, "密码有误,请重新输入。");
}
else if (this.tbRePassWord.Text.Trim() != this.tbNewPassWord.Text.Trim())
{
JavaScript.Alert(this.Page, "两次输入的密码不相同。");
}
else if (this.tbMyA.Text.Trim() != base._User.SecurityAnswer)
{
JavaScript.Alert(this.Page, "安全保护问题回答错误。");
}
else
{
Users user = new Users(base._Site.ID);
base._User.Clone(user);
base._User.Name = this.tbName.Text.Trim();
base._User.Password = this.tbNewPassWord.Text.Trim();
string returnDescription = "";
if (base._User.EditByID(ref returnDescription) < 0)
{
user.Clone(base._User);
new Log("Users").Write("会员修改密码失败:" + returnDescription);
JavaScript.Alert(this.Page, returnDescription);
}
else
{
string request = Utility.GetRequest("FromUrl");
if (request == "")
{
request = "EditPassWord.aspx";
}
JavaScript.Alert(this.Page, "用户密码已经保存成功。", request);
}
}
}
示例3: btnOK_Click
protected void btnOK_Click(object sender, EventArgs e)
{
lbErrPwd.Visible = false;
if (_User == null)
{
return;
}
if (string.IsNullOrEmpty(tbVerPwd.Text))
{
Shove._Web.JavaScript.Alert(this.Page, "请填写您的密码。");
lbErrPwd.Text = "*";
lbErrPwd.Visible = true;
tbVerPwd.Focus();
return;
}
if (!PF.EncryptPassword(tbVerPwd.Text).Equals(_User.Password))
{
Shove._Web.JavaScript.Alert(this.Page, "密码不正确,请重新输入密码。");
tbVerPwd.Focus();
return;
}
if (string.IsNullOrEmpty(_User.RealityName) && string.IsNullOrEmpty(tbRealityName.Text))
{
Shove._Web.JavaScript.Alert(this.Page, "请输入真实姓名。");
return;
}
if (string.IsNullOrEmpty(_User.IDCardNumber) && !string.IsNullOrEmpty(tbIDCardNumber.Text))
{
if (!Shove._String.Valid.isIDCardNumber(tbIDCardNumber.Text) && !Shove._String.Valid.isIDCardNumber_Hongkong(tbIDCardNumber.Text) &&
!Shove._String.Valid.isIDCardNumber_Macau(tbIDCardNumber.Text) && !Shove._String.Valid.isIDCardNumber_Taiwan(tbIDCardNumber.Text) &&
!Shove._String.Valid.isIDCardNumber_Singapore(tbIDCardNumber.Text))
{
Shove._Web.JavaScript.Alert(this.Page, "身份证号码输入有误!");
return;
}
_User.IDCardNumber = Shove._Web.Utility.FilteSqlInfusion(tbIDCardNumber.Text);
//根据当前的身份证号查询此身份证号的历史用户的CPSID是否为"来宝商家"CSPID-839,是,则把当前会员的CPSID也置为宝商家CSPID-839
if (tbIDCardNumber.Text.Trim() != "")
{
object resObj = Shove.Database.MSSQL.ExecuteScalar("select 1 from T_Users where IDCardNumber='" + Shove._Web.Utility.FilteSqlInfusion(tbIDCardNumber.Text) + "' and CpsID=839 ", new Shove.Database.MSSQL.Parameter[0]);
if (resObj != null && _User.CpsID != 839)
{
_User.CpsID = 839;
}
}
}
if (tbEmail.Text.Trim() == "")
{
Shove._Web.JavaScript.Alert(this.Page, "请输入电子邮件地址。");
tbEmail.Focus();
return;
}
if (!Shove._String.Valid.isEmail(tbEmail.Text.Trim()))
{
Shove._Web.JavaScript.Alert(this.Page, "电子邮件地址格式不正确。");
tbEmail.Focus();
return;
}
Users tu = new Users(_Site.ID);
_User.Clone(tu);
if (string.IsNullOrEmpty(_User.RealityName))
{
_User.RealityName = Shove._Web.Utility.FilteSqlInfusion(tbRealityName.Text);
}
_User.CityID = ddlCity.City_id;
_User.Sex = rbSexM.Checked ? "男" : (rbSexW.Checked ? "女" : "");
_User.BirthDay = Shove._Convert.StrToDateTime(tbBirthday.Text.Trim(), "1980-1-1");
_User.Address = tbAddress.Text.Trim();
_User.Mobile = tbMobile.Text;
_User.isMobileValided = string.IsNullOrEmpty(tbMobile.Text) ? false : true;
if (_User.Email != Shove._Convert.ToDBC(tbEmail.Text).Trim()) //改变了邮箱,需要重新验证
{
_User.isEmailValided = false;
}
_User.Email = Shove._Convert.ToDBC(tbEmail.Text).Trim();
string ReturnDescription = "";
int Result = _User.EditByID(ref ReturnDescription);
if (Result < 0)
{
new Log("Users").Write("修改用户基本资料失败:"+ ReturnDescription);
tu.Clone(_User);
Shove._Web.JavaScript.Alert(this.Page, ReturnDescription);
return;
}
//同步修改至主站
var log = new Log("Users");
try
{
var r = SyncUserInfoFromLottery(_User.ID, _User.RealityName, _User.IDCardNumber, _User.Email);
if (r == "1")
{
log.Write("同步修改用户基本资料成功");
//.........这里部分代码省略.........
示例4: GetUserInformationByName
public int GetUserInformationByName(ref string ReturnDescription)
{
int ReturnValue = -1;
ReturnDescription = "";
Users tu = new Users(SiteID);
Clone(tu);
int Result = DAL.Procedures.P_GetUserInformationByName(Name, SiteID, ref _id, ref NickName, ref RealityName, ref _password, ref _passwordadv, ref CityID,
ref Sex, ref BirthDay, ref IDCardNumber, ref Address, ref Email, ref isEmailValided, ref QQ,ref isQQValided, ref Telephone, ref Mobile, ref isMobileValided, ref isPrivacy, ref isCanLogin,
ref RegisterTime, ref LastLoginTime, ref LastLoginIP, ref LoginCount, ref UserType, ref BankType, ref BankName, ref BankCardNumber, ref Balance,
ref Freeze, ref ScoringOfSelfBuy, ref ScoringOfCommendBuy, ref Scoring, ref Level, ref CommenderID, ref CpsID, ref OwnerSites, ref AlipayID, ref Bonus, ref Reward,
ref AlipayName, ref isAlipayNameValided, ref ComeFrom, ref isCanLogin, ref Memo, ref BonusThisMonth, ref BonusAllow, ref BonusUse, ref PromotionMemberBonusScale, ref PromotionSiteBonusScale,
ref VisitSource, ref HeadUrl, ref SecurityQuestion, ref SecurityAnswer, ref FriendList, ref ReturnValue, ref ReturnDescription);
if (Result < 0)
{
tu.Clone(this);
ReturnDescription = "数据库读写错误";
return -1;
}
if (ReturnValue < 0)
{
tu.Clone(this);
return ReturnValue;
}
cps.OwnerUserID = ID;
ReturnDescription = "";
cps.GetCpsInformationByOwnerUserID(ref ReturnDescription);
if ((cps.SiteID > 0) && (cps.ID < 0))
{
ReturnDescription = "";
}
return 0;
}
示例5: btnOK_Click
protected void btnOK_Click(object sender, EventArgs e)
{
if (this.lbQuestion.Text == "")
{
Response.Write("<script type='text/javascript'>alert('为了您的账户安全,请先设置安全保护问题,谢谢!');window.location='SafeSet.aspx?FromUrl=EditPassWord.aspx';</script>");
return;
}
if (tbOldPassWord.Text.Trim() == "")
{
Shove._Web.JavaScript.Alert(this.Page, "请输入密码。");
return;
}
if (tbNewPassWord.Text.Trim() == "")
{
Shove._Web.JavaScript.Alert(this.Page, "请输入新密码。");
return;
}
if (PF.EncryptPassword(tbOldPassWord.Text.Trim()) != _User.Password)
{
Shove._Web.JavaScript.Alert(this.Page, "密码有误,请重新输入。");
return;
}
if (tbRePassWord.Text.Trim() != tbNewPassWord.Text.Trim())
{
Shove._Web.JavaScript.Alert(this.Page, "两次输入的密码不相同。");
return;
}
if (tbMyA.Text.Trim() != _User.SecurityAnswer)
{
Shove._Web.JavaScript.Alert(this.Page, "安全保护问题回答错误。");
return;
}
Users tu = new Users(_Site.ID);
_User.Clone(tu);
_User.Name = tbName.Text.Trim();
_User.Password = tbNewPassWord.Text.Trim();
string ReturnDescription = "";
if (_User.EditByID(ref ReturnDescription) < 0)
{
tu.Clone(_User);
new Log("Users").Write("会员修改密码失败:" + ReturnDescription);
Shove._Web.JavaScript.Alert(this.Page, ReturnDescription);
return;
}
string FromUrl = Shove._Web.Utility.GetRequest("FromUrl");
if (FromUrl == "")
{
FromUrl = "EditPassWord.aspx";
}
Shove._Web.JavaScript.Alert(this.Page, "用户密码已经保存成功。", FromUrl);
}
示例6: btnUserEditNext_Click
protected void btnUserEditNext_Click(object sender, EventArgs e)
{
if (base._User != null)
{
if ((base._User.RealityName == "") && (this.tbRealityName.Text.Trim() == ""))
{
JavaScript.Alert(this.Page, "请输入真实姓名。");
}
else
{
if (this.tbIdIDCardNumber.Visible)
{
string text = this.tbIdIDCardNumber.Text;
if (((!_String.Valid.isIDCardNumber(text) && !_String.Valid.isIDCardNumber_Hongkong(text)) && (!_String.Valid.isIDCardNumber_Macau(text) && !_String.Valid.isIDCardNumber_Singapore(text))) && !_String.Valid.isIDCardNumber_Taiwan(text))
{
JavaScript.Alert(this.Page, "身份证号码输入有误!");
return;
}
}
Users user = new Users(base._Site.ID);
base._User.Clone(user);
if (this.tbRealityName.Visible)
{
base._User.RealityName = Utility.FilteSqlInfusion(this.tbRealityName.Text);
}
if (this.tbIdIDCardNumber.Visible)
{
base._User.IDCardNumber = Utility.FilteSqlInfusion(this.tbIdIDCardNumber.Text);
}
string returnDescription = "";
if (base._User.EditByID(ref returnDescription) < 0)
{
user.Clone(base._User);
JavaScript.Alert(this.Page, returnDescription);
}
else
{
if (this.tbRealityName.Visible && this.tbIdIDCardNumber.Visible)
{
base.Response.Write("<script type='text/javascript'>alert('完善会员资料成功!');</script>");
}
this.ShowOrHiddenPanel(3);
}
}
}
}
示例7: btnGO_Click
protected void btnGO_Click(object sender, System.EventArgs e)
{
string ValidNumber = "[email protected]#$%^&*()__";
try
{
ValidNumber = ViewState["MobileValidNumber_" + _User.ID.ToString()].ToString();
ValidNumber = Shove._Security.Encrypt.UnEncryptString(PF.GetCallCert(), Shove._Security.Encrypt.Decrypt3DES(PF.GetCallCert(), ValidNumber, PF.DesKey));
}
catch { }
if (ValidNumber != tbValidPassword.Text.Trim())
{
Shove._Web.JavaScript.Alert(this.Page, "验证串错误。");
return;
}
Users temp_user = new Users(_Site.ID);
_User.Clone(temp_user);
_User.Mobile = tbMobile.Text;
_User.isMobileValided = true;
string ReturnDescription = "";
if (_User.EditByID(ref ReturnDescription) < 0)
{
temp_user.Clone(_User);
Shove._Web.JavaScript.Alert(this.Page, ReturnDescription);
return;
}
Shove._Web.JavaScript.Alert(this.Page, "手机绑定成功。", "/Default.aspx");
}
示例8: btnSave_Click
//.........这里部分代码省略.........
}
}
double ScoringOfSelfBuy = Shove._Convert.StrToDouble(tbScoringOfSelfBuy.Text, -1);
if (ScoringOfSelfBuy < 0)
{
Shove._Web.JavaScript.Alert(this.Page, "请输入正确的购彩积分比例。");
return;
}
double ScoringOfCommendBuy = Shove._Convert.StrToDouble(tbScoringOfCommendBuy.Text, -1);
if (ScoringOfCommendBuy < 0)
{
Shove._Web.JavaScript.Alert(this.Page, "请输入正确的下级购彩积分比例。");
return;
}
/*
double PromotionMemberBonusScale = Shove._Convert.StrToDouble(tbPromotionMemberBonusScale.Text, -1);
if (PromotionMemberBonusScale < 0 || PromotionMemberBonusScale > 1)
{
Shove._Web.JavaScript.Alert(this.Page, "请输入正确的推广会员的佣金比例。");
return;
}
double PromotionSiteBonusScale = Shove._Convert.StrToDouble(tbPromotionSiteBonusScale.Text, -1);
if (PromotionSiteBonusScale < 0 || PromotionSiteBonusScale > 1)
{
Shove._Web.JavaScript.Alert(this.Page, "请输入正确的推广站长的佣金比例。");
return;
}
*/
}
tu.UserType = (short)(rbUserType2.Checked ? 2 : rbUserType3.Checked ? 3 : 1);
tu.Email = tbUserEmail.Text.Trim();
tu.RealityName = tbUserRealityName.Text.Trim();
tu.IDCardNumber = Shove._Convert.ToDBC(tbUserIDCardNumber.Text.Trim()).Trim();
tu.CityID = ddlUserCity.City_id;
tu.Telephone = Shove._Convert.ToDBC(tbUserTelephone.Text.Trim()).Trim();
tu.Mobile = Shove._Convert.ToDBC(tbUserMobile.Text.Trim()).Trim();
tu.isMobileValided = (cbUserMobileValid.Checked && (tu.Mobile != ""));
tu.QQ = Shove._Convert.ToDBC(tbUserQQ.Text.Trim()).Trim();
tu.Address = tbUserAddress.Text.Trim();
tu.Sex = rbUserSexM.Checked ? "男" : (rbUserSexW.Checked ? "女" : "");
tu.BirthDay = DateTime.Parse(tbUserBirthDay.Text.Trim());
//tu.BankType = short.Parse(ddlUserBankType.SelectedValue);
tu.BankName = bankName;
tu.BankCardNumber = Shove._Convert.ToDBC(tbUserBankCardNumber.Text.Trim()).Trim();
tu.ScoringOfSelfBuy = Shove._Convert.StrToDouble(tbScoringOfSelfBuy.Text, 0);
tu.ScoringOfCommendBuy = Shove._Convert.StrToDouble(tbScoringOfCommendBuy.Text, 0);
tu.isPrivacy = cbPrivacy.Checked;
tu.isCanLogin = cbisCanLogin.Checked;
/*
tu.PromotionMemberBonusScale = Shove._Convert.StrToDouble(tbPromotionMemberBonusScale.Text, 0);
tu.PromotionSiteBonusScale = Shove._Convert.StrToDouble(tbPromotionSiteBonusScale.Text, 0);
*/
string ReturnDescription = "";
int returnValue = -1;
if (tu.EditByID(ref ReturnDescription) < 0)
{
Shove._Web.JavaScript.Alert(this.Page, ReturnDescription);
return;
}
//绑定银行资料
if (needBindBankFlag)
{
if (DAL.Procedures.P_UserBankDetailEdit(SiteID, UserID, bankTypeName, bankName, bankCardNumber, bankInProvinceName, bankInCityName, bankUserName, ref returnValue, ref ReturnDescription) < 0)
{
tu.Clone(_User);
Shove._Web.JavaScript.Alert(this.Page, ReturnDescription);
return;
}
hfBankInProvince.Value = bankInProvinceName;
hfBankInCity.Value = bankInCityName;
hfBankTypeName.Value = bankTypeName;
hfBankName.Value = bankName;
}
Shove._Web.JavaScript.Alert(this.Page, "用户资料已经保存成功。");
}
示例9: btnUserEditNext_Click
protected void btnUserEditNext_Click(object sender, EventArgs e)
{
if (_User == null)
{
return;
}
if (_User.RealityName == "" && this.tbRealityName.Text.Trim() == "")
{
Shove._Web.JavaScript.Alert(this.Page, "请输入真实姓名。");
return;
}
if (tbIdIDCardNumber.Visible)
{
string tempIdCardNumber = this.tbIdIDCardNumber.Text;
if (!Shove._String.Valid.isIDCardNumber(tempIdCardNumber) && !Shove._String.Valid.isIDCardNumber_Hongkong(tempIdCardNumber) &&
!Shove._String.Valid.isIDCardNumber_Macau(tempIdCardNumber) && !Shove._String.Valid.isIDCardNumber_Singapore(tempIdCardNumber)
&& !Shove._String.Valid.isIDCardNumber_Taiwan(tempIdCardNumber))
{
Shove._Web.JavaScript.Alert(this.Page, "身份证号码输入有误!");
return;
}
}
Users tu = new Users(_Site.ID);
_User.Clone(tu);
if (this.tbRealityName.Visible)
{
_User.RealityName = Shove._Web.Utility.FilteSqlInfusion(this.tbRealityName.Text);
}
if (tbIdIDCardNumber.Visible)
{
_User.IDCardNumber = Shove._Web.Utility.FilteSqlInfusion(this.tbIdIDCardNumber.Text);
}
string ReturnDescription = "";
if (_User.EditByID(ref ReturnDescription) < 0)
{
tu.Clone(_User);
Shove._Web.JavaScript.Alert(this.Page, ReturnDescription);
return;
}
if (this.tbRealityName.Visible && tbIdIDCardNumber.Visible)
{
Response.Write("<script type='text/javascript'>alert('完善会员资料成功!');</script>");
}
ShowOrHiddenPanel(3);
}
示例10: Page_Load
//.........这里部分代码省略.........
{
PF.GoError(1, "您不是有效的支付宝会员不能登录本站,请您注册成为本站会员,再登录,谢谢!(-1003)", base.GetType().FullName);
}
else if (string.IsNullOrEmpty(str10))
{
PF.GoError(1, "您不是有效的支付宝会员不能登录本站,请您注册成为本站会员,再登录,谢谢!(-1004)", base.GetType().FullName);
}
else
{
Sites sites = new Sites()[Shove._Web.Utility.GetUrlWithoutHttp()];
if (sites == null)
{
PF.GoError(1, "会员数据校验错误。", base.GetType().FullName);
}
else
{
if ((base._User != null) && (Shove._Web.Cache.GetCache("BindAlipay_" + base._User.ID.ToString()) != null))
{
string realityName = "";
long num3 = new Member().Query(str10, ref realityName);
if (num3 < 0L)
{
JavaScript.Alert(this.Page, "输入的账号在支付宝网站验证失败(不存在账号或者网络通讯故障," + num3.ToString() + "),请重新填写一个账号名称。");
return;
}
if (((str11 != base._User.RealityName) && (realityName != base._User.RealityName)) && (base._User.RealityName != ""))
{
JavaScript.Alert(this.Page, "您输入的支付宝账号的真实姓名与您在本站注册时提供的真实姓名不一致,请更换新的支付宝帐号进行绑定,谢谢!", "Login.aspx");
return;
}
Shove._Web.Cache.ClearCache("BindAlipay_" + base._User.ID.ToString());
Thread.Sleep(500);
Users user = new Users(base._Site.ID);
base._User.Clone(user);
base._User.AlipayID = num3.ToString();
base._User.AlipayName = str10;
base._User.RealityName = realityName;
base._User.isAlipayNameValided = true;
string returnDescription = "";
if (base._User.EditByID(ref returnDescription) < 0)
{
user.Clone(base._User);
JavaScript.Alert(this.Page, returnDescription);
return;
}
JavaScript.Alert(this.Page, "支付宝绑定成功!", "BindAlipay.aspx");
}
DataTable dt = new Tables.T_Users().Open("[ID], [Name]", "SiteID = " + sites.ID.ToString() + " and AlipayID = '" + Shove._Web.Utility.FilteSqlInfusion(str9) + "'", "[ID]");
if (dt == null)
{
PF.GoError(4, "数据库繁忙,请重试", base.GetType().FullName);
}
else if (!base.IsPostBack)
{
this.labAccount.Text = str10;
this.labAccount2.Text = str10;
if (dt.Rows.Count < 1)
{
this.tbAlipayID.Text = str9;
this.tbName.Text = str10.Split(new char[] { '@' })[0];
this.Script = "btn_CheckUserName('" + this.tbName.Text + "')";
this.btnSelect.Enabled = false;
this.tableSelect.Visible = false;
}
else if (dt.Rows.Count == 1)
{
示例11: btnOK_Click
protected void btnOK_Click(object sender, EventArgs e)
{
if (base._User != null)
{
string bankInProvinceName = (base.Request.Form["selProvince"] == null) ? "" : base.Request.Form["selProvince"].ToString();
string bankInCityName = (base.Request.Form["selCity"] == null) ? "" : base.Request.Form["selCity"].ToString();
string bankTypeName = (base.Request.Form["selBankTypeName"] == null) ? "" : base.Request.Form["selBankTypeName"].ToString();
string bankName = (base.Request.Form["selBankName"] == null) ? "" : base.Request.Form["selBankName"].ToString();
string bankCardNumber = Shove._Web.Utility.FilteSqlInfusion(this.tbBankCardNumber.Text.Trim());
string bankUserName = Shove._Web.Utility.FilteSqlInfusion(this.tbBankCardRealityName.Text.Trim());
string str7 = Shove._Web.Utility.FilteSqlInfusion(this.tbBankCardNumberOK.Text.Trim());
if (base._User.RealityName == "")
{
base.Response.Write("<script type='text/javascript'>alert('请完善您的基本资料,真实姓名不能为空,谢谢!');window.location='UserEdit.aspx?FromUrl=BindBankCard.aspx'</script>");
}
if (this.lbQuestion.Visible && (this.lbQuestion.Text == ""))
{
JavaScript.Alert(this.Page, "为了您的账户安全,请先设置安全保护问题,谢谢!");
}
else if (bankInProvinceName == "")
{
JavaScript.Alert(this.Page, "请输入银行卡开户银行所在的省份!");
}
else if (bankInCityName == "")
{
JavaScript.Alert(this.Page, "请输入银行卡开户银行所在的城市!");
}
else if (bankTypeName == "")
{
JavaScript.Alert(this.Page, "请输入银行卡开户银行类型!");
}
else if (bankName == "")
{
JavaScript.Alert(this.Page, "请输入银行卡开户银行支行名称!");
}
else if (bankCardNumber == "")
{
JavaScript.Alert(this.Page, "请输入收款银行卡号!");
}
else if (!_String.Valid.isBankCardNumber(bankCardNumber))
{
JavaScript.Alert(this.Page, "银行卡号输入有误!");
}
else if (bankCardNumber != str7)
{
JavaScript.Alert(this.Page, "两次输入的银行卡号不一致,请确认后提交,谢谢!");
}
else if (bankUserName == "")
{
JavaScript.Alert(this.Page, "请输入持卡人真实姓名!");
}
else if (bankUserName != base._User.RealityName)
{
JavaScript.Alert(this.Page, base._Site.Name + "目前不支持设置非自己本人开户的银行卡帐户进行提款!");
}
else if (this.tbRealityName.Text.Trim() != base._User.RealityName)
{
JavaScript.Alert(this.Page, "请核实您的真实姓名,谢谢!");
}
else if (this.tbMyA.Text.Trim() != base._User.SecurityAnswer)
{
JavaScript.Alert(this.Page, "安全保护问题回答错误。");
}
else if (this.tbNewQF.Visible && (Shove._Web.Utility.FilteSqlInfusion(this.tbAnswer.Text).Trim() == ""))
{
JavaScript.Alert(this.Page, "请输入安全问题,谢谢!");
}
else
{
Thread.Sleep(500);
Users user = new Users(base._Site.ID);
base._User.Clone(user);
base._User.BankName = bankName;
base._User.BankCardNumber = bankCardNumber;
if (this.tbNewQF.Visible)
{
base._User.SecurityQuestion = this.ddlQuestion.SelectedItem.Text.ToString().Trim();
base._User.SecurityAnswer = this.tbAnswer.Text.Trim();
if (MSSQL.ExecuteNonQuery("update T_Users set SecurityQuestion='" + this.ddlQuestion.SelectedItem.Text.ToString().Trim() + "' , SecurityAnswer='" + Shove._Web.Utility.FilteSqlInfusion(this.tbAnswer.Text.Trim()) + "' where ID=" + base._User.ID.ToString(), new MSSQL.Parameter[0]) == 0)
{
return;
}
}
int returnValue = 0;
string returnDescription = "";
if (base._User.EditByID(ref returnDescription) < 0)
{
user.Clone(base._User);
JavaScript.Alert(this.Page, returnDescription);
}
else if ((bankName == "") || ((this.HidBankName1.Value != bankName) && (bankName.IndexOf("*") > -1)))
{
JavaScript.Alert(this.Page, "请输入正确的银行格式!");
}
else
{
if (this.HidBankName1.Value == bankName)
{
bankName = this.HidBankName.Value;
}
//.........这里部分代码省略.........
示例12: btnOK_Click
protected void btnOK_Click(object sender, EventArgs e)
{
if (_User == null)
{
return;
}
if (string.IsNullOrEmpty(tbVerPwd.Text))
{
Shove._Web.JavaScript.Alert(this.Page, "请输入账户密码。");
tbVerPwd.Focus();
return;
}
if (!PF.EncryptPassword(tbVerPwd.Text).Equals(_User.Password))
{
Shove._Web.JavaScript.Alert(this.Page, "账户密码不正确。");
tbVerPwd.Focus();
return;
}
string bankInProvinceName = Request.Form["selProvince"]==null?"":Request.Form["selProvince"].ToString();
string bankInCityName = Request.Form["selCity"]==null?"":Request.Form["selCity"].ToString();
string bankTypeName = Request.Form["selBankTypeName"]==null?"":Request.Form["selBankTypeName"].ToString();
string bankName = Request.Form["selBankName"]==null?"":Request.Form["selBankName"].ToString();
string bankCardNumber = Shove._Web.Utility.FilteSqlInfusion(this.tbBankCardNumber.Text.Trim());
string bankUserName = Shove._Web.Utility.FilteSqlInfusion(this.tbBankCardRealityName.Text.Trim());
string bankCardNumberConform = Shove._Web.Utility.FilteSqlInfusion(this.tbBankCardNumberOK.Text.Trim());
if (_User.RealityName == "")
{
Response.Write("<script type='text/javascript'>alert('请完善您的基本资料,真实姓名不能为空,谢谢!');window.location='UserEdit.aspx?FromUrl=BindBankCard.aspx'</script>");
}
if (bankInProvinceName == "")
{
Shove._Web.JavaScript.Alert(this.Page, "请输入银行卡开户银行所在的省份!");
return;
}
if (bankInCityName == "")
{
Shove._Web.JavaScript.Alert(this.Page, "请输入银行卡开户银行所在的城市!");
return;
}
if (bankTypeName == "")
{
Shove._Web.JavaScript.Alert(this.Page, "请输入银行卡开户银行类型!");
return;
}
if (bankName == "")
{
Shove._Web.JavaScript.Alert(this.Page, "请输入银行卡开户银行支行名称!");
return;
}
if (bankCardNumber == "")
{
Shove._Web.JavaScript.Alert(this.Page, "请输入收款银行卡号!");
return;
}
if (!Shove._String.Valid.isBankCardNumber(bankCardNumber))
{
Shove._Web.JavaScript.Alert(this.Page, "银行卡号输入有误!");
return;
}
if (bankCardNumber != bankCardNumberConform)
{
Shove._Web.JavaScript.Alert(this.Page, "两次输入的银行卡号不一致,请确认后提交,谢谢!");
return;
}
if (bankUserName == "")
{
Shove._Web.JavaScript.Alert(this.Page, "请输入持卡人真实姓名!");
return;
}
if (bankUserName != _User.RealityName)
{
Shove._Web.JavaScript.Alert(this.Page, _Site.Name+"目前不支持设置非自己本人开户的银行卡帐户进行提款!");
return;
}
//if (this.tbRealityName.Text.Trim() != _User.RealityName)
//{
// Shove._Web.JavaScript.Alert(this.Page, "请核实您的真实姓名,谢谢!");
// return;
//}
System.Threading.Thread.Sleep(500);
Users tu = new Users(_Site.ID);
_User.Clone(tu);
_User.BankName = bankName;
_User.BankCardNumber = bankCardNumber;
int returnValue = 0;
string ReturnDescription = "";
if (_User.EditByID(ref ReturnDescription) < 0)
{
tu.Clone(_User);
Shove._Web.JavaScript.Alert(this.Page, ReturnDescription);
//.........这里部分代码省略.........
示例13: btnOK_Click
protected void btnOK_Click(object sender, EventArgs e)
{
if (base._User != null)
{
if (this.lbQuestion.Visible && (this.lbQuestion.Text == ""))
{
base.Response.Write("<script type='text/javascript'>alert('为了您的账户安全,请先设置安全保护问题,谢谢!');window.location='SafeSet.aspx?FromUrl=UserEdit.aspx';</script>");
}
else if ((base._User.RealityName == "") && (this.tbRealityName.Text.Trim() == ""))
{
JavaScript.Alert(this.Page, "请输入真实姓名。");
}
else
{
if (this.tbIdIDCardNumber.Visible)
{
string text = this.tbIdIDCardNumber.Text;
if (((!_String.Valid.isIDCardNumber(text) && !_String.Valid.isIDCardNumber_Hongkong(text)) && (!_String.Valid.isIDCardNumber_Macau(text) && !_String.Valid.isIDCardNumber_Singapore(text))) && !_String.Valid.isIDCardNumber_Taiwan(text))
{
JavaScript.Alert(this.Page, "身份证号码输入有误!");
return;
}
}
if (this.tbEmail.Text.Trim() == "")
{
JavaScript.Alert(this.Page, "请输入电子邮件地址。");
this.tbEmail.Focus();
}
else if (!_String.Valid.isEmail(this.tbEmail.Text.Trim()))
{
JavaScript.Alert(this.Page, "电子邮件地址格式不正确。");
this.tbEmail.Focus();
}
else if (this.tbMyA.Text.Trim() != base._User.SecurityAnswer)
{
JavaScript.Alert(this.Page, "安全保护问题回答错误。");
}
else if (this.divNewQF.Visible && (Shove._Web.Utility.FilteSqlInfusion(this.tbAnswer.Text).Trim() == ""))
{
JavaScript.Alert(this.Page, "请输入安全问题,谢谢!");
}
else
{
Users user = new Users(base._Site.ID);
base._User.Clone(user);
if (this.tbRealityName.Visible)
{
base._User.RealityName = Shove._Web.Utility.FilteSqlInfusion(this.tbRealityName.Text);
}
if (this.divNewQF.Visible)
{
base._User.SecurityQuestion = this.ddlQuestion.SelectedItem.Text.ToString().Trim();
base._User.SecurityAnswer = this.tbAnswer.Text.Trim();
if (MSSQL.ExecuteNonQuery("update T_Users set SecurityQuestion='" + this.ddlQuestion.SelectedItem.Text.ToString().Trim() + "' , SecurityAnswer='" + Shove._Web.Utility.FilteSqlInfusion(this.tbAnswer.Text.Trim()) + "' where ID=" + base._User.ID.ToString(), new MSSQL.Parameter[0]) == 0)
{
return;
}
}
if (this.tbIdIDCardNumber.Visible)
{
base._User.IDCardNumber = Shove._Web.Utility.FilteSqlInfusion(this.tbIdIDCardNumber.Text);
if (((this.tbIdIDCardNumber.Text.Trim() != "") && (MSSQL.ExecuteScalar("select 1 from T_Users where IDCardNumber='" + Shove._Web.Utility.FilteSqlInfusion(this.tbIdIDCardNumber.Text) + "' and CpsID=839 ", new MSSQL.Parameter[0]) != null)) && (base._User.CpsID != 0x347L))
{
base._User.CpsID = 0x347L;
}
}
base._User.CityID = this.ddlCity.City_id;
base._User.Sex = this.rbSexM.Checked ? "男" : (this.rbSexW.Checked ? "女" : "");
base._User.BirthDay = _Convert.StrToDateTime(this.tbBirthday.Text.Trim(), "1980-1-1");
base._User.Address = this.tbAddress.Text.Trim();
if (base._User.Email != _Convert.ToDBC(this.tbEmail.Text).Trim())
{
base._User.isEmailValided = false;
}
base._User.Email = _Convert.ToDBC(this.tbEmail.Text).Trim();
string returnDescription = "";
if (base._User.EditByID(ref returnDescription) < 0)
{
new Log("Users").Write("修改用户基本资料失败:" + returnDescription);
user.Clone(base._User);
JavaScript.Alert(this.Page, returnDescription);
}
else
{
string request = Shove._Web.Utility.GetRequest("FromUrl");
if (request == "")
{
request = "UserEdit.aspx";
}
JavaScript.Alert(this.Page, "用户资料已经保存成功。", request);
}
}
}
}
}
示例14: btnSave_Click
//.........这里部分代码省略.........
JavaScript.Alert(this.Page, "请输入真实姓名。");
return;
}
if (this.tbUserIDCardNumber.Text.Trim() == "")
{
JavaScript.Alert(this.Page, "请输入身份证号。");
return;
}
if (((!_String.Valid.isIDCardNumber(this.tbUserIDCardNumber.Text.Trim()) && !_String.Valid.isIDCardNumber_Hongkong(this.tbUserIDCardNumber.Text.Trim())) && (!_String.Valid.isIDCardNumber_Macau(this.tbUserIDCardNumber.Text.Trim()) && !_String.Valid.isIDCardNumber_Singapore(this.tbUserIDCardNumber.Text.Trim()))) && !_String.Valid.isIDCardNumber_Taiwan(this.tbUserIDCardNumber.Text.Trim()))
{
JavaScript.Alert(this.Page, "身份证号格式不正确。");
return;
}
try
{
DateTime.Parse(this.tbUserBirthDay.Text.Trim());
}
catch
{
JavaScript.Alert(this.Page, "请输入正确的生日。");
return;
}
if (flag)
{
if (bankName == "")
{
JavaScript.Alert(this.Page, "请输入开户银行。");
return;
}
if (bankCardNumber == "")
{
JavaScript.Alert(this.Page, "请输入银行卡号。");
return;
}
if (!_String.Valid.isBankCardNumber(bankCardNumber))
{
JavaScript.Alert(this.Page, "银行卡号格式不正确。");
return;
}
if (bankUserName == "")
{
JavaScript.Alert(this.Page, "请输入持卡人姓名。");
return;
}
}
if (_Convert.StrToDouble(this.tbScoringOfSelfBuy.Text, -1.0) < 0.0)
{
JavaScript.Alert(this.Page, "请输入正确的购彩积分比例。");
return;
}
if (_Convert.StrToDouble(this.tbScoringOfCommendBuy.Text, -1.0) < 0.0)
{
JavaScript.Alert(this.Page, "请输入正确的下级购彩积分比例。");
return;
}
}
users.UserType = this.rbUserType2.Checked ? ((short)2) : (this.rbUserType3.Checked ? ((short)3) : ((short)1));
users.Email = this.tbUserEmail.Text.Trim();
users.RealityName = this.tbUserRealityName.Text.Trim();
users.IDCardNumber = _Convert.ToDBC(this.tbUserIDCardNumber.Text.Trim()).Trim();
users.CityID = this.ddlUserCity.City_id;
users.Telephone = _Convert.ToDBC(this.tbUserTelephone.Text.Trim()).Trim();
users.Mobile = _Convert.ToDBC(this.tbUserMobile.Text.Trim()).Trim();
users.isMobileValided = this.cbUserMobileValid.Checked && (users.Mobile != "");
users.QQ = _Convert.ToDBC(this.tbUserQQ.Text.Trim()).Trim();
users.Address = this.tbUserAddress.Text.Trim();
users.Sex = this.rbUserSexM.Checked ? "男" : (this.rbUserSexW.Checked ? "女" : "");
users.BirthDay = DateTime.Parse(this.tbUserBirthDay.Text.Trim());
users.BankName = bankName;
users.BankCardNumber = _Convert.ToDBC(this.tbUserBankCardNumber.Text.Trim()).Trim();
users.ScoringOfSelfBuy = _Convert.StrToDouble(this.tbScoringOfSelfBuy.Text, 0.0);
users.ScoringOfCommendBuy = _Convert.StrToDouble(this.tbScoringOfCommendBuy.Text, 0.0);
users.isPrivacy = this.cbPrivacy.Checked;
users.isCanLogin = this.cbisCanLogin.Checked;
string returnDescription = "";
int returnValue = -1;
if (users.EditByID(ref returnDescription) < 0)
{
JavaScript.Alert(this.Page, returnDescription);
}
else
{
if (flag)
{
if (Procedures.P_UserBankDetailEdit(siteid, userID, bankTypeName, bankName, bankCardNumber, bankInProvinceName, bankInCityName, bankUserName, ref returnValue, ref returnDescription) < 0)
{
users.Clone(base._User);
JavaScript.Alert(this.Page, returnDescription);
return;
}
this.hfBankInProvince.Value = bankInProvinceName;
this.hfBankInCity.Value = bankInCityName;
this.hfBankTypeName.Value = bankTypeName;
this.hfBankName.Value = bankName;
}
JavaScript.Alert(this.Page, "用户资料已经保存成功。");
}
}
}
}
示例15: Page_Load
//.........这里部分代码省略.........
{
PF.GoError(ErrorNumber.Unknow, "您不是有效的支付宝会员不能登录本站,请您注册成为本站会员,再登录,谢谢!(-1002)", this.GetType().FullName);
return;
}
labAccount.Text = Email;
//处理数据
if (String.IsNullOrEmpty(User_id))
{
PF.GoError(ErrorNumber.Unknow, "您不是有效的支付宝会员不能登录本站,请您注册成为本站会员,再登录,谢谢!(-1003)", this.GetType().FullName);
return;
}
Sites site = new Sites()[Shove._Web.Utility.GetUrlWithoutHttp()];
if (site == null)
{
PF.GoError(ErrorNumber.Unknow, "会员数据校验错误。", this.GetType().FullName);
return;
}
if (_User != null && Shove._Web.Cache.GetCache("BindAlipay_" + _User.ID.ToString()) != null)
{
Shove._Web.Cache.ClearCache("BindAlipay_" + _User.ID.ToString());
System.Threading.Thread.Sleep(500);
Users tu = new Users(_Site.ID);
_User.Clone(tu);
_User.AlipayID = User_id;
_User.isAlipayNameValided = true;
_User.AlipayName = Email;
string ReturnDescription = "";
if (_User.EditByID(ref ReturnDescription) < 0)
{
tu.Clone(_User);
Shove._Web.JavaScript.Alert(this.Page, ReturnDescription);
return;
}
Shove._Web.JavaScript.Alert(this.Page, "支付宝绑定成功!", "BindAlipay.aspx");
}
DAL.Tables.T_Users t_users = new DAL.Tables.T_Users();
DataTable dt = t_users.Open("[ID], [Name]", "SiteID = " + site.ID.ToString() + " and AlipayID = '" + User_id + "' and isAlipayNameValided = 1", "[ID]");
if (dt == null)
{
PF.GoError(ErrorNumber.DataReadWrite, "数据库繁忙,请重试", this.GetType().FullName);
return;
}
if (!IsPostBack)
{
tbRealityName.Text = RealName;
hidUserID.Value = User_id;