public GenerateSAS() { InitializeComponent(); Surv = new Survey(); cboSurvey.DisplayMember = "SurveyCode"; cboSurvey.ValueMember = "SID"; cboSurvey.DataSource = DBAction.GetAllSurveys(); }
public static void CreateWorld() { CurrentUser = DBAction.GetUser(Environment.UserName); AllStudies = DBAction.GetStudyInfo(); AllWaves = DBAction.GetWaveInfo(); AllSurveys = DBAction.GetAllSurveys(); AllPeople = DBAction.GetPeople(); }
public SurveyDetails() { InitializeComponent(); this.MouseWheel += SurveyDetails_OnMouseWheel; Studies = DBAction.GetStudyInfo(); StudyWaves = DBAction.GetWaveInfo(); Surveys = DBAction.GetAllSurveys(); // bind bs = new BindingSource { DataSource = Surveys }; bs.ListChanged += SurveyDetails_ListChanged; bindingNavigator1.BindingSource = bs; bindingNavigator1.BindingSource.PositionChanged += SurveyBindingSource_PositionChanged; StudyBS = new BindingSource() { DataSource = Studies }; //navStudyWave.BindingSource = StudyBS; WaveBS = new BindingSource() { DataSource = Studies, DataMember = "Waves" }; navStudyWave.BindingSource = StudyBS; cboCountryCode.DisplayMember = "CountryCode"; cboCountryCode.ValueMember = "StudyID"; cboCountryCode.DataSource = DBAction.GetStudyInfo(); cboSurveyMode.DataSource = DBAction.GetModeInfo(); cboSurveyMode.DisplayMember = "ModeAbbrev"; cboSurveyMode.ValueMember = "ID"; cboUserGroup.DataSource = DBAction.GetGroupInfo(); cboUserGroup.DisplayMember = "UserGroup"; cboUserGroup.ValueMember = "ID"; cboCohort.DataSource = DBAction.GetCohortInfo(); cboCohort.DisplayMember = "Cohort"; cboCohort.ValueMember = "ID"; BindProperties(); }
private void SurveyNumbering_Load(object sender, EventArgs e) { cboSurvey.DataSource = DBAction.GetAllSurveys(); cboSurvey.ValueMember = "SurveyCode"; cboSurvey.DisplayMember = "SurveyCode"; cboSurvey.SelectedItem = null; cboSurvey.SelectedIndexChanged += SurveyChanged; ColorForm(); }
/// <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()); }
private void SurveyOverview_Load(object sender, EventArgs e) { cboSurvey.ValueMember = "SurveyCode"; cboSurvey.DisplayMember = "SurveyCode"; cboSurvey.DataSource = DBAction.GetAllSurveys(); }