public IHttpActionResult GetEmployeesWithSurveyToVerifiy() { SurveyManagerList managerInfoObject = new SurveyManagerList(); var ADUserName = Generic.GetCurrentLogonUserName(); managerInfoObject.Type = "Annually"; managerInfoObject.Period = "2016"; managerInfoObject.Manager = new Surveys().getSurveyTeamEmployeeList().Where(c => c.AD_User_Name.ToLower() == ADUserName.ToLower()).First().Employee; try { var list = new Surveys().getManagerSurveysListStatus(managerInfoObject); var employeeSurveyList = new List <SurveyManagerStatus>(); foreach (var item in list) { if (!(employeeSurveyList.Where(c => c.Survey_For == item.Survey_For).Count() > 0)) { employeeSurveyList.Add(item); } } return(Ok(employeeSurveyList)); } catch (Exception ex) { throw new Exception(ex.Message); } }
public IHttpActionResult GetEmployeesWithSurveyForReview() { SurveyManagerList managerInfoObject = new SurveyManagerList(); var ADUserName = Generic.GetCurrentLogonUserName(); managerInfoObject.Type = "Annually"; managerInfoObject.Period = "2016"; managerInfoObject.Manager = new Surveys().getSurveyTeamEmployeeList().Where(c => c.AD_User_Name.ToLower() == ADUserName.ToLower()).First().Employee; try { var v = new Surveys().getManagerSurveysListStatus(managerInfoObject); return(Ok(new Surveys().getManagerSurveysListStatus(managerInfoObject))); } catch (Exception ex) { throw new Exception(ex.Message); } }