public static Guidec GetGuidec(int adId) { Guidec guidec = new Guidec(); using (DataSet ds = provider.GetGuidec(adId)) { if (Common.Util.CheckDataSet(ds)) { DataRow reader = ds.Tables[0].Rows[0]; guidec.Id = Util.ChangeStrToInt(reader["id"].ToString()); guidec.Title = reader["title"].ToString(); guidec.Link = reader["link"].ToString(); guidec.Context = reader["context"].ToString(); guidec.WordLnk = Util.ConvertToInt(reader["wordlnk"].ToString()); guidec.AdText1 = reader["adtext1"].ToString(); guidec.AdLink1 = reader["adlink1"].ToString(); guidec.AdText2 = reader["adtext2"].ToString(); guidec.AdLink2 = reader["adlink2"].ToString(); guidec.Prompt = reader["prompt"].ToString(); guidec.Tel1 = reader["tel1"].ToString(); guidec.Tel2 = reader["tel2"].ToString(); } } return(guidec); }
protected void Page_Load(object sender, EventArgs e) { int siteid = Common.Util.GetPageParamsAndToInt("siteid"); HtmlCount.AnalysisAdd(); Entity.Site site = Logic.Consult.GetWebSite(siteid); Guidec guidec = Logic.Consult.GetGuidec(site.AdId); Response.Redirect(guidec.Link, true); }
public static void GuidecEdit(int id) { int guidecnum = Common.Util.GetPageParamsAndToInt("guidecnum"); if (guidecnum == -100) { MsgBox.Alert("WebSiteAdd", "<p>商务通错误</p>"); return; } string title = Common.Util.GetPageParams("guidechead"); string link = Common.Util.GetPageParams("guideclink"); string article = "", articlelink = ""; for (int i = 1; i <= guidecnum; i++) { if (Common.Util.GetPageParams("article" + i.ToString()) == "") { article += " |||"; } else { article += Common.Util.GetPageParams("article" + i.ToString()) + "|||"; } if (Common.Util.GetPageParams("articlelink" + i.ToString()) == "") { articlelink += " |||"; } else { articlelink += Common.Util.GetPageParams("articlelink" + i.ToString()) + "|||"; } } if (article.Length > 0) { article = article.Substring(0, article.Length - 3); } if (articlelink.Length > 0) { articlelink = articlelink.Substring(0, articlelink.Length - 3); } string guideccontent = Common.Util.GetPageParams("guideccontent"); Guidec guidec = new Guidec(); guidec.Id = id; guidec.Title = title; guidec.Link = link; Consult.GuidecEdit(guidec); }
public static void SaveStep41(int siteid) { Site site = Logic.Consult.GetWebSite(siteid); string title = Common.Util.GetPageParams("title"); string link = Common.Util.GetPageParams("link"); string context = Common.Util.GetPageParams("context"); int wordlnk = Common.Util.GetPageParamsAndToInt("wordlnk"); string adtext1 = Common.Util.GetPageParams("adtext1"); string adtext2 = Common.Util.GetPageParams("adtext2"); string adlink1 = Common.Util.GetPageParams("adlink1"); string adlink2 = Common.Util.GetPageParams("adlink2"); string prompt = Common.Util.GetPageParams("prompt"); string tel1 = Common.Util.GetPageParams("tel1"); string tel2 = Common.Util.GetPageParams("tel2"); Guidec guidec; if (site.AdId > 0) { guidec = Logic.Consult.GetGuidec(site.AdId); } else { guidec = new Guidec(); } guidec.Title = title; guidec.Link = link; guidec.Context = context; guidec.WordLnk = wordlnk; guidec.AdText1 = adtext1; guidec.AdLink1 = adlink1; guidec.AdText2 = adtext2; guidec.AdLink2 = adlink2; guidec.Prompt = prompt; guidec.Tel1 = tel1; guidec.Tel2 = tel2; int results = Logic.Consult.SaveStep41(siteid, site, guidec); if (results > 0) { MsgBox.Alert("Alert", "<p>网站加盟成功!</p>", "../website/GetScript.aspx?siteid=" + siteid.ToString()); } else { MsgBox.Alert("网站加盟失败!"); } }
public static int GuidecAdd() { int guidecnum = Common.Util.GetPageParamsAndToInt("guidecnum"); if (guidecnum == -100) { return(0); } string title = Common.Util.GetPageParams("guidechead"); string link = Common.Util.GetPageParams("guideclink"); string article = "", articlelink = ""; string guideccontent = Common.Util.GetPageParams("guideccontent"); for (int i = 1; i <= guidecnum; i++) { if (Common.Util.GetPageParams("article" + i.ToString()) == "") { article += " |||"; } else { article += Common.Util.GetPageParams("article" + i.ToString()) + "|||"; } if (Common.Util.GetPageParams("articlelink" + i.ToString()) == "") { articlelink += " |||"; } else { articlelink += Common.Util.GetPageParams("articlelink" + i.ToString()) + "|||"; } } if (article.Length > 0) { article = article.Substring(0, article.Length - 3); } if (articlelink.Length > 0) { articlelink = articlelink.Substring(0, articlelink.Length - 3); } Guidec guidec = new Guidec(); guidec.Title = title; guidec.Link = link; return(Consult.GuidecAdd(guidec)); }
private void BData() { Entity.Site site = Logic.Consult.GetWebSite(id); Guidec guidec = Logic.Consult.GetGuidec(site.AdId); title.Value = guidec.Title; link.Value = guidec.Link; context.Value = guidec.Context; if (guidec.WordLnk == 1) { wordLnk1.Checked = true; ClientScript.RegisterStartupScript(this.GetType(), "ScriptBlock", "setAdShow('block');", true); } else { wordLnk2.Checked = true; ClientScript.RegisterStartupScript(this.GetType(), "ScriptBlock", "setAdShow('none');", true); } adText1.Value = guidec.AdText1; adLink1.Value = guidec.AdLink2; adText2.Value = guidec.AdText2; adLink2.Value = guidec.AdLink2; ClientScript.RegisterStartupScript(this.GetType(), "StartScript", "reviewSwt();", true); int template = Common.Util.GetPageParamsAndToInt("t"); if (template == 1) { tel1li.Visible = false; tel2li.Visible = false; swtf.Visible = false; prompt.Value = guidec.Prompt; } if (template == 2) { promptli.Visible = false; swtm.Visible = false; tel1.Value = guidec.Tel1; tel2.Value = guidec.Tel2; } }
protected void Page_Load(object sender, EventArgs e) { WebSiteUrl = Config.Global.__WebSiteUrl; getSiteId = Common.Util.GetPageParams("getsiteid"); siteId = Common.Util.GetPageParams("siteId"); Entity.Site site = Logic.Consult.GetWebSite(int.Parse(siteId)); Guidec guidec = Logic.Consult.GetGuidec(site.AdId); titles = GlobalObject.escape(guidec.Title); link = guidec.Link; text = GlobalObject.escape(guidec.Context); tel1 = guidec.Tel1; tel2 = guidec.Tel2; prompt = GlobalObject.escape(guidec.Prompt); text1 = GlobalObject.escape(guidec.AdText1); link1 = guidec.AdLink1; text2 = GlobalObject.escape(guidec.AdText2); link2 = guidec.AdLink2; if (site.Templates == 2) { template = "swtf"; } }
private void BindGuidecInfo(Guidec guidec) { guidechead.Value = guidec.Title; guideclink.Value = guidec.Link; }
public static int SaveStep41(int siteid, Site site, Guidec guidec) { return(provider.SaveStep41(siteid, site, guidec)); }
public static void GuidecEdit(Guidec g) { provider.GuidecEdit(g); }
public static int GuidecAdd(Guidec g) { return(provider.GuidecAdd(g)); }