public static void CreateWorld() { CurrentUser = DBAction.GetUser(Environment.UserName); AllStudies = DBAction.GetStudyInfo(); AllWaves = DBAction.GetWaveInfo(); AllSurveys = DBAction.GetAllSurveys(); AllPeople = DBAction.GetPeople(); }
/// <summary> /// Populates data grid and combo boxes. /// </summary> private void SetupForm() { // reference survey list dgvRefSurveys.AutoGenerateColumns = false; DataGridViewColumn column1 = new DataGridViewTextBoxColumn(); column1.DataPropertyName = "CheckID"; column1.Name = "CheckID"; column1.Visible = false; dgvRefSurveys.Columns.Add(column1); DataGridViewComboBoxColumn column2 = new DataGridViewComboBoxColumn(); column2.DataPropertyName = "SID"; column2.DataSource = DBAction.GetAllSurveys(); column2.DisplayMember = "SurveyCode"; column2.ValueMember = "SID"; column2.Name = "Survey"; dgvRefSurveys.Columns.Add(column2); CalendarColumn column3 = new CalendarColumn(); column3.DataPropertyName = "SurveyDate"; column3.Name = "Date"; dgvRefSurveys.Columns.Add(column3); // survey filter list dgvSurveys.DataSource = DBAction.GetSurveyCheckSurveys(); // combo boxes cboCheckType.DisplayMember = "CheckName"; cboCheckType.ValueMember = "ID"; cboCheckType.DataSource = new BindingList <SurveyCheckType>(DBAction.GetSurveyCheckTypes()); cboSurvey.DisplayMember = "SurveyCode"; cboSurvey.ValueMember = "SID"; cboSurvey.DataSource = new BindingList <Survey>(DBAction.GetAllSurveys()); cboCheckInit.DisplayMember = "Name"; cboCheckInit.ValueMember = "ID"; cboCheckInit.DataSource = new BindingList <Person>(DBAction.GetPeople()); }