//overloaded method for asynchronous reports public DoctorChemistMetReportModel GetDoctorChemistMetTabular(string company_Code, string user_Code, string start_Date, string end_Date, string ConnectionString) { try { using (IDbConnection connection = IDbOpenConnection(ConnectionString)) { var p = new DynamicParameters(); p.Add("@Company_Code", company_Code); p.Add("@User_Code", user_Code); p.Add("@StartDate", start_Date); p.Add("@EndDate", end_Date); var DoctorChemistTabular = connection.QueryMultiple(SP_HDGETDOCTORCHEMISTMETTABULARREPORT, p, commandType: CommandType.StoredProcedure); DoctorChemistMetReportModel objDocChemMetReport = new DoctorChemistMetReportModel(); objDocChemMetReport.lstUserDetail = DoctorChemistTabular.Read <UserDetailModel>().ToList(); objDocChemMetReport.lstDivisionModel = DoctorChemistTabular.Read <DivisionReportModel>().ToList(); objDocChemMetReport.lstDCRHeader = DoctorChemistTabular.Read <DCRHeaderReportModel>().ToList(); objDocChemMetReport.lstDCRDoctorVisit = DoctorChemistTabular.Read <DCRDoctorVisitReportModel>().ToList(); objDocChemMetReport.lstAccompanist = DoctorChemistTabular.Read <DCRAccompanistDetail>().ToList(); objDocChemMetReport.lstDCRChemistVisit = DoctorChemistTabular.Read <DCRChemistVisitReportModel>().ToList(); connection.Close(); return(objDocChemMetReport); } } catch { throw; } }
//overloaded method for asynchronous reports public List <DoctorChemistMetReportModel> GetDoctorChemistMetTabular(string company_Code, string userCodes, string startDate, string endDate, string CurrUserCode, string ConnectionString, string SubDomain) { userCodes = userCodes.Replace("[", "").Replace("]", "").Replace("\"", "").ToString(); List <string> lstUserCodes = new List <string>(); lstUserCodes = (from string s in userCodes.Split(',') select Convert.ToString(s)).ToList <string>(); _dalDocChemTabular = new DAL_DoctorChemistMetTabular(); List <DoctorChemistMetReportModel> lstDoctorChemistMetReport = new List <DoctorChemistMetReportModel>(); foreach (string userCode in lstUserCodes) { DoctorChemistMetReportModel docChemReportModel = _dalDocChemTabular.GetDoctorChemistMetTabular(company_Code, userCode, startDate, endDate, ConnectionString); lstDoctorChemistMetReport.Add(docChemReportModel); } return(lstDoctorChemistMetReport); }