本文整理汇总了C#中data_conn类的典型用法代码示例。如果您正苦于以下问题:C# data_conn类的具体用法?C# data_conn怎么用?C# data_conn使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
data_conn类属于命名空间,在下文中一共展示了data_conn类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: Page_Load
protected void Page_Load(object sender, EventArgs e)
{
check ck = new check();
string u = "0";
string sql = "";
u = ck.CheckNumber(GetRequestCookies("user_id", "0"));
if (u == "8299" | u == "9089")
{
PlaceHolder1.Visible = true;
}
else
{
PlaceHolder1.Visible = false;
}
data_conn cn = new data_conn();
DataSet ds = new DataSet();
//显示未读消息
//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();
//sql = "select count(oid) as count from TB_ORDER where (order_status = 2 or order_status = 4) and order_forward = " + u;
//ds = cn.mdb_ds(sql, "TB_ORDER");
//ltrNewBooking.Text = ds.Tables["TB_ORDER"].Rows[0]["count"].ToString();
}
开发者ID:xiaomincui,项目名称:100allin,代码行数:32,代码来源:left.ascx.cs
示例2: delete
public void delete()
{
//删除信息
//要删除的纪录的ID,保存在delList隐藏控件内
string id = delList.Text;
if (id != "")
{
data_conn cn = new data_conn();
DataSet ds = new DataSet();
string sql = "";
sql = sql + "delete from TB_CollectPortRelation where id in (" + id + ")";
cn.mdb_exe(sql);
MessageBox("opsuccess", "删除成功");
LoadList();
LoadList2();
//清空delList
delList.Text = "";
}
else
{
//没有选择任何要删除的ID,弹出此对话框
MessageBox("opfail", "未选择任何要删除的项目");
}
}
开发者ID:xiaomincui,项目名称:100allin,代码行数:25,代码来源:Portinputrelasion.aspx.cs
示例3: Page_Load
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='" + this.Request.Cookies["user_name"].Value.ToString() + "'", "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();
}
}
开发者ID:xiaomincui,项目名称:100allin,代码行数:33,代码来源:News.aspx.cs
示例4: Page_Load
protected void Page_Load(object sender, EventArgs e)
{
data_conn cn = new data_conn();
DataSet ds = new DataSet();
string sql = "";
sql = sql + "SELECT TOP 5 ";
sql = sql + "iflocus,";
sql = sql + "ifadv,";
sql = sql + "userid,";
sql = sql + "Realname,";
sql = sql + "Companyname,";
sql = sql + "Phone,";
sql = sql + "HeadURL,";
sql = sql + "star_allin, ";
sql = sql + "star_user, ";
sql = sql + "Login2_Locus1,";
sql = sql + "Login2_Locus2,";
sql = sql + "Login2_Adventage_Type_fcl,";
sql = sql + "Login2_Adventage_Type_lcl,";
sql = sql + "Login2_Adventage_Type_air, ";
sql = sql + "Login2_Adventage_Line, ";
sql = sql + "Login2_Adventage_Line2 ";
sql = sql + "FROM ";
sql = sql + "V_COMPANY_USER ";
sql = sql + "WHERE ";
sql = sql + "1=1 AND ifcompanyshow = 1 ";
sql = sql + "AND CompanyType = 2 ";
sql = sql + "ORDER BY star_allin DESC,ifadv DESC,userid DESC ";
ds = cn.mdb_ds(sql, "company");
RptUser.DataSource = ds.Tables["company"].DefaultView;
RptUser.DataBind();
}
开发者ID:xiaomincui,项目名称:100allin,代码行数:34,代码来源:product_1.aspx.cs
示例5: delete
public void delete()
{
//删除信息
//要删除的纪录的ID,保存在delList隐藏控件内
string id = delList.Text;
if (id!="")
{
data_conn cn = new data_conn();
DataSet ds = new DataSet();
string sql = "";
sql = sql + "delete from TB_YunJia where id in (" + id + ")";
cn.mdb_exe(sql);
sql = "";
sql = sql + "delete from TB_YunJiaInfo where YunJiaID in (" + id + ")";
cn.mdb_exe(sql);
sql = "";
sql = sql + "delete from TB_Yunjia_Effective_9 where YunJiaID in (" + id + ")";
cn.mdb_exe(sql);
sql = "";
sql = sql + "delete from TB_YunjiaInfo_Effective_9 where YunJiaID in (" + id + ")";
cn.mdb_exe(sql);
sql = "UPDATE TB_PRICECOUNT SET TB_PRICECOUNT.lclcount = (SELECT COUNT(id) AS yunjiacount FROM tb_yunjiainfo WHERE yunjialeixingx = 9),TB_PRICECOUNT.countdate = getdate() where TB_PRICECOUNT.cid = 1";
cn.mdb_exe(sql);
MessageBox("opsuccess", "删除成功");
//清空delList
delList.Text = "";
}
else
{
//没有选择任何要删除的ID,弹出此对话框
MessageBox("opfail", "未选择任何要删除的项目");
}
}
开发者ID:xiaomincui,项目名称:100allin,代码行数:34,代码来源:lcllist.aspx.cs
示例6: LoadRecord
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();
}
开发者ID:xiaomincui,项目名称:100allin,代码行数:35,代码来源:recommendList.aspx.cs
示例7: LoadLinks
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();
}
开发者ID:xiaomincui,项目名称:100allin,代码行数:27,代码来源:links.aspx.cs
示例8: Page_Load
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 ";
}
开发者ID:xiaomincui,项目名称:100allin,代码行数:26,代码来源:userrate1.ascx.cs
示例9: LoadLeft
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();
}
}
开发者ID:xiaomincui,项目名称:100allin,代码行数:30,代码来源:carrier.aspx.cs
示例10: Page_Load
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>";
}
开发者ID:xiaomincui,项目名称:100allin,代码行数:35,代码来源:orc.aspx.cs
示例11: LoadRecord
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();
}
开发者ID:xiaomincui,项目名称:100allin,代码行数:31,代码来源:BBSListExhibition.aspx.cs
示例12: delete
public void delete()
{
//删除信息
//要删除的纪录的ID,保存在delList隐藏控件内
string id = delList.Text;
if (id!="")
{
data_conn cn = new data_conn();
DataSet ds = new DataSet();
string sql = "";
sql = sql + "delete from T_AIRINFO where id in (" + id + ")";
cn.mdb_exe(sql);
sql = "";
sql = sql + "delete from TB_Yunjia_Effective_10 where airid in (" + id + ")";
cn.mdb_exe(sql);
sql = "";
sql = sql + "delete from TB_YunjiaInfo_Effective_10 where airid in (" + id + ")";
cn.mdb_exe(sql);
MessageBox("opsuccess", "删除成功");
//清空delList
delList.Text = "";
}
else
{
//没有选择任何要删除的ID,弹出此对话框
MessageBox("opfail", "未选择任何要删除的项目");
}
}
开发者ID:xiaomincui,项目名称:100allin,代码行数:29,代码来源:airlist.aspx.cs
示例13: LoadCompany
public void LoadCompany()
{
data_conn cn = new data_conn();
DataSet ds = new DataSet();
string sql = "";
sql = sql + "SELECT TOP 12 ";
sql = sql + "iflocus,";
sql = sql + "ifadv,";
sql = sql + "userid,";
sql = sql + "Realname,";
sql = sql + "Companyname,";
sql = sql + "Phone,";
sql = sql + "Login2_Locus1,";
sql = sql + "Login2_Locus2,";
sql = sql + "Login2_Adventage_Type_fcl,";
sql = sql + "Login2_Adventage_Type_lcl,";
sql = sql + "Login2_Adventage_Type_air, ";
sql = sql + "Login2_Adventage_Line, ";
sql = sql + "Login2_Adventage_Line2 ";
sql = sql + "FROM ";
sql = sql + "V_COMPANY_USER ";
sql = sql + "WHERE ";
sql = sql + "1=1 AND ifcompanyshow = 1 and star_allin > 0 ";
sql = sql + "AND Login2_Adventage_Type_lcl = 1 ";
sql = sql + "ORDER BY ifadv DESC,userid DESC ";
ds = cn.mdb_ds(sql, "company");
RptCompany.DataSource = ds.Tables["company"].DefaultView;
RptCompany.DataBind();
}
开发者ID:xiaomincui,项目名称:100allin,代码行数:32,代码来源:Default.aspx.cs
示例14: Page_Load
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;
}
开发者ID:xiaomincui,项目名称:100allin,代码行数:26,代码来源:userbbstopmid.ascx.cs
示例15: Page_Load
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);
}
开发者ID:xiaomincui,项目名称:100allin,代码行数:31,代码来源:order_view.aspx.cs
示例16: Page_Load
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
{
}
}
}
开发者ID:xiaomincui,项目名称:100allin,代码行数:32,代码来源:carrier.aspx.cs
示例17: delete
public void delete()
{
//删除信息
//要删除的纪录的ID,保存在delList隐藏控件内
string id = delList.Text;
if (!string.IsNullOrEmpty(id))
{
data_conn cn = new data_conn();
string sql = null;
sql = "";
sql = sql + "delete from tb_yunjia where ID in (" + id + ")";
cn.mdb_exe(sql);
sql = "UPDATE TB_PRICECOUNT SET TB_PRICECOUNT.lclcount = (SELECT COUNT(tb_yunjia.id) AS yunjiacount FROM tb_yunjia,tb_yunjiainfo WHERE (yunjialeixing = 9) AND tb_yunjia.id = tb_yunjiainfo.yunjiaid),TB_PRICECOUNT.countdate = getdate() where TB_PRICECOUNT.cid = 1";
cn.mdb_exe(sql);
MessageBox("opsuccess", "删除成功");
//清空delList
delList.Text = "";
//同步topnew
topnew tp = new topnew();
tp.CheckTopNew("9", this.Request.Cookies["user_id"].Value.ToString());
}
else
{
//没有选择任何要删除的ID,弹出此对话框
MessageBox("opfail", "未选择任何要删除的项目");
}
}
开发者ID:xiaomincui,项目名称:100allin,代码行数:29,代码来源:office_fcl_list_cs.aspx.cs
示例18: GetUserInfo
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 = "你还不是英文站的用户,还不能发布英文价格";
}
}
开发者ID:xiaomincui,项目名称:100allin,代码行数:25,代码来源:useredit_account.aspx.cs
示例19: delete
public void delete()
{
//删除信息
//要删除的纪录的ID,保存在delList隐藏控件内
string id = delList.Text;
if (id!="")
{
data_conn cn = new data_conn();
DataSet ds = new DataSet();
string sql = "";
sql = "delete from TB_Question_Answer where id in (" + id + ")";
cn.mdb_exe(sql);
sql = "update TB_Question set number=(select count(*) from TB_Question_Answer where QuestionID=" + this.Request["id"].ToString() + ") where id=" + this.Request["id"].ToString();
cn.mdb_exe(sql);
MessageBox("opsuccess", "删除成功");
//清空delList
delList.Text = "";
}
else
{
//没有选择任何要删除的ID,弹出此对话框
MessageBox("opfail", "未选择任何要删除的项目");
}
}
开发者ID:xiaomincui,项目名称:100allin,代码行数:26,代码来源:QuestionAnswer.aspx.cs
示例20: Page_Load
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();
}
开发者ID:xiaomincui,项目名称:100allin,代码行数:27,代码来源:sendemailsuccess.aspx.cs
注:本文中的data_conn类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论