示例#1
0
        public GetWaveByConditionResponse GetWaveHeaderAndDetail(int ID)
        {
            GetWaveByConditionResponse response = new GetWaveByConditionResponse();

            DbParam[] dbParams = new DbParam[] {
                new DbParam("@ID", DbType.Int32, ID, ParameterDirection.Input)
            };

            DataSet ds = this.ExecuteDataSet("Proc_WMS_GetWaveHeaderAndDetail", dbParams);

            response.WaveCollection       = ds.Tables[0].ConvertToEntityCollection <WMS_Wave>();
            response.WaveDetailCollection = ds.Tables[1].ConvertToEntityCollection <WMS_WaveDetail>();
            return(response);
        }
示例#2
0
        public GetWaveByConditionResponse GetWaveHeaderByCondition(WaveSearchCondition SearchCondition, int pageIndex, int pageSize, out int rowCount)
        {
            GetWaveByConditionResponse response = new GetWaveByConditionResponse();
            string sqlWhere     = this.GenGetOrderWhere(SearchCondition);
            int    tempRowCount = 0;

            DbParam[] dbParams = new DbParam[] {
                new DbParam("@Where", DbType.String, sqlWhere, ParameterDirection.Input),
                new DbParam("@PageIndex", DbType.Int32, pageIndex, ParameterDirection.Input),
                new DbParam("@PageSize", DbType.Int32, pageSize, ParameterDirection.Input),
                new DbParam("@RowCount", DbType.Int32, tempRowCount, ParameterDirection.Output)
            };

            DataSet ds = this.ExecuteDataSet("Proc_WMS_GetWaveHeaderByCondition", dbParams);

            rowCount = (int)dbParams[3].Value;
            response.WaveCollection = ds.Tables[0].ConvertToEntityCollection <WMS_Wave>();
            return(response);
        }