public static DataTable GetMemberMasterReportDataTable(string includeMobileNumberOrNot, string userID) { List <parametersClass> dbParametersList = new List <parametersClass>(); parametersClass parameters = new parametersClass { paramName = "IncludeMblNumber", paramValue = includeMobileNumberOrNot }; dbParametersList.Add(parameters); parameters = new parametersClass { paramName = "userID", paramValue = userID }; dbParametersList.Add(parameters); string procedureName = "Usp_GetMemberMasterReport"; DataTable dt = getDataFromDataBase(dbParametersList, procedureName).Tables[0]; if (dt.Rows.Count > 0) { return(dt); } else { return(null); } }
public static DataSet GetShiftViewReportDataTable(string userName, string userID, string branchCode, string shiftId, DateTime fromDate, DateTime toDate, int reportID) { string procedureName = ""; List <parametersClass> dbParametersList = new List <parametersClass>(); parametersClass parameters = new parametersClass(); if (reportID == 1) { parameters = new parametersClass { paramName = "userID", paramValue = userID }; dbParametersList.Add(parameters); parameters = new parametersClass { paramName = "userName", paramValue = userName }; dbParametersList.Add(parameters); parameters = new parametersClass { paramName = "branchCode", paramValue = branchCode }; dbParametersList.Add(parameters); parameters = new parametersClass { paramName = "shiftId", paramValue = shiftId }; dbParametersList.Add(parameters); parameters = new parametersClass { paramName = "fromDate", paramValue = fromDate }; dbParametersList.Add(parameters); parameters = new parametersClass { paramName = "toDate", paramValue = toDate }; dbParametersList.Add(parameters); } else if (reportID == 2) { parameters = new parametersClass { paramName = "userID", paramValue = userID }; dbParametersList.Add(parameters); parameters = new parametersClass { paramName = "shiftId", paramValue = shiftId }; dbParametersList.Add(parameters); parameters = new parametersClass { paramName = "fromDate", paramValue = fromDate }; dbParametersList.Add(parameters); parameters = new parametersClass { paramName = "toDate", paramValue = toDate }; dbParametersList.Add(parameters); } else if (reportID == 3 || reportID == 6) { parameters = new parametersClass { paramName = "shiftId", paramValue = shiftId }; dbParametersList.Add(parameters); } else if (reportID == 4 || reportID == 5) { parameters = new parametersClass { paramName = "shiftId", paramValue = shiftId }; dbParametersList.Add(parameters); parameters = new parametersClass { paramName = "UserID", paramValue = userID }; dbParametersList.Add(parameters); parameters = new parametersClass { paramName = "ReportType" }; if (reportID == 4) { parameters.paramValue = "HDFC"; } else if (reportID == 5) { parameters.paramValue = "Fleet"; } dbParametersList.Add(parameters); procedureName = "Usp_ShiftWiseFleetOrHDFCreport"; } if (reportID == 1) { procedureName = "Usp_ShifViewReport"; } else if (reportID == 2) { procedureName = "Usp_ShiftSaleValueMeterReading"; } else if (reportID == 3) { procedureName = "Usp_StockReportByShift"; } else if (reportID == 6) { procedureName = "Usp_DailySalesReportByShift"; } return(getDataFromDataBase(dbParametersList, procedureName)); }