index.aspx.cs
上传用户:yawei0714
上传日期:2020-11-26
资源大小:1004k
文件大小:2k
源码类别:

WEB源码(ASP,PHP,...)

开发平台:

HTML/CSS

  1. using System;
  2. using System.Data;
  3. using System.Configuration;
  4. using System.Collections;
  5. using System.Web;
  6. using System.Web.Security;
  7. using System.Web.UI;
  8. using System.Web.UI.WebControls;
  9. using System.Web.UI.WebControls.WebParts;
  10. using System.Web.UI.HtmlControls;
  11. public partial class _Default : System.Web.UI.Page
  12. {
  13.     protected void Page_Load(object sender, EventArgs e)
  14.     {
  15.         
  16.         bindFreight();
  17.         bindTruck();
  18.         bindSpecial();        
  19.         bindDepot();       
  20.     }
  21.    
  22.     //绑定货源
  23.     protected void bindFreight()
  24.     {
  25.         string sql = "select top 10 * from tb_Freight where Auditing = '1' order by ID DESC";
  26.         gvFreight.DataSource = dataOperate.getDataset(sql, "tb_Freight");
  27.         gvFreight.DataBind();
  28.     }
  29.     //绑定车源
  30.     protected void bindTruck()
  31.     {
  32.         string sql = "select top 10 * from tb_Truck where Auditing = '1' order by ID DESC";
  33.         gvTruck.DataSource = dataOperate.getDataset(sql, "tb_Truck");
  34.         gvTruck.DataBind();
  35.     }
  36.     //绑定专线
  37.     protected void bindSpecial()
  38.     {
  39.         string sql = "select top 10 * from tb_Special where Auditing = '1' order by ID DESC";
  40.         gvSpecial.DataSource = dataOperate.getDataset(sql, "tb_Special");
  41.         gvSpecial.DataBind();
  42.     }
  43.    
  44.     //绑定仓储
  45.     protected void bindDepot()
  46.     {
  47.         string sql = "select top 10 * from tb_Depot where Auditing = '1' order by ID DESC";
  48.         gvDepot.DataSource = dataOperate.getDataset(sql, "tb_Depot");
  49.         gvDepot.DataBind();
  50.     }
  51.    
  52. }