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

連鎖中心配送系統:連鎖店銷售統計[2]

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

                       STcmdParametersAdd(new SqlParameter(@STProdIDSqlDbTypeInt));
                       STcmdParametersAdd(new SqlParameter(@STDepIDSqlDbTypeVarChar));
                       STcmdParametersAdd(new SqlParameter(@STSaleNumSqlDbTypeDecimal));
                       STcmdParametersAdd(new SqlParameter(@STStartTimeSqlDbTypeDateTime));
                       STcmdParametersAdd(new SqlParameter(@STEndTimeSqlDbTypeDateTime));
                       //向參數賦值
                       STcmdParameters[@STDepID]Value = STDepID;
                       STcmdParameters[@STProdID]Value = ST_ProdSelectedItemValue;
                       STcmdParameters[@STSaleNum]Value = STSaleNumText;
                       STcmdParameters[@STStartTime]Value = STStartTimeText;
                       STcmdParameters[@STEndTime]Value = STEndTimeText;
                       STcmdConnectionOpen();
                       try
                       {
                                //執行sql語句
                                STcmdExecuteNonQuery();
                                ResponseRedirect(STSaleaspx);
                       }
                       catch(SqlException)
                       {
                                ST_WarnText=添加失敗;
                                ST_WarnStyle[color]=red;
                       }
                       STcmdConnectionClose();
             }
    }

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


From:http://tw.wingwit.com/Article/program/net/201311/15223.html
    推薦文章
    Copyright © 2005-2013 電腦知識網 Computer Knowledge   All rights reserved.