Beispiel #1
0
        /// <summary>
        /// 返回lmShop_CostReportTravel表的所有数据
        /// </summary>
        /// <returns></returns>
        public List <CostReportTravelInfo> GetAlllmShop_CostReportTravel()
        {
            List <CostReportTravelInfo> lmShopCostReportTravelList = new List <CostReportTravelInfo>();
            IDataReader reader = null;

            string sql = SQL_SELECT;

            reader = SqlHelper.ExecuteReader(GlobalConfig.ERP_DB_NAME, true, sql, null);
            while (reader.Read())
            {
                CostReportTravelInfo lmShopCostReportTravel = new CostReportTravelInfo(reader);
                lmShopCostReportTravelList.Add(lmShopCostReportTravel);
            }
            reader.Close();
            return(lmShopCostReportTravelList);
        }
Beispiel #2
0
        /// <summary>
        /// 根据lmShop_CostReportTravel表的TravelId字段返回数据
        /// </summary>
        /// <param name="travelId">TravelId</param>
        /// <returns></returns>
        public CostReportTravelInfo GetlmShop_CostReportTravelByTravelId(Guid travelId)
        {
            CostReportTravelInfo lmShopCostReportTravel = null;
            IDataReader          reader = null;

            string sql = SQL_SELECT + "where [TravelId] = @TravelId";

            SqlParameter[] paras = new SqlParameter[] {
                new SqlParameter("@TravelId", travelId)
            };
            reader = SqlHelper.ExecuteReader(GlobalConfig.ERP_DB_NAME, true, sql, paras);
            if (reader.Read())
            {
                lmShopCostReportTravel = new CostReportTravelInfo(reader);
            }
            reader.Close();
            return(lmShopCostReportTravel);
        }
Beispiel #3
0
        /// <summary>
        /// 根据ReportId返回lmShop_CostReportTravel表的数据
        /// </summary>
        /// <returns></returns>
        public List <CostReportTravelInfo> GetlmShop_CostReportTravelByReportId(Guid reportId)
        {
            List <CostReportTravelInfo> lmShopCostReportTravelList = new List <CostReportTravelInfo>();

            string sql = SQL_SELECT + "where [ReportId] = @ReportId";

            SqlParameter[] paras = new SqlParameter[] {
                new SqlParameter("@ReportId", reportId)
            };
            var reader = SqlHelper.ExecuteReader(GlobalConfig.ERP_DB_NAME, true, sql, paras);

            while (reader.Read())
            {
                CostReportTravelInfo lmShopCostReportTravel = new CostReportTravelInfo(reader);
                lmShopCostReportTravelList.Add(lmShopCostReportTravel);
            }
            reader.Close();
            return(lmShopCostReportTravelList);
        }