using HNWD.Pregrant.Model; using System.Collections.Generic; namespace HNWD.Pregrant.DataAccess { public class WD_CostInfoDataAccess : GenericDataAccess { private WD_CostInfo wd_CostInfo = null; public WD_CostInfoExt ext = new WD_CostInfoExt(); private readonly static WD_CostInfoDataAccess wd_CostInfoDataAccess = new WD_CostInfoDataAccess(); public WD_CostInfoDataAccess(WD_CostInfo wd_CostInfo) { this.wd_CostInfo = wd_CostInfo; } public static WD_CostInfoDataAccess GetInstance() { return wd_CostInfoDataAccess; } private WD_CostInfoDataAccess() { } public List QueryAll() { string strSql = " select {0} from [WD_CostInfo] where DATEDIFF(day,[COST_CREATEDATE],getdate() )<2 "; ext.messageDataList = this.Query(strSql, new WD_CostInfo()); ext.messageDataList.ForEach(f => f.bSuccess = this.bSuccess); ext.messageDataList.ForEach(f => f.Code = this.Code); ext.messageDataList.ForEach(f => f.Message = this.Message); ext.messageDataList.ForEach(f => f.Rows = this.Rows); ext.Code = this.Code; ext.Message = this.Message; ext.Rows = this.Rows; return ext.messageDataList; } } }