本文整理汇总了C#中Users.GetPromotionURL方法的典型用法代码示例。如果您正苦于以下问题:C# Users.GetPromotionURL方法的具体用法?C# Users.GetPromotionURL怎么用?C# Users.GetPromotionURL使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Users
的用法示例。
在下文中一共展示了Users.GetPromotionURL方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: btnReg_Click
//.........这里部分代码省略.........
{
str = str + "电子邮件地址格式不正确.\r\n";
}
if (!this.ckbAgree.Checked)
{
str = str + "必须同意本站会员注册协议才能注册会员。\r\n";
}
if (this.CheckCode2.Visible)
{
if (this.tbCheckCode.Text.Trim() == "")
{
str = str + "请输入验证码!\n";
}
else if (!this.ShoveCheckCode1.Valid(this.tbCheckCode.Text.Trim()))
{
str = str + "验证码输入有误!\n";
}
}
if (str != "")
{
this.lblInputError.Visible = true;
this.lblInputError.Text = "输入资料错误:\r\n" + str;
}
else
{
long num = -1L;
long num2 = -1L;
if (this.Session[this.KeyPromotionUserID] != null)
{
num2 = _Convert.StrToLong(this.Session[this.KeyPromotionUserID].ToString(), -1L);
}
object obj2 = MSSQL.ExecuteScalar("select ID from T_Cps where OwnerUserID=" + num2, new MSSQL.Parameter[0]);
if (obj2 != null)
{
num = _Convert.StrToLong(obj2.ToString(), -1L);
}
Thread.Sleep(500);
string str2 = this.tbUserName.Text.Trim();
string str3 = this.tbPassword.Text.Trim();
string str4 = this.tbEmail.Text.Trim();
string str5 = this.tbTel.Text.Trim();
string str6 = this.tbQQ.Text.Trim();
Users users = new Users(base._Site.ID)
{
Name = str2,
Password = str3,
Email = str4,
Mobile = str5,
QQ = str6,
UserType = 2
};
if (num > 0L)
{
users.CommenderID = -1L;
users.CpsID = num;
}
else
{
users.CommenderID = num2;
users.CpsID = -1L;
}
string returnDescription = "";
if (users.Add(ref returnDescription) < 0)
{
JavaScript.Alert(this, returnDescription);
}
else
{
double num4 = 0.0;
DataTable table = new Tables.T_Sites().Open("Opt_CpsBonusScale", "", "");
if ((table != null) && (table.Rows.Count > 0))
{
num4 = double.Parse(table.Rows[0]["Opt_CpsBonusScale"].ToString());
}
users.cps.SiteID = 1L;
users.cps.CommendID = num2;
users.cps.Name = this.tbSiteName.Text;
users.cps.Url = this.tbSiteURL.Text;
users.cps.BonusScale = num4;
users.cps.ON = true;
users.cps.Telephone = this.tbTel.Text.Trim();
users.cps.Email = str4;
users.cps.QQ = str6;
users.cps.Type = 2;
users.cps.DomainName = users.GetPromotionURL(0);
if (users.cps.Add(ref returnDescription) < 0)
{
JavaScript.Alert(this, returnDescription);
}
else if (users.Login(ref returnDescription) < 0)
{
JavaScript.Alert(this, returnDescription);
}
else
{
base.Response.Redirect("../../Default.aspx");
}
}
}
}
示例2: btnReg_Click
//.........这里部分代码省略.........
lblInputError.Visible = true;
lblInputError.Text = "输入资料错误:\r\n" + inputErrorInfo;
return;
}
long CpsID = -1;
long CommenderID = -1;
if (Session[KeyPromotionUserID] != null)
{
CommenderID = Shove._Convert.StrToLong(Session[KeyPromotionUserID].ToString(), -1);
}
//检查推荐人是否为CPS商家,是就把此会员标记CSPID
object tempOjb = Shove.Database.MSSQL.ExecuteScalar("select ID from T_Cps where OwnerUserID=" + CommenderID, new Shove.Database.MSSQL.Parameter[0]);
if (tempOjb != null)
{
CpsID = Shove._Convert.StrToLong(tempOjb.ToString(), -1);
}
System.Threading.Thread.Sleep(500);
string Name = tbUserName.Text.Trim();
string Password = tbPassword.Text.Trim();
string Email = tbEmail.Text.Trim();
string Mobile = tbTel.Text.Trim();
string QQ = tbQQ.Text.Trim();
Users user = new Users(_Site.ID);
user.Name = Name;
user.Password = Password;
user.Email = Email;
user.Mobile = Mobile;
user.QQ = QQ;
user.UserType = 2;
if (CpsID > 0)//推荐人为cps商家就填CpsID字段
{
user.CommenderID = -1;
user.CpsID = CpsID;
}
else
{
user.CommenderID = CommenderID;
user.CpsID = -1;
}
string ReturnDescription = "";
int Result = user.Add(ref ReturnDescription);
if (Result < 0)
{
Shove._Web.JavaScript.Alert(this, ReturnDescription);
return;
}
else //注册成功,加入CPS站长商家
{
double cpsBonusScale = 0.00;
DataTable dtTemp = new DAL.Tables.T_Sites().Open("Opt_CpsBonusScale", "", "");
if (dtTemp != null && dtTemp.Rows.Count > 0)
cpsBonusScale = double.Parse(dtTemp.Rows[0]["Opt_CpsBonusScale"].ToString());
user.cps.SiteID = 1;
user.cps.CommendID = CommenderID;
user.cps.Name = tbSiteName.Text;
user.cps.Url = tbSiteURL.Text;
user.cps.BonusScale = cpsBonusScale;
user.cps.ON = true;
user.cps.Telephone = tbTel.Text.Trim();
user.cps.Email = Email;
user.cps.QQ = QQ;
user.cps.Type = 2;
user.cps.DomainName = user.GetPromotionURL(0);
if (user.cps.Add(ref ReturnDescription) < 0)
{
Shove._Web.JavaScript.Alert(this, ReturnDescription);
return;
}
}
Result = user.Login(ref ReturnDescription);
if (Result < 0)
{
Shove._Web.JavaScript.Alert(this, ReturnDescription);
return;
}
Response.Redirect("../../Default.aspx");
}