public void LoadLeft(string name_en_s) { data_conn cn = new data_conn(); if (name_en_s != "") { DataSet ds = cn.mdb_ds("select top 5 * from TB_BBS where title like '%" + name_en_s + "%'", "bbs"); //Repeater1.DataSource = ds.Tables["bbs"].DefaultView; //Repeater1.DataBind(); string strYear = DateTime.Now.Year.ToString(); string strMonth = DateTime.Now.Month.ToString(); ds = cn.mdb_ds("select top 1 * from TB_BAF where months='" + strYear + "-" + strMonth + "' and Carriers like '%" + name_en_s + "%'", "baf"); if (ds.Tables["baf"].Rows.Count > 0) { //Literal8.Text = "<a href='../baf/#anchor" + ds.Tables["baf"].Rows[0]["id"].ToString() + "'>" + strMonth + "月" + name_en_s + "最新BAF/CAF</a><br />"; } ds = cn.mdb_ds("select top 1 * from TB_THC where months='" + strYear + "-" + strMonth + "' and Carriers='" + name_en_s + "'", "thc"); if (ds.Tables["thc"].Rows.Count > 0) { //Literal9.Text = "<a href='../thc/#anchor" + ds.Tables["thc"].Rows[0]["id"].ToString() + "'>" + strMonth + "月" + name_en_s + "最新THC</a><br />"; } ds = cn.mdb_ds("select top 5 * from TB_Search_Ship order by Num desc", "hot"); //Repeater2.DataSource = ds.Tables["hot"].DefaultView; //Repeater2.DataBind(); } }
protected void LoadLinks() { data_conn cn = new data_conn(); DataSet ds = new DataSet(); string sql = ""; sql = "select * from TB_LINK where types = 2"; ds = cn.mdb_ds(sql, "link"); DataList1.DataSource = ds.Tables["link"].DefaultView; DataList1.DataBind(); sql = "select * from TB_LINK where types = 3"; ds = cn.mdb_ds(sql, "link"); DataList2.DataSource = ds.Tables["link"].DefaultView; DataList2.DataBind(); sql = "select * from TB_LINK where types = 4"; ds = cn.mdb_ds(sql, "link"); DataList3.DataSource = ds.Tables["link"].DefaultView; DataList3.DataBind(); }
protected void Page_Load(object sender, EventArgs e) { check ck = new check(); string u = "0"; u = ck.CheckNumber(GetRequestCookies("user_id", "0")); data_conn cn = new data_conn(); DataSet ds = new DataSet(); string sql = ""; sql = "SELECT Realname FROM TB_User WHERE userid = " + u; ds = cn.mdb_ds(sql, "tb_user"); ltrMyName.Text = ds.Tables["tb_user"].Rows[0][0].ToString(); //显示未读消息 sql = "select count(mid) as count from TB_PM where readed = 0 and listener = " + u; ds = cn.mdb_ds(sql, "tb_pm"); ltrPm.Text = ds.Tables["tb_pm"].Rows[0]["count"].ToString(); }
protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { data_conn cn = new data_conn(); DataSet ds = new DataSet(); string sql; sql = "SELECT * FROM TB_TOPBBS WHERE tid = 1 OR tid = 2 OR tid = 3 OR tid = 4 OR tid = 5 ORDER BY tid "; ds = cn.mdb_ds(sql, "bbs"); ltrHotTitle1.Text = "<a href=\"" + ds.Tables["bbs"].Rows[2]["linkurl"].ToString() + "\" title=\"" + ds.Tables["bbs"].Rows[2]["alttxt"].ToString() + "\" target=\"_blank\">" + ds.Tables["bbs"].Rows[2]["title"].ToString() + "</a>"; ltrHotPic1.Text = "<a href=\"" + ds.Tables["bbs"].Rows[2]["linkurl"].ToString() + "\" title=\"" + ds.Tables["bbs"].Rows[2]["alttxt"].ToString() + "\" target=\"_blank\">" + "<img src=\"" + ds.Tables["bbs"].Rows[2]["imageurl"].ToString() + "\" width=\"80\" height=\"60\" border=\"0\" alt=\"" + ds.Tables["bbs"].Rows[2]["alttxt"].ToString() + "\"/>" + "</a>"; ltrHotIndex1.Text = ds.Tables["bbs"].Rows[2]["indextxt"].ToString(); ltrHotTitle2.Text = "<a href=\"" + ds.Tables["bbs"].Rows[3]["linkurl"].ToString() + "\" title=\"" + ds.Tables["bbs"].Rows[3]["alttxt"].ToString() + "\" target=\"_blank\">" + ds.Tables["bbs"].Rows[3]["title"].ToString() + "</a>"; ltrHotPic2.Text = "<a href=\"" + ds.Tables["bbs"].Rows[3]["linkurl"].ToString() + "\" title=\"" + ds.Tables["bbs"].Rows[3]["alttxt"].ToString() + "\" target=\"_blank\">" + "<img src=\"" + ds.Tables["bbs"].Rows[3]["imageurl"].ToString() + "\" width=\"80\" height=\"60\" border=\"0\" alt=\"" + ds.Tables["bbs"].Rows[3]["alttxt"].ToString() + "\"/>" + "</a>"; ltrHotIndex2.Text = ds.Tables["bbs"].Rows[3]["indextxt"].ToString(); sql = "SELECT TOP 6 * FROM TB_Attention ORDER BY id DESC "; ds = cn.mdb_ds(sql, "bbs"); RptHot.DataSource = ds.Tables["bbs"].DefaultView; RptHot.DataBind(); } }
protected void LoadRate() { data_conn cn = new data_conn(); DataSet ds = new DataSet(); string sql = "Select rate from TB_NEWRATE Order by rid desc"; ds = cn.mdb_ds(sql, "rate"); if (ds.Tables["rate"].Rows.Count > 0) { TextBox5.Text = ds.Tables["rate"].Rows[0][0].ToString(); } sql = "select ratesimple from TB_NEWRATE"; ds = cn.mdb_ds(sql, "bbs"); string[] ratexxs = new string[4]; string ratexx; ratexx = ds.Tables["bbs"].Rows[0][0].ToString(); ratexxs = ratexx.Split('|'); TextBox1.Text = ratexxs[0]; TextBox2.Text = ratexxs[1]; TextBox3.Text = ratexxs[2]; TextBox4.Text = ratexxs[3]; }
protected void Page_Load(object sender, EventArgs e) { data_conn cn = new data_conn(); DataSet ds_months = cn.mdb_ds("select top 1 months from TB_THC order by id desc", "months"); string[] arrayDate = ds_months.Tables["months"].Rows[0][0].ToString().Split('-'); string year = arrayDate[0].ToString(); string month = arrayDate[1].ToString(); //LitYear1.Text = year; LitYear2.Text = year; //LitMonth1.Text = month; LitMonth2.Text = month; //LitMonth3.Text = month; //LitMonth4.Text = month; //LitMonth5.Text = month; //LitMonth6.Text = month; Littitle.Text = "<title>" + year + "年" + month + "月" + "最新THC-环球运费网</title>"; string PreviousMonth; string PreviousYear; if (month != "1") { PreviousMonth = Convert.ToString(Convert.ToInt32(month) - 1); PreviousYear = year; } else { PreviousMonth = "12"; PreviousYear = Convert.ToString(Convert.ToInt32(year) - 1); } //LitPreviousMonthBaf.Text = "<a href='/surcharge/overdue_baf.aspx?y=" + PreviousYear + "&m=" + PreviousMonth + "'>" + PreviousMonth + "月各大船公司BAF/CAF</a>"; //LitPreviousMonthThc.Text = "<a href='/surcharge/overdue_thc.aspx?y=" + PreviousYear + "&m=" + PreviousMonth + "'>" + PreviousMonth + "月各大船公司THC</a>"; //this.Response.Write(""); DataSet ds = cn.mdb_ds("select * from TB_THC where months='" + ds_months.Tables["months"].Rows[0][0].ToString() + "' order by Carriers", "thc"); Repeater1.DataSource = ds.Tables["thc"].DefaultView; Repeater1.DataBind(); //绑定毛点 string[] strletter ={ "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z" }; for (int i = 0; i < strletter.Length; i++) { DataRow[] row = ds.Tables["thc"].Select("Carriers like '" + strletter[i] + "%'", "id"); if (row.Length != 0) { Label1.Text = Label1.Text + "<a href='#anchor" + row[0]["id"].ToString() + "'>" + strletter[i] + "</a> "; } else { Label1.Text = Label1.Text + strletter[i] + " "; } } }
public void LoadNews() { check ck = new check(); data_conn cn = new data_conn(); DataSet ds = new DataSet(); string p = "1"; if (Request.QueryString["page"] != null) { p = ck.CheckInput(Request.QueryString["page"].ToString()); } int ps = (Convert.ToInt32(p) - 1) * 20; string sql = ""; sql = "SELECT TOP 20 * "; sql += "FROM "; sql += "TB_BBS "; sql += "WHERE TYPES = 5"; sql += "ORDER BY id DESC "; ds = cn.mdb_ds(sql, "news"); //Response.Write(sql); //Response.Write("<br/>"); //Response.Write(Request.Url.ToString()); Repeater4.DataSource = ds.Tables["news"].DefaultView; Repeater4.DataBind(); sql = "SELECT TOP 8 * "; sql += "FROM "; sql += "TB_BBS "; sql += "WHERE TYPES = 11"; sql += "ORDER BY id DESC "; ds = cn.mdb_ds(sql, "news"); //Response.Write(sql); //Response.Write("<br/>"); //Response.Write(Request.Url.ToString()); Repeater1.DataSource = ds.Tables["news"].DefaultView; Repeater1.DataBind(); sql = "select * from TB_IMGIndex where id = 4"; ds = cn.mdb_ds(sql, "news"); Literal1.Text = ds.Tables["news"].Rows[0]["txttitle"].ToString(); Literal2.Text = ds.Tables["news"].Rows[0]["txttext"].ToString(); Literal3.Text = "<a href=\"" + ds.Tables["news"].Rows[0]["txtlink"].ToString() + "\" target=\"_blank\"><img src=\"/images2/index/news_top.jpg\" border=\"0\" width=\"200\" height=\"150\" /></a>"; Literal4.Text = "<a href=\"" + ds.Tables["news"].Rows[0]["txtlink"].ToString() + "\" target=\"_blank\">"; Literal5.Text = "<a href=\"" + ds.Tables["news"].Rows[0]["txtlink"].ToString() + "\" target=\"_blank\">"; }
protected void ImageButton1_Click(object sender, ImageClickEventArgs e) { check ck = new check(); data_conn bbscn = new data_conn(); DataSet bbsds = new DataSet(); string bbssql = "select * from TB_User,TB_BBSLevel where TB_User.UserID=TB_BBSLevel.UserID and UserName='******' and UserPassword='******'"; bbsds = bbscn.mdb_ds(bbssql, "bbsuser"); if (bbsds.Tables["bbsuser"].Rows.Count > 0) { Response.Cookies["bbsadmin"].Value = "yes"; Response.Cookies["bbsadmin_id"].Value = bbsds.Tables["bbsuser"].Rows[0]["UserID"].ToString(); //Response.Cookies["user_name"].Value = Server.UrlEncode(usernm); //Response.Cookies["bbslevel"].Value = bbsds.Tables["bbsuser"].Rows[0]["bbsadmin"].ToString(); Response.Redirect("/bbsmessage/BBSadminList.aspx"); } else { //Response.Cookies["bbsadmin"].Value = "no"; //Response.Redirect("/admin/bbsadmin/BBSadminList.aspx"); //MessageBox("error", "用户名或密码错误"); } }
public void LoadRecord(string page,string search) { check ck = new check(); data_conn cn = new data_conn(); string sql = ""; int item = (Convert.ToInt32(page) - 1) * 100; sql += "select top 100 * from "; sql += "(select id,number,name from TB_HS "; sql += "where 1=1 "; if (search != "") { sql += "and (number like '%" + search + "%' or name like '%" + search + "%') "; } sql += ") as T "; sql += "where id not in "; sql += "(select top " + item + " id from TB_HS "; sql += "where 1=1 "; if (search != "") { sql += "and (number like '%" + search + "%' or name like '%" + search + "%') "; } sql += "order BY TB_HS.id DESC) "; sql += "ORDER BY id DESC"; DataSet ds = cn.mdb_ds(sql, "HS"); Repeater1.DataSource = ds.Tables["HS"].DefaultView; Repeater1.DataBind(); LoadTotalCount(); }
protected void Page_Load(object sender, EventArgs e) { data_conn cn = new data_conn(); DataSet ds = new DataSet(); string sql = ""; sql = ""; sql = sql + "SELECT '共有' AS n, COUNT(*) AS c "; sql = sql + "FROM TB_User "; sql = sql + "WHERE (importtype = 1) "; sql = sql + "UNION ALL "; sql = sql + "SELECT '发送成功' AS n, COUNT(*) AS c "; sql = sql + "FROM TB_User "; sql = sql + "WHERE (importtype = 1) AND (advemailsuccess = '成功') "; sql = sql + "UNION ALL "; sql = sql + "SELECT '还需发送' AS n, COUNT(*) AS c "; sql = sql + "FROM TB_User "; sql = sql + "WHERE (importtype = 1) AND (advemailsuccess = '') "; sql = sql + "UNION ALL "; sql = sql + "SELECT '发送失败' AS n, COUNT(*) AS c "; sql = sql + "FROM TB_User "; sql = sql + "WHERE (importtype = 1) AND (advemailsuccess = '失败') "; ds = cn.mdb_ds(sql, "count"); GridView1.DataSource = ds.Tables["count"].DefaultView; GridView1.DataBind(); }
public void GetUserInfo() { data_conn cn = new data_conn(); DataSet ds = cn.mdb_ds("select * from TB_User where Userid=" + Request.Cookies["user_id"].Value.ToString(), "user"); Text3.Value = ds.Tables["user"].Rows[0]["First_Name"].ToString(); Text4.Value = ds.Tables["user"].Rows[0]["Last_Name"].ToString(); Text5.Value = ds.Tables["user"].Rows[0]["EN_CompanyName"].ToString(); DropDownList1.SelectedValue = ds.Tables["user"].Rows[0]["CompanyType"].ToString(); Text6.Value = ds.Tables["user"].Rows[0]["Phone"].ToString(); Text7.Value = ds.Tables["user"].Rows[0]["Fax"].ToString(); Text8.Value = ds.Tables["user"].Rows[0]["UserEmail"].ToString(); Text9.Value = ds.Tables["user"].Rows[0]["Usermsn"].ToString(); Text10.Value = ds.Tables["user"].Rows[0]["Website"].ToString(); Text11.Value = ds.Tables["user"].Rows[0]["EN_Country"].ToString(); Text12.Value = ds.Tables["user"].Rows[0]["EN_City"].ToString(); Text13.Value = ds.Tables["user"].Rows[0]["EN_Address"].ToString(); Text14.Value = ds.Tables["user"].Rows[0]["PostNumber"].ToString(); TEXTAREA1.Value = ds.Tables["user"].Rows[0]["EN_Company_profile"].ToString(); if (ds.Tables["user"].Rows[0]["ifEn"].ToString() == "0") { Literal1.Text = "你还不是英文站的用户,还不能发布英文价格"; } }
public void LoadRecord(string page) { //SELECT TB_BBS.id,TB_BBS.title,TB_User.UserName,TB_BBS.Data,TB_BBS.PostDate,TB_BBS.EditDate FROM TB_BBS,TB_User where TB_BBS.UserID=TB_User.UserID data_conn cn = new data_conn(); DataSet ds; int item = (Convert.ToInt32(page) - 1) * 15; string sql = ""; sql = "select top 15 "; sql = sql + "UserID,UserName,RealName,CompanyName,CompanyType,Phone,MovePhone,Regtime "; sql = sql + "FROM (SELECT "; sql = sql + "* "; sql = sql + "FROM "; sql = sql + "TB_User "; sql = sql + "WHERE "; sql = sql + "recommendUserID=" + this.Request.Cookies["user_id"].Value.ToString(); sql = sql + ") AS T "; sql = sql + "WHERE UserID NOT IN "; sql = sql + "(SELECT TOP " + item.ToString() + " UserID "; sql = sql + "FROM "; sql = sql + "TB_User "; sql = sql + "WHERE "; sql = sql + "recommendUserID=" + this.Request.Cookies["user_id"].Value.ToString(); sql = sql + "ORDER BY TB_User.Regtime "; sql = sql + ") "; sql = sql + "ORDER BY Regtime "; ds = cn.mdb_ds(sql, "bbs"); GridView1.DataSource = ds.Tables["bbs"].DefaultView; GridView1.DataBind(); GridView1.Attributes.Add("bordercolor ", "#A6D4E6"); LoadTotalCount(); }
protected void Page_Load(object sender, EventArgs e) { string sql = ""; sql = "select ratesimple from TB_NEWRATE"; DataSet ds = new DataSet(); data_conn cn = new data_conn(); ds = cn.mdb_ds(sql, "bbs"); string[] ratexxs = new string[4]; string ratexx; ratexx = ds.Tables["bbs"].Rows[0][0].ToString(); ratexxs = ratexx.Split('|'); Label8.Text = (Convert.ToDouble(ratexxs[0]) / 100).ToString(); Label9.Text = (Convert.ToDouble(ratexxs[1]) / 100).ToString(); Label10.Text = ratexxs[2]; Label11.Text = ratexxs[3]; sql = "SELECT top 5 * "; sql = sql + "FROM "; sql = sql + "TB_COUNT_NEED "; sql = sql + "WHERE "; sql = sql + "1=1 "; }
public void LoadRecord(string page) { //SELECT TB_BBS.id,TB_BBS.title,TB_User.UserName,TB_BBS.Data,TB_BBS.PostDate,TB_BBS.EditDate FROM TB_BBS,TB_User where TB_BBS.UserID=TB_User.UserID data_conn cn = new data_conn(); DataSet ds; int item = (Convert.ToInt32(page) - 1) * 15; string sql = ""; sql = "select top 15 "; sql = sql + "id,detail,title,postdate "; sql = sql + "FROM (SELECT "; sql = sql + "* "; sql = sql + "FROM "; sql = sql + "TB_Exhibition"; sql = sql + ") AS T "; sql = sql + "WHERE id NOT IN "; sql = sql + "(SELECT TOP " + item.ToString() + " id "; sql = sql + "FROM "; sql = sql + "TB_Exhibition "; sql = sql + "ORDER BY TB_Exhibition.postdate DESC "; sql = sql + ") "; sql = sql + "ORDER BY postdate DESC"; ds = cn.mdb_ds(sql, "bbs"); Repeater1.DataSource = ds.Tables["bbs"].DefaultView; Repeater1.DataBind(); //GridView1.Attributes.Add("bordercolor ", "#A6D4E6"); LoadTotalCount(); }
protected void Page_Load(object sender, EventArgs e) { data_conn cn = new data_conn(); DataSet ds_months = cn.mdb_ds("select top 1 months from TB_BAF order by id desc", "months"); string[] arrayDate = ds_months.Tables["months"].Rows[0][0].ToString().Split('-'); string year = arrayDate[0].ToString(); string month = arrayDate[1].ToString(); //LitYear1.Text = year; LitYear2.Text = year; //LitMonth1.Text = month; LitMonth2.Text = month; //LitMonth3.Text = month; //LitMonth4.Text = month; //LitMonth5.Text = month; //LitMonth6.Text = month; Littitle.Text = "<title>" + year + "年" + month + "月" + "最新ORC附加费-环球运费网</title>"; string PreviousMonth; string PreviousYear; if (month != "1") { PreviousMonth = Convert.ToString(Convert.ToInt32(month) - 1); PreviousYear = year; } else { PreviousMonth = "12"; PreviousYear = Convert.ToString(Convert.ToInt32(year) - 1); } //LitPreviousMonthBaf.Text = "<a href='/surcharge/overdue_baf.aspx?y=" + PreviousYear + "&m=" + PreviousMonth + "'>" + PreviousMonth + "月各大船公司BAF/CAF</a>"; //LitPreviousMonthThc.Text = "<a href='/surcharge/overdue_thc.aspx?y=" + PreviousYear + "&m=" + PreviousMonth + "'>" + PreviousMonth + "月各大船公司THC</a>"; }
protected void Page_Load(object sender, EventArgs e) { GetRequest GetRequest1 = new GetRequest(); string uvid = "0"; if (GetRequest1.GetRequestCookies("uvid", "0") == "0") { data_conn cn = new data_conn(); DataSet ds = new DataSet(); string sql = "INSERT INTO TB_UV_LIST (uvtime) values (getdate());select @@identity"; ds = cn.mdb_ds(sql, "uvid"); uvid = ds.Tables["uvid"].Rows[0][0].ToString(); Response.Cookies["uvid"].Value = uvid; Response.Cookies["uvid"].Expires = DateTime.Now.AddDays(365); } else { uvid = GetRequest1.GetRequestCookies("uvid", "0"); } string srvlink = ""; srvlink += "<a title=\"欢迎使用在线客服\" id=\"service_link\" href=\"http://im.cn.alisoft.com/webim/webim/webclient!open.jspa?lang=zh_cn&img=0&memberid="; srvlink += "e" + uvid; srvlink += "&targetid=cnalichna910254766&siteId=4035516&initiative=1&domain=probe.alisoft.com&siteFlag=enet&colorStyle=orange&msg=&ct=\" target=\"_blank\">在线客服</a>"; Literal3.Text = srvlink; }
public void LoadHotShip() { data_conn cn = new data_conn(); DataSet ds = cn.mdb_ds("select top 5 * from TB_Search_Ship order by Num desc", "hot"); //Repeater2.DataSource = ds.Tables["hot"].DefaultView; //Repeater2.DataBind(); }
protected void Page_Load(object sender, EventArgs e) { check ck = new check(); data_conn cn = new data_conn(); DataSet ds = new DataSet(); string orderid = ck.CheckInput(GetRequestQueryString("orderid", "")); string sql = ""; sql = ""; sql += "SELECT * FROM TB_ORDER WHERE order_code = '" + orderid + "'"; ds = cn.mdb_ds(sql, "order"); string order_type_string = ""; switch (ds.Tables["order"].Rows[0]["freight_type"].ToString()) { case "8": order_type_string = "fcl"; break; case "9": order_type_string = "lcl"; break; case "10": order_type_string = "air"; break; default: break; }//获得订单类型 Response.Redirect("/search/" + order_type_string + "_order.aspx?filter=view&role=forward&orderid=" + orderid); }
protected void Button1_Click(object sender, EventArgs e) { string surl = TextBox1.Text; if (surl.IndexOf("http://") == -1) { surl = "http://" + surl; } data_conn cn = new data_conn(); DataSet ds = new DataSet(); string sql = ""; sql = "SELECT * FROM TB_REPASTE_VIDEO WHERE '" + surl + "' LIKE '%' + vtag + '%'"; ds = cn.mdb_ds(sql, "video"); if (ds.Tables["video"].Rows.Count > 0) { string regexp1 = ds.Tables["video"].Rows[0]["surl"].ToString(); string regexp2 = ds.Tables["video"].Rows[0]["durl"].ToString(); Match TitleMatch = Regex.Match(surl, regexp1, RegexOptions.IgnoreCase | RegexOptions.Multiline); string urlkey = TitleMatch.Groups[1].Value.ToString(); Literal1.Text = Regex.Replace(regexp2, "urlkey", urlkey); } }
public void LoadRecord(string page,string search) { check ck = new check(); data_conn cn = new data_conn(); string sql = ""; int item = (Convert.ToInt32(page) - 1) * 200; sql += "select top 200 * from "; sql += "(select id,编号,名称,优惠,普通,出口税率,增值税率,消费税,计量单位,监管条件 from TB_Tax "; sql += "where 1=1 "; if (search != "") { sql += "and (编号 like '%" + search + "%' or 名称 like '%" + search + "%' or 优惠 like '%" + search + "%' or 普通 like '%" + search + "%' or 出口税率 like '%" + search + "%' or 增值税率 like '%" + search + "%' or 消费税 like '%" + search + "%' or 计量单位 like '%" + search + "%' or 监管条件 like '%" + search + "%') "; } sql += ") as T "; sql += "where id not in "; sql += "(select top " + item + " id from TB_Tax "; sql += "where 1=1 "; if (search != "") { sql += "and (编号 like '%" + search + "%' or 名称 like '%" + search + "%' or 优惠 like '%" + search + "%' or 普通 like '%" + search + "%' or 出口税率 like '%" + search + "%' or 增值税率 like '%" + search + "%' or 消费税 like '%" + search + "%' or 计量单位 like '%" + search + "%' or 监管条件 like '%" + search + "%') "; } sql += "order BY TB_Tax.id DESC) "; sql += "ORDER BY id DESC"; DataSet ds = cn.mdb_ds(sql, "HS"); Repeater1.DataSource = ds.Tables["HS"].DefaultView; Repeater1.DataBind(); LoadTotalCount(); }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { GetRequest g=new GetRequest (); string name = g.GetRequestQueryString("name", ""); data_conn cn = new data_conn(); DataSet ds = cn.mdb_ds("select * from TB_Ship where name_en_s='" + name + "'", "ship"); if (ds.Tables["ship"].Rows.Count > 0) { Literal1.Text = ds.Tables["ship"].Rows[0]["name_cn_s"].ToString() + "/" + ds.Tables["ship"].Rows[0]["name_cn"].ToString() + "/" + ds.Tables["ship"].Rows[0]["name_en_s"].ToString() + "/" + ds.Tables["ship"].Rows[0]["name_en"].ToString(); Literal2.Text = ds.Tables["ship"].Rows[0]["name_cn"].ToString(); Literal3.Text = ds.Tables["ship"].Rows[0]["Website"].ToString(); Literal4.Text = ds.Tables["ship"].Rows[0]["cargotail"].ToString(); Literal5.Text = ds.Tables["ship"].Rows[0]["contact"].ToString(); Literal6.Text = ds.Tables["ship"].Rows[0]["introduction"].ToString(); //Literal7.Text = ds.Tables["ship"].Rows[0]["name_cn_s"].ToString() + "/" + ds.Tables["ship"].Rows[0]["name_cn"].ToString() + "/" + ds.Tables["ship"].Rows[0]["name_en_s"].ToString() + "/" + ds.Tables["ship"].Rows[0]["name_en"].ToString(); Littitle.Text = "<title>" + ds.Tables["ship"].Rows[0]["name_cn_s"].ToString() + "-" + ds.Tables["ship"].Rows[0]["name_cn"].ToString() + "-" + ds.Tables["ship"].Rows[0]["name_en_s"].ToString() + "-" + ds.Tables["ship"].Rows[0]["name_en"].ToString() + "-联系方式-公司介绍-环球运费网</title>"; Litkey.Text = "<meta name=\"keywords\" content=\"" + ds.Tables["ship"].Rows[0]["name_cn_s"].ToString() + "," + ds.Tables["ship"].Rows[0]["name_cn"].ToString() + "," + ds.Tables["ship"].Rows[0]["name_en_s"].ToString() + "," + ds.Tables["ship"].Rows[0]["name_en"].ToString() + ",船公司信息,船公司联系方式,船公司网站,船公司介绍-环球运费网\" />"; Litdes.Text = "<meta name=\"description\" content=\"" + ds.Tables["ship"].Rows[0]["name_cn_s"].ToString() + ds.Tables["ship"].Rows[0]["name_en_s"].ToString() + "船公司的联系方式和介绍,环球运费网提供最新最全面的" + ds.Tables["ship"].Rows[0]["name_en_s"].ToString() + "船公司信息\" />"; LoadLeft(ds.Tables["ship"].Rows[0]["name_en_s"].ToString()); } else { } } }
protected void Page_Load(object sender, EventArgs e) { data_conn cn = new data_conn(); DataSet ds = new DataSet(); string sql = ""; sql = "SELECT top 10 userid, Realname, Companyname, Phone, Login2_Locus1, Login2_Locus2 "; sql = sql + "FROM V_COMPANY_USER "; sql = sql + "WHERE 1 = 1 AND ifcompanyshow = 1 AND (CompanyType = 2 OR CompanyType = 3 OR CompanyType = 5) AND Login2_Adventage_Type_dangerous = 1 "; sql = sql + "ORDER BY star_adv DESC, star_allin DESC, ifadv DESC, userid DESC "; ds = cn.mdb_ds(sql, "dqpp"); Response.Write("document.write(\"<table width=\\\"100%\\\" border=\\\"0\\\" cellpadding=\\\"0\\\" cellspacing=\\\"0\\\" style=\\\"line-height:22px; font-size:12px;\\\">\");"); Response.Write("document.write(\"<tr>\");"); Response.Write("document.write(\"<td width=\\\"\\\" bgcolor=\\\"#FEF7ED\\\">服务城市</td>\");"); Response.Write("document.write(\"<td width=\\\"\\\" bgcolor=\\\"#FEF7ED\\\">公司名称</td>\");"); Response.Write("document.write(\"<td width=\\\"\\\" bgcolor=\\\"#FEF7ED\\\">联系人</td>\");"); Response.Write("document.write(\"<td width=\\\"\\\" bgcolor=\\\"#FEF7ED\\\">联系方式</td>\");"); Response.Write("document.write(\"</tr>\");"); for (int i = 0; i <= ds.Tables["dqpp"].Rows.Count - 1; i++) { Response.Write("document.write(\"<tr>\");"); Response.Write("document.write(\"<td bgcolor=\\\"#FFFFFF\\\">" + ds.Tables["dqpp"].Rows[i]["Login2_Locus1"].ToString() + "-" +ds.Tables["dqpp"].Rows[i]["Login2_Locus2"].ToString() + "</td>\");"); Response.Write("document.write(\"<td bgcolor=\\\"#FFFFFF\\\"><a href=\\\"/company/" + setkey(ds.Tables["dqpp"].Rows[i]["userid"].ToString()) + "/\\\" target=\\\"_blank\\\">" + ds.Tables["dqpp"].Rows[i]["Companyname"].ToString() + "</a></td>\");"); Response.Write("document.write(\"<td bgcolor=\\\"#FFFFFF\\\">" + ds.Tables["dqpp"].Rows[i]["Realname"].ToString() + "</td>\");"); Response.Write("document.write(\"<td bgcolor=\\\"#FFFFFF\\\">" + ds.Tables["dqpp"].Rows[i]["Phone"].ToString() + "</td>\");"); Response.Write("document.write(\"</tr>\");"); } Response.Write("document.write(\"</table>\");"); }
protected void Page_Load(object sender, EventArgs e) { Literal1.Text = "<strong><img style=\"margin:0 6px -6px 0;\" src=\"/images/mail/6464_034.png\" width=\"32\" height=\"32\" />您的申请已提交,感谢您的支持!</strong>"; GetRequest GetRequest1 = new GetRequest(); SymmetricMethod ss = new SymmetricMethod(); check ck = new check(); string uid = "0"; try { uid = ck.CheckNumber(ss.Decrypto(GetRequest1.GetRequestQueryString("uid", ""))); data_conn cn = new data_conn(); DataSet ds = new DataSet(); string sql = ""; sql = "SELECT userid FROM TB_TOPIC_REG WHERE userid = " + uid + ""; ds = cn.mdb_ds(sql, "user"); if (ds.Tables["user"].Rows.Count > 0) { Literal1.Text = "<strong><img style=\"margin:0 6px -6px 0;\" src=\"/images/mail/wr.gif\" width=\"32\" height=\"32\" />您已经提交过申请!</strong>"; } else { sql = "INSERT INTO TB_TOPIC_REG (userid) VALUES (" + uid + ")"; cn.mdb_exe(sql); Literal1.Text = "<strong><img style=\"margin:0 6px -6px 0;\" src=\"/images/mail/6464_034.png\" width=\"32\" height=\"32\" />您的申请已提交,感谢您的支持!</strong>"; } } catch { Literal1.Text = "<strong><img style=\"margin:0 6px -6px 0;\" src=\"/images/mail/wr.gif\" width=\"32\" height=\"32\" />抱歉,您需在注册邮件或普通会员注册页面中点击申请链接!</strong>"; } }
public void LoadUserCountTotal() { data_conn cn = new data_conn(); DataSet ds = new DataSet(); string sql = ""; sql = sql + "SELECT '合 计' AS T, COUNT(*) AS C "; sql = sql + "FROM TB_User "; sql = sql + "WHERE ifimport is null "; sql = sql + "UNION ALL "; sql = sql + "SELECT '直 客' AS T, COUNT(*) AS C "; sql = sql + "FROM TB_User "; sql = sql + "WHERE (CompanyType = 1) "; sql = sql + "AND ifimport is null "; sql = sql + "UNION ALL "; sql = sql + "SELECT '货 代' AS 类型, COUNT(*) AS C "; sql = sql + "FROM TB_User "; sql = sql + "WHERE (CompanyType = 2) "; sql = sql + "AND ifimport is null "; sql = sql + "UNION ALL "; sql = sql + "SELECT '船公司' AS 类型, COUNT(*) AS C "; sql = sql + "FROM TB_User "; sql = sql + "WHERE (CompanyType = 3) "; sql = sql + "AND ifimport is null "; sql = sql + "UNION ALL "; sql = sql + "SELECT '其 它' AS 类型, COUNT(*) AS C "; sql = sql + "FROM TB_User "; sql = sql + "WHERE (CompanyType = 4) "; sql = sql + "AND ifimport is null "; ds = cn.mdb_ds(sql, "count"); GridView2.DataSource = ds.Tables["count"].DefaultView; GridView2.DataBind(); }
protected void Page_Load(object sender, EventArgs e) { if (this.Request.Cookies["user_id"] == null) { this.Response.Redirect("default.aspx"); } else { if (this.Request.Cookies["user_id"].Value.ToString() == "") { this.Response.Redirect("default.aspx"); } else { data_conn cn = new data_conn(); DataSet ds = cn.mdb_ds("select * from TB_User where ifmanage=1 and Username='******'", "manager"); if (ds.Tables["manager"].Rows.Count == 0) { this.Response.Redirect("default.aspx"); } } } if (!IsPostBack) { data_conn cn = new data_conn(); DataSet ds = cn.mdb_ds("select * from TB_BBS where id=" + this.Request["id"].ToString(), "news"); Editor1.Text = ds.Tables["news"].Rows[0]["Data"].ToString(); txtTitle.Text = ds.Tables["news"].Rows[0]["title"].ToString(); DropDownList1.SelectedIndex = (int)ds.Tables["news"].Rows[0]["types"] - 5; TextBox1.Text = ds.Tables["news"].Rows[0]["Postdate"].ToString(); } }
protected void ImageButton1_Click(object sender, ImageClickEventArgs e) { check ck = new check(); //string username = FormsAuthentication.HashPasswordForStoringInConfigFile(ck.CheckInput(txtName.Text.ToString()), "MD5"); //string password = FormsAuthentication.HashPasswordForStoringInConfigFile(ck.CheckInput(txtPass.Text.ToString()), "MD5"); string username = ck.CheckInput(txtName.Text.ToString()); string password = ck.CheckInput(txtPass.Text.ToString()); data_conn cn = new data_conn(); DataSet ds = new DataSet(); string sql = ""; //定义SQL语句,查询某一用户发布的3种运价及货盘各自的总数 sql = sql + "SELECT * FROM TB_ADMIN_ACCOUNT "; sql = sql + "WHERE aname = '" + username + "' "; sql = sql + "AND apassword = '******' "; ds = cn.mdb_ds(sql, "count"); if (ds.Tables["count"].Rows.Count > 0) { Response.Cookies["admin"].Value = "yes"; Response.Cookies["admin_id"].Value = ds.Tables["count"].Rows[0]["aid"].ToString(); Response.Cookies["admin_group"].Value = Server.UrlEncode(ds.Tables["count"].Rows[0]["agroup"].ToString()); Response.Cookies["admin_name"].Value = Server.UrlEncode(ds.Tables["count"].Rows[0]["aname"].ToString()); Response.Redirect("/admin/"); } else { Response.Cookies["admin"].Value = "no"; Response.Redirect("/admin/"); MessageBox("error", "用户名或密码错误"); } }
public void LoadList() { data_conn cn = new data_conn(); DataSet ds = cn.mdb_ds("select * from TB_CollectPort where PortLocation=0 and id=" + Request["id"].ToString(), "Port"); ListBox1.Items.Add(new ListItem(ds.Tables["Port"].Rows[0]["EnglishName"].ToString() + "," + ds.Tables["Port"].Rows[0]["location"].ToString(), ds.Tables["Port"].Rows[0]["id"].ToString())); ListBox1.SelectedIndex = 0; }
public void GetUserInfo() { check ck = new check(); string id = ck.CheckNumber(GetRequestCookies("user_id", "0")); data_conn cn = new data_conn(); DataSet ds = cn.mdb_ds("select * from TB_User where UserID=" + id, "user"); TextBox1.Text = ds.Tables["user"].Rows[0]["introduction"].ToString(); }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { data_conn cn = new data_conn(); DataSet ds = cn.mdb_ds("select * from TB_Exhibition where id=" + this.Request["id"].ToString(), "Exhibition"); Editor1.Text = ds.Tables["Exhibition"].Rows[0]["detail"].ToString(); txtTitle.Text = ds.Tables["Exhibition"].Rows[0]["title"].ToString(); } }
public void LoadGridView2() { data_conn cn = new data_conn(); string sql = "select * from TB_Attention"; DataSet ds = cn.mdb_ds(sql, "yunjia"); GridView2.DataSource = ds.Tables["yunjia"].DefaultView; GridView2.DataKeyNames = new string[] { "id" };//主键 GridView2.DataBind(); GridView2.Attributes.Add("bordercolor ", "#D9D9D9"); }