public MainSpeakerDetails(IConferenceRepository ConferenceRepository, IGetSpeakerDetail GetSpeakerDetail, string SpeakerName) { InitializeComponent(); _ConferenceRepository = ConferenceRepository; _GetSpeakerDetail = GetSpeakerDetail; pictureBox1.ImageLocation = Base64Decode(_GetSpeakerDetail.GetSpeakerImage(SpeakerName)); pictureBox1.SizeMode = PictureBoxSizeMode.StretchImage; pictureBox1.Refresh(); speakerName = SpeakerName; }
public StartUpForm(IGetSpeakerDetail GetSpeakerDetail, IConferenceTypeRepository ConferenceTypeRepository, IConferenceRepository ConferenceRepository, IDictionaryCountryRepository DictionaryCountryRepository, IDictionaryCountyRepository DictionaryCountyRepository, IDictionaryCityRepository dictionaryCityRepository, IDictionaryConferenceCategoryRepository DictionaryConferenceCategoryRepository, ILocationRepository locationRepository) { _DictionaryCityRepository = dictionaryCityRepository; _GetSpeakerDetail = GetSpeakerDetail; _ConferenceRepository = ConferenceRepository; _ConferenceTypeRepository = ConferenceTypeRepository; _DictionaryCountryRepository = DictionaryCountryRepository; _DictionaryCountyRepository = DictionaryCountyRepository; _DictionaryConferenceCategoryRepository = DictionaryConferenceCategoryRepository; _LocationRepository = locationRepository; InitializeComponent(); }
public AddEvent(int editnew, MainForm form, AddConferenceDetailModel addConferenceDetailModel, IGetSpeakerDetail GetSpeakerDetail, IConferenceTypeRepository ConferenceTypeRepository, IConferenceRepository ConferenceRepository, IDictionaryCityRepository dictionaryCityRepository, IDictionaryCountryRepository DictionaryCountryRepository, IDictionaryCountyRepository DictionaryCountyRepository, IDictionaryConferenceCategoryRepository DictionaryConferenceCategoryRepository, ILocationRepository locationRepository) { InitializeComponent(); tabType.Hide(); EditNew = editnew; AddConferenceDetailModel = new AddConferenceDetailModel(); AddConferenceDetailModel = addConferenceDetailModel; eventDetails = new AddEventDetailModel(); var_email = AddConferenceDetailModel.HostEmail; formMain = form; f = this; // Current form to use in New/Edit Form _DictionaryCountyRepository = DictionaryCountyRepository; _GetSpeakerDetail = GetSpeakerDetail; _DictionaryCountryRepository = DictionaryCountryRepository; _ConferenceRepository = ConferenceRepository; _DictionaryConferenceCategoryRepository = DictionaryConferenceCategoryRepository; _LocationRepository = locationRepository; List <SpeakerDetailModel> speakers = GetSpeakers().Result; List <DictionaryCountryModel> countries = GetDictionaryCountry().Result; countys = GetDictionaryCounty().Result; List <DictionaryConferenceCategoryModel> categories = GetDictionaryCategory().Result; _ConferenceTypeRepository = ConferenceTypeRepository; x = GetConferenceType().Result; if (countries == null) { return; } else { populateCountry(countries); } if (categories == null) { return; } else { populateCategory(categories); } if (speakers == null) { return; } if (countys == null) { return; } populateSpeakers(speakers); _DictionaryCityRepository = dictionaryCityRepository; cityList = GetCity().Result; if (cityList == null || cityList.Count() == 0) { return; } if (x == null || x.Count() == 0) { return; } listView1_populate(); eventDetails.HostEmail = var_email; eventDetails.StartDate = AddStartDate.Value; eventDetails.EndDate = AddEndDate.Value; if (editnew == 0) { eventDetails.DictionaryCityName = addConferenceDetailModel.Location; eventDetails.ConferenceId = addConferenceDetailModel.ConferenceId; DictionaryCityModel city = GetCity(eventDetails.ConferenceId).Result; eventDetails.DictionaryCityId = city.DictionaryCityId; eventDetails.DictionaryCityName = city.Name; eventDetails.DictionaryCityCode = city.Code; eventDetails.DictionaryCountyId = city.DictionaryCountyId; DictionaryCountyModel county = GetCounty(eventDetails.DictionaryCountyId).Result; eventDetails.DictionaryCountyName = county.DictionaryCountyName; eventDetails.DictionaryCountyCode = county.Code; eventDetails.DictionaryCountryId = county.DictionaryCountryId; DictionaryCountryModel country = GetCountry(eventDetails.DictionaryCountryId).Result; eventDetails.DictionaryCountryName = country.DictionaryCountryName; eventDetails.DictionaryCountryCode = country.Code; eventDetails.ConferenceName = addConferenceDetailModel.ConferenceName; eventDetails.ConferenceTypeName = addConferenceDetailModel.ConferenceTypeName; eventDetails.EndDate = addConferenceDetailModel.EndDate; eventDetails.StartDate = addConferenceDetailModel.StartDate; eventDetails.SpeakerName = addConferenceDetailModel.Speaker; eventDetails.DictionaryConferenceCategoryName = addConferenceDetailModel.ConferenceCategoryName; DictionaryConferenceCategoryModel category = GetCategory(eventDetails.ConferenceId).Result; eventDetails.DictionaryConferenceCategoryId = category.DictionaryConferenceCategoryId; eventDetails.LocationName = addConferenceDetailModel.Location; AddConferenceName.Text = eventDetails.ConferenceName; AddAddress.Text = eventDetails.LocationName; AddStartDate.Value = eventDetails.StartDate; AddEndDate.Value = eventDetails.EndDate; ToSelectItem(); } }
public MainForm(IGetSpeakerDetail GetSpeakerDetail, IConferenceTypeRepository conferenceTypeRepository, IConferenceRepository ConferenceRepository, IDictionaryCountryRepository DictionaryCountryRepository, IDictionaryCountyRepository DictionaryCountyRepository, IDictionaryCityRepository dictionaryCityRepository, IDictionaryConferenceCategoryRepository DictionaryConferenceCategoryRepository, ILocationRepository locationRepository, string var_email) { InitializeComponent(); nr_row = dataGridView1.Size.Height / 40; f = this; _ConferenceTypeRepository = conferenceTypeRepository; _ConferenceRepository = ConferenceRepository; _DictionaryCountryRepository = DictionaryCountryRepository; _DictionaryCityRepository = dictionaryCityRepository; _GetSpeakerDetail = GetSpeakerDetail; _DictionaryCountyRepository = DictionaryCountyRepository; _DictionaryConferenceCategoryRepository = DictionaryConferenceCategoryRepository; _Locationrepository = locationRepository; currentUser = var_email; conferencesCurrentUserAttends = GetConferenceAudience(currentUser); reloadData = new System.Windows.Forms.Timer(); reloadData.Tick += new EventHandler(timerReloadData_Tick); reloadData.Interval = 10000; reloadData.Start(); x = GetAttendedConferencesFirst(); y = GetConferenceDetailForHost(); totalEntries = x.Count; startingPoint = 0; HoststartingPoint = 0; HosttotalEntries = y.Count; addConferenceDetailModel = new AddConferenceDetailModel(); addConferenceDetailModel.HostEmail = currentUser; if (x == null || x.Count() == 0) { return; } if (totalEntries < nr_row) { populateConferenceGridViewByDate(0, totalEntries, dateTimePicker2.Value, dateTimePicker1.Value); changeColor(); } else { populateConferenceGridViewByDate(0, nr_row, dateTimePicker2.Value, dateTimePicker1.Value); changeColor(); } if (y == null || y.Count() == 0) { return; } if (HosttotalEntries < nr_row) { populateHostGridViewByDate(0, HosttotalEntries, dateTimePicker4.Value, dateTimePicker3.Value); btnBackHost.Enabled = false; btnNextHost.Enabled = false; } else { populateHostGridViewByDate(0, nr_row, dateTimePicker4.Value, dateTimePicker3.Value); } }
public SpeakerController(ILogger <SpeakerController> logger, IGetSpeakerDetail speakerrepository) { _logger = logger; _speakerrepository = speakerrepository; }