private void Settings_Load(object sender, EventArgs e) { if (!DesignMode) { Localizer.TranslateControl(this); lvUsers.SetObjects(members.GetAllUsers()); country = demo.GetCountry(); countryView1.LoadCountry(country, true); diseasePickerControl1.LoadLists(true); // Tell the AdminLevelTypesControl that it is not being launched from the StartUp wizard adminLevelTypesControl1.IsStartUp = false; } }
private void TaskForceCountryStep_Load(object sender, EventArgs e) { if (!DesignMode) { Localizer.TranslateControl(this); country = demo.GetCountry(); if (!string.IsNullOrEmpty(country.TaskForceName)) DoNextStep(); TaskForceApi api = new TaskForceApi(); var taskForceCountries = api.GetAllCountries(); var tfCountry = taskForceCountries.FirstOrDefault(c => c.Name == country.Name); if (tfCountry != null) { country.TaskForceName = tfCountry.Name; var userId = ApplicationData.Instance.GetUserId(); demo.UpdateCountry(country, userId); DoNextStep(); } adminUnitMatcher1.BindData(new AdminLevel { Name = country.Name }, taskForceCountries); } }
public StepCountrySettings(Country c) : base() { model = c; InitializeComponent(); }
public void LoadCountry(Country country, bool showDate) { model = country; bsCountry.DataSource = model; }