コード例 #1
0
        public DataTable UpdateRecevingDL(string strBarcode, string strStatus, string strUserID)
        {
            SqlDataLayer objSql = new SqlDataLayer();

            SqlParameter[] objParameters = new SqlParameter[4];
            try
            {
                objParameters[0] = new SqlParameter("@BARCODE", SqlDbType.VarChar);
                objParameters[1] = new SqlParameter("@USERNAME", SqlDbType.VarChar);
                objParameters[2] = new SqlParameter("@STATUS", SqlDbType.VarChar);
                objParameters[3] = new SqlParameter("@RESULT", SqlDbType.VarChar, 100);

                objParameters[0].Value     = strBarcode.Trim();
                objParameters[1].Value     = strUserID.Trim();
                objParameters[2].Value     = strStatus.Trim();
                objParameters[3].Direction = ParameterDirection.Output;

                BL_Common.BL_Write(MethodBase.GetCurrentMethod().DeclaringType.Name, MethodBase.GetCurrentMethod().Name, 2, "Barcode receiving successfully.", strUserID);

                //return "0~" + BL_Common.DataTableToJSONWithJSONNet(objSql.ExecuteProcedure_Table(SqlDataLayer.strLocal, "sp_ScanningReceiving", objParameters));

                return(objSql.ExecuteProcedure_Table(SqlDataLayer.strLocal, "sp_ScanningReceiving", objParameters));
            }
            catch (Exception ex)
            {
                BL_Common.BL_Write(MethodBase.GetCurrentMethod().DeclaringType.Name, MethodBase.GetCurrentMethod().Name, 0, ex.ToString(), strUserID);
                //return "1~" + objSql.getErrorMsg(ex.ToString());
                throw ex;
            }
            finally
            {
                objParameters = null;
                objSql        = null;
            }
        }