private List <stp_GetDriversListReportResult> GetDataSource() { if (rdAllDriver.IsChecked == true) { List <stp_GetDriversListReportResult> objDriverList = new List <stp_GetDriversListReportResult>(); using (TaxiDataContext db = new TaxiDataContext()) { objDriverList = db.stp_GetDriversListReport(1).ToList(); } return(objDriverList); } else { List <stp_GetDriversListReportResult> objDriverList = new List <stp_GetDriversListReportResult>(); using (TaxiDataContext db = new TaxiDataContext()) { objDriverList = db.stp_GetDriversListReport(2).ToList(); } return(objDriverList); } }