日期:2014-05-17  浏览次数:20786 次

vs新手,有个问题不解。
今天是我接触vs第一天,经理给我一程序是先前程序员留下的。让我修改一番。
但是,
我不清楚的地方是:
问题在代码里找啊??

请高手在下述代码注释中,找一下。
 protected string FWSP_LocationPallet()
    {
        WMSDAL.DataAccess.SQLDataAccess pSDA = new SQLDataAccess(pSqlConStr);
        string pStrSQL = string.Empty, pStrRet = string.Empty;
        SqlCommand scSqlComd = null; SqlTransaction pSqlTran = null;
        string[] pArrLoc = null;
        BCMainProcess pDCM = new BCMainProcess(mUserID);

        int pCmdRet = 0;

        try
        {
            pSDA.BeginTrans();
            pSqlTran = pSDA.tran;
            System.Data.SqlClient.SqlParameter spReturn = new System.Data.SqlClient.SqlParameter();
            System.Data.SqlClient.SqlParameter outMsg = new System.Data.SqlClient.SqlParameter();
            string strMsg = "";
            // pStrSQL = "Update SE_CONT_HEAD Set SCH_PALLET_BARCODE = @strPalletCode, SCH_UPDATE_USER_ID = @strOpCode, SCH_UPDATE_DATE = getdate() Where SCH_AS_UCN = @strCtnCode";//这里一,这里一,这里一,这里一,这里一,这里一,这里一,
//如果此sql未注释,我能看懂,就是执行一条sql语句,但是为什么要把此语句注释起来,换成了,下面这句
            pStrSQL = "webReceiveLocationPallet";//这里二,这里二,这里二,这里二,这里二,这里二,这里二,这里二,这里二,这里二,这里二,这里二,这里二
//这是一个存储过程吗?我也未找到,这是一个什么。。。。。。

            scSqlComd = new SqlCommand(pStrSQL, pSDA.ActiveCN);
            scSqlComd.CommandType = CommandType.StoredProcedure;
            //scSqlComd.CommandText = "ReceiveCtnPallet";
            scSqlComd.Transaction = pSqlTran;

            scSqlComd.Parameters.Add("@vLocation", SqlDbType.VarChar, 30).Value = TxtLocationCode.Text.Trim();
            scSqlComd.Parameters.Add("@strOpCode", SqlDbType.VarChar, 30).Value = mUserID;
            scSqlComd.Parameters.Add("@strPalletCode", SqlDbType.VarChar, 30).Value = TxtPalletCode.Text.Trim();
     
            //scSqlComd.Parameters.Add("@strMsg", SqlDbType.VarChar, 100).Direction = ParameterDirection.Output;
            outMsg.ParameterName = "strMsg";