public IActionResult GetAttendedConferencesFirst([FromBody] GetAttendedConferencesFirstModel model)
        {
            List <ConferenceAudienceModel>          conferencesAudience      = _conferenceRepository.GetConferenceAudience(model.Email);
            List <ConferenceDetailAttendFirstModel> attendedConferencesFirst = _conferenceRepository.GetAttendedConferencesFirst(conferencesAudience, model.StartDate, model.EndDate);

            return(Ok(attendedConferencesFirst));
        }
Пример #2
0
        private List <ConferenceDetailAttendFirstModel> GetAttendedConferencesFirst()
        {
            GetAttendedConferencesFirstModel current = new GetAttendedConferencesFirstModel();

            current.Email     = currentUser;
            current.StartDate = dateTimePicker2.Value;
            current.EndDate   = dateTimePicker1.Value;
            var temp = GetAttendedConferencesFirst(current).Result;

            return(temp);
        }
Пример #3
0
        static async Task <List <ConferenceDetailAttendFirstModel> > GetAttendedConferencesFirst(GetAttendedConferencesFirstModel obj)
        {
            var                 json                = JsonConvert.SerializeObject(obj);
            var                 httpContent         = new StringContent(json, Encoding.UTF8, "application/json");
            HttpClient          client              = new HttpClient();
            HttpResponseMessage httpResponseMessage = client.PostAsync("http://localhost:2794/Conference/GetAttendedConferencesFirst", httpContent).Result;

            if (httpResponseMessage.IsSuccessStatusCode)
            {
                var response = JsonConvert.DeserializeObject <List <ConferenceDetailAttendFirstModel> >(httpResponseMessage.Content.ReadAsStringAsync().Result.ToString());
                return(response);
            }
            return(null);
        }