var engData = (from dr in dtEng.AsEnumerable()
where Convert.ToString(dr["job_number"]) == jobNumber
&& Convert.ToString(dr["period"]) == per.Periods
&& Convert.ToString(dr["office_short_name"]) == off.OfficeShortName
select new
{
GroupCode = Convert.ToString(dr["group_code"]),
GroupShortName = Convert.ToString(dr["group_short_name"]),
CausalCountPeriod = (dr["casual_count_period"] == DBNull.Value || Convert.ToString(dr["casual_count_period"]) == "") ? Convert.ToInt32("0") : Convert.ToInt32(dr["casual_count_period"]),
CausalCountToDate = (dr["casual_count_to_date"] == DBNull.Value || Convert.ToString(dr["casual_count_to_date"]) == "") ? Convert.ToInt32("0") : Convert.ToInt32(dr["casual_count_to_date"]),
ReportingPeriod = Convert.ToString(dr["reporting_period"])
}).Distinct();
where Convert.ToString(dr["job_number"]) == jobNumber
&& Convert.ToString(dr["period"]) == per.Periods
&& Convert.ToString(dr["office_short_name"]) == off.OfficeShortName
select new
{
GroupCode = Convert.ToString(dr["group_code"]),
GroupShortName = Convert.ToString(dr["group_short_name"]),
CausalCountPeriod = (dr["casual_count_period"] == DBNull.Value || Convert.ToString(dr["casual_count_period"]) == "") ? Convert.ToInt32("0") : Convert.ToInt32(dr["casual_count_period"]),
CausalCountToDate = (dr["casual_count_to_date"] == DBNull.Value || Convert.ToString(dr["casual_count_to_date"]) == "") ? Convert.ToInt32("0") : Convert.ToInt32(dr["casual_count_to_date"]),
ReportingPeriod = Convert.ToString(dr["reporting_period"])
}).Distinct();
No comments:
Post a Comment