how to return the list of interger values to a method in c#
Hi i have a method in my repository which needs to provide list of integer
values but i am getting the first column values only .. how can i get the
all column values in my serivce..
this is my method in repository:
public List<int> GetChartInfo(string lineNo, string shiftDateTime, string
station)
{
string query = string.Format("SELECT SUM(QTY_BUILD) AS BUILD_QTY,
SUM(QTY_FAIL) AS FAIL_QTY, "+
"DATEPART(HH,BUILD_HOUR) AS SHIFT_HOURS
FROM {0} WITH (NOLOCK) "+
"WHERE LINE_NO='{1}' AND BUILD_HOUR
>='{2}' AND STATION='{3}' "+
"GROUP BY DATEPART(HH,BUILD_HOUR) ORDER
BY SHIFT_HOURS ",_tableName, lineNo,
shiftDateTime, station);
return MitecsRepository.Fetch<int>(query);
}
and i called this method in my service as follows:
var QtyBuildList = _qtyBuildRepository.GetChartInfo(cellName,
_currentShiftDateTime, tableName);
QtyBuildList is getting only build_qty data only .. how can i get the
fail_qty and shift_hours data also..
No comments:
Post a Comment