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

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

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

                                                   <TD style=WIDTH: px; HEIGHT: px align=right>產品送貨日期</TD>
                                                   <TD style=HEIGHT: px>
               <asp:TextBox id=STProdSH runat=server Width=px></asp:TextBox> </TD>
                                         </TR>
                                         <TR>
                                                   <TD style=WIDTH: px></TD>
                                                   <TD><asp:button id=ST_ok runat=server Text=添加></asp:button>
                   <asp:Label id=ST_Warn runat=server Width=px></asp:Label></TD>
                                         </TR>
                                </TABLE>
                                </FONT><FONT face=宋體 color=#ff size=>說明此頁用於統計個連鎖店銷售情況</FONT>
                       </TD>
             </TR>
    </TABLE>
    </TD></TR></TABLE>
    <uc:stfooter id=STFooter runat=server></uc:stfooter>

    ()編寫後台事件處理頁面STAddProductaspxcs此代碼主要實現了查看和刪除及向連鎖店添加產品信息的功能頁面進行初始化時通過調用BindGrid()方法來從數據庫中獲取連鎖店信息填充DataGrid控件這部分代碼比較簡單參見光盤STManager文件夾下的STAddProductaspx文件還實現了向連鎖分店添加產品的功能
    其主要代碼如下
    private void Page_Load(object sender SystemEventArgs e)
    {
             if(Session[STNickName] != null)
             {
                       //獲得數據庫連接字符串
                       string STconnection = ConfigurationSettingsAppSettings[strconnection];
                       STconn = new SqlConnection(STconnection);                  
                       if(!IsPostBack)
                       {
                                //自定義BindGrid ()方法加載向連鎖分店添加產品的信息
                                BindGrid();
                                STconnOpen ();
                                //創建查詢產品信息的sql語句
                                string STmysql = select * from STProd;
                                //創建數據庫的SqlCommand對象

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/15494.html
    推薦文章
    Copyright © 2005-2022 電腦知識網 Computer Knowledge   All rights reserved.