熱點推薦:
您现在的位置: 電腦知識網 >> 編程 >> .NET編程 >> 正文

連鎖中心配送系統:銷售統計管理[6]

2022-06-13   來源: .NET編程 
    ——此文章摘自《ASPNET +SQL Server網絡應用系統開發案例精解》定價 特價 詳細>>http://tracklinktechcn/?m_id=dangdang&a_id=A&l=&l_type= width= height= border= nosave>

                                SqlCommand STcmd =new SqlCommand(STmysqlSTconn);
                                //通過調用ExecuteReader()從數據庫中檢索行創建SqlDataReader實例
                                SqlDataReader STdr = STcmdExecuteReader ();
                                //初始化產品下拉列表框
                                ST_ProdItemsAdd(new ListItem());
                                while(STdrRead ())
                                {
                                         //向下拉列表框添加產品名字ID
                                         ST_ProdItemsAdd(new ListItem(STdr[STProdName]ToString() STdr [STProdID]
ToString()) );
                              
                                }
                                STconnClose ();
                                STconnOpen();
                                //創建查詢連鎖店信息的sql語句
                                string STmysql = select * from STDep;
                                //創建數據庫的SqlCommand對象
                                SqlCommand STcmd =new SqlCommand(STmysqlSTconn);
                                //通過調用ExecuteReader()從數據庫中檢索行創建SqlDataReader實例
                                SqlDataReader STdr = STcmdExecuteReader ();
                                //初始化連鎖分店下拉列表框
                                ST_ProdItemsAdd(new ListItem() );
                                while(STdrRead())
                                {
                                         //向下拉列表框添加連鎖分店名字ID
                                         ST_DepItemsAdd(new ListItem(STdr[STDepName]ToString() STdr[STDepID]
ToString()) );
                                }
                                STconnClose();
                       }
             }
             else
             {
                       ResponseRedirect(/Indexaspx);
             }
    }
    //實現數據綁定
    public void BindGrid()
    {

right>[http://developcsaicn/dotnet_ASP/htm>]  [http://developcsaicn/dotnet_ASP/htm>]  [http://developcsaicn/dotnet_ASP/htm>]  [http://developcsaicn/dotnet_ASP/htm>]  [http://developcsaicn/dotnet_ASP/htm>]  []  [http://developcsaicn/dotnet_ASP/htm>]  


From:http://tw.wingwit.com/Article/program/net/201311/15496.html
    Copyright © 2005-2022 電腦知識網 Computer Knowledge   All rights reserved.