protected void Page_Load(object sender, EventArgs e) { if (!this.IsPostBack) { long Cpsid = Shove._Convert.StrToLong(Shove._Web.Utility.FilteSqlInfusion(Shove._Web.Utility.GetRequest("ID")), -1); Cps curCps = new Cps(); curCps.SiteID = _Site.ID; curCps.ID = Cpsid; string returndescription = string.Empty; curCps.GetCpsInformationByID(ref returndescription); if (_User.cps.ID < 0 || curCps.ID < 0 || _User.cps.ID != curCps.ParentID) { PF.GoError(ErrorNumber.NotEnoughCompetence, "当前推广员不是你发展的下线,没有权限查看.", this.GetType().BaseType.FullName); return; } hfCpsID.Value = Cpsid.ToString(); hfOwnerUserID.Value = curCps.OwnerUserID.ToString(); lblCpsName.Text = curCps.Name; BindData(); } }
protected void Page_Load(object sender, EventArgs e) { if (!this.IsPostBack) { Cps cps = new Cps(); cps.SiteID = _Site.ID; cps.ID = Shove._Convert.StrToLong(Shove._Web.Utility.FilteSqlInfusion(Shove._Web.Utility.GetRequest("ID")), -1); string returndescription = ""; cps.GetCpsInformationByID(ref returndescription); tbUrlName.Text = cps.Name; tbUrl.Text = cps.Url; tbMD5Key.Text = cps.MD5Key; tbContactPerson.Text = cps.ContactPerson; tbPhone.Text = cps.Telephone; tbMobile.Text = cps.Mobile; tbQQNum.Text = cps.QQ; tbEmail.Text = cps.Email; tbDomainName.Text = cps.DomainName; linkBonusScale.NavigateUrl = "BonusScaleSetupForCps.aspx?ID=" + Shove._Web.Utility.GetRequest("ID"); if (cps.Type == 2) { lbType.Text = "代理商"; trMD5Key.Visible = true; } } }
protected void Page_Load(object sender, EventArgs e) { if (!this.IsPostBack) { long Cpsid = Shove._Convert.StrToLong(Shove._Web.Utility.FilteSqlInfusion(Shove._Web.Utility.GetRequest("ID")), -1); Cps curCps = new Cps(); curCps.SiteID = _Site.ID; curCps.ID = Cpsid; string returndescription = string.Empty; curCps.GetCpsInformationByID(ref returndescription); if (_User.cps.ID < 0 || curCps.ID < 0 || _User.cps.ID != curCps.ParentID) { PF.GoError(ErrorNumber.NotEnoughCompetence, "当前推广员不是你发展的下线,没有权限查看.", this.GetType().BaseType.FullName); return; } hfCpsID.Value = Cpsid.ToString(); hfOwnerUserID.Value = curCps.OwnerUserID.ToString(); lblCpsName.Text = curCps.Name; BindData(); } }
protected void Page_Load(object sender, EventArgs e) { if (!this.IsPostBack) { Cps cps = new Cps(); cps.SiteID = _Site.ID; cps.ID = Shove._Convert.StrToLong(Shove._Web.Utility.FilteSqlInfusion(Shove._Web.Utility.GetRequest("ID")), -1); string returndescription = ""; cps.GetCpsInformationByID(ref returndescription); tbUrlName.Text = cps.Name; tbUrl.Text = cps.Url; tbMD5Key.Text = cps.MD5Key; tbContactPerson.Text = cps.ContactPerson; tbPhone.Text = cps.Telephone; tbMobile.Text = cps.Mobile; tbQQNum.Text = cps.QQ; tbEmail.Text = cps.Email; tbDomainName.Text = cps.DomainName; linkBonusScale.NavigateUrl = "BonusScaleSetupForCps.aspx?ID=" + Shove._Web.Utility.GetRequest("ID"); if (cps.Type == 2) { lbType.Text = "代理商"; trMD5Key.Visible = true; } } }
protected void Page_Load(object sender, EventArgs e) { if (!this.IsPostBack) { long Cpsid = Shove._Convert.StrToLong(Shove._Web.Utility.FilteSqlInfusion(Shove._Web.Utility.GetRequest("ID")), -1); Cps curCps = new Cps(); curCps.SiteID = _Site.ID; curCps.ID = Cpsid; string returndescription = string.Empty; curCps.GetCpsInformationByID(ref returndescription); hfCpsID.Value = Cpsid.ToString(); hfOwnerUserID.Value = curCps.OwnerUserID.ToString(); lblCpsName.Text = curCps.Name; linkReturn.NavigateUrl = "BaseInfo.aspx?ID=" + Cpsid; BindData(); } }
protected void Page_Load(object sender, EventArgs e) { if (!this.IsPostBack) { long Cpsid = Shove._Convert.StrToLong(Shove._Web.Utility.FilteSqlInfusion(Shove._Web.Utility.GetRequest("ID")), -1); Cps curCps = new Cps(); curCps.SiteID = _Site.ID; curCps.ID = Cpsid; string returndescription = string.Empty; curCps.GetCpsInformationByID(ref returndescription); hfCpsID.Value = Cpsid.ToString(); hfOwnerUserID.Value = curCps.OwnerUserID.ToString(); lblCpsName.Text = curCps.Name; linkReturn.NavigateUrl = "BaseInfo.aspx?ID=" + Cpsid; BindData(); } }
private void BindData() { long Cpsid = Shove._Convert.StrToLong(Shove._Web.Utility.FilteSqlInfusion(Shove._Web.Utility.GetRequest("ID")), -1); Cps curCps = new Cps(); curCps.SiteID = _Site.ID; curCps.ID = Cpsid; string returndescription = string.Empty; curCps.GetCpsInformationByID(ref returndescription); string cacheKeyScaleList = "Cps_Admin_BonusScaleView_ScaleList_" + curCps.OwnerUserID.ToString(); DataTable dt = Shove._Web.Cache.GetCacheAsDataTable(cacheKeyScaleList); if (dt == null) { int returnValue = -1; string returnDescription = ""; DataSet ds = null; int Result = DAL.Procedures.P_CpsGetUserBonusScaleList(ref ds, curCps.OwnerUserID, ref returnValue, ref returnDescription); if (Result < 0) { Shove._Web.JavaScript.Alert(this.Page, "系统出错!"); return; } if (ds == null || ds.Tables.Count < 1) { Shove._Web.JavaScript.Alert(this.Page, "获取数据出错!"); return; } dt = ds.Tables[0]; Shove._Web.Cache.SetCache(cacheKeyScaleList, dt, 100000); } PF.DataGridBindData(g, dt, gPager); }
private void BindData() { long Cpsid = Shove._Convert.StrToLong(Shove._Web.Utility.FilteSqlInfusion(Shove._Web.Utility.GetRequest("ID")), -1); Cps curCps = new Cps(); curCps.SiteID = _Site.ID; curCps.ID = Cpsid; string returndescription = string.Empty; curCps.GetCpsInformationByID(ref returndescription); string cacheKeyScaleList = "Cps_Admin_BonusScaleView_ScaleList_" + curCps.OwnerUserID.ToString(); DataTable dt = Shove._Web.Cache.GetCacheAsDataTable(cacheKeyScaleList); if (dt == null ) { int returnValue=-1; string returnDescription=""; DataSet ds = null; int Result = DAL.Procedures.P_CpsGetUserBonusScaleList(ref ds, curCps.OwnerUserID, ref returnValue, ref returnDescription); if (Result < 0) { Shove._Web.JavaScript.Alert(this.Page, "系统出错!"); return; } if (ds == null || ds.Tables.Count < 1) { Shove._Web.JavaScript.Alert(this.Page, "获取数据出错!"); return; } dt = ds.Tables[0]; Shove._Web.Cache.SetCache(cacheKeyScaleList, dt, 100000); } PF.DataGridBindData(g, dt, gPager); }
protected void btnOK_Click(object sender, EventArgs e) { string Cpsid = Shove._Convert.StrToLong(Shove._Web.Utility.FilteSqlInfusion(Shove._Web.Utility.GetRequest("ID")), -1).ToString(); Cps cps = new Cps(); cps.ID = Shove._Convert.StrToLong(Cpsid, -1); cps.SiteID = _Site.ID; string ReturnDescription = ""; cps.GetCpsInformationByID(ref ReturnDescription); string url = tbUrl.Text; if (!url.StartsWith("http://")) { url = "http://" + url; } Regex regex = new Regex(@"^http://([\w-]+\.)+[\w-]+(/[\w-./?%&=]*)?$", RegexOptions.IgnoreCase | RegexOptions.Compiled); Match m = regex.Match(url); if (!m.Success) { Shove._Web.JavaScript.Alert(this.Page, "网址填写错误"); return; } if (tbUrlName.Text.Trim() == "") { Shove._Web.JavaScript.Alert(this.Page, "请输入网站名称!"); return; } if (!Shove._String.Valid.isMobile(tbMobile.Text)) { Shove._Web.JavaScript.Alert(this.Page, "输入手机号码格式不正确。"); return; } if (!Shove._String.Valid.isEmail(tbEmail.Text)) { Shove._Web.JavaScript.Alert(this.Page, "输入Email格式不正确。"); return; } string DomainName = tbDomainName.Text; cps.Name = tbUrlName.Text; cps.Url = url; cps.MD5Key = tbMD5Key.Text; cps.ContactPerson = tbContactPerson.Text; cps.Telephone = tbPhone.Text; cps.Mobile = tbMobile.Text; cps.QQ = tbQQNum.Text; cps.Email = tbEmail.Text; cps.DomainName = DomainName; if (cps.DomainName.Trim() == "") { cps.DomainName = Shove._Web.Utility.GetUrl() + "/Default.aspx?cpsid=" + Shove._Web.Utility.GetRequest("ID"); } if (cps.EditByID(ref ReturnDescription) < 0) { Shove._Web.JavaScript.Alert(this.Page, ReturnDescription); return; } Shove._Web.JavaScript.Alert(this.Page, "基本信息修改成功!"); }
protected void btnOK_Click(object sender, EventArgs e) { string Cpsid = Shove._Convert.StrToLong(Shove._Web.Utility.FilteSqlInfusion(Shove._Web.Utility.GetRequest("ID")), -1).ToString(); Cps cps = new Cps(); cps.ID = Shove._Convert.StrToLong(Cpsid, -1); cps.SiteID = _Site.ID; string ReturnDescription = ""; cps.GetCpsInformationByID(ref ReturnDescription); string url = tbUrl.Text; if (!url.StartsWith("http://")) { url = "http://" + url; } Regex regex = new Regex(@"^http://([\w-]+\.)+[\w-]+(/[\w-./?%&=]*)?$", RegexOptions.IgnoreCase | RegexOptions.Compiled); Match m = regex.Match(url); if (!m.Success) { Shove._Web.JavaScript.Alert(this.Page, "网址填写错误"); return; } if (tbUrlName.Text.Trim() == "") { Shove._Web.JavaScript.Alert(this.Page, "请输入网站名称!"); return; } if (!Shove._String.Valid.isMobile(tbMobile.Text)) { Shove._Web.JavaScript.Alert(this.Page, "输入手机号码格式不正确。"); return; } if (!Shove._String.Valid.isEmail(tbEmail.Text)) { Shove._Web.JavaScript.Alert(this.Page, "输入Email格式不正确。"); return; } string DomainName = tbDomainName.Text; cps.Name = tbUrlName.Text; cps.Url = url; cps.MD5Key = tbMD5Key.Text; cps.ContactPerson = tbContactPerson.Text; cps.Telephone = tbPhone.Text; cps.Mobile = tbMobile.Text; cps.QQ = tbQQNum.Text; cps.Email = tbEmail.Text; cps.DomainName = DomainName; if (cps.DomainName.Trim() == "") { cps.DomainName = Shove._Web.Utility.GetUrl() + "/Default.aspx?cpsid=" + Shove._Web.Utility.GetRequest("ID"); } if (cps.EditByID(ref ReturnDescription) < 0) { Shove._Web.JavaScript.Alert(this.Page, ReturnDescription); return; } Shove._Web.JavaScript.Alert(this.Page, "基本信息修改成功!"); }