private void loadCombo() { DataTable dt = new DataTable(); dt = bal.GetCompanyShortCodeAndSessionID(); cmsessionIdByName.DataSource = dt; cmsessionIdByName.DisplayMember = dt.Columns["Code"].ToString(); cmsessionIdByName.ValueMember = dt.Columns["ID"].ToString(); }
private void LoadComboData() { dt = bal.GetCompanyShortCodeAndSessionID(); cmbShortCodeAndsessionID.DataSource = dt; cmbShortCodeAndsessionID.DisplayMember = "code"; cmbShortCodeAndsessionID.ValueMember = "ID"; cmbShortCodeAndsessionID.SelectedIndex = 0; cmbrbNrb.SelectedIndex = 0; }
private void LoadSessionInf() { DataTable dt = new DataTable(); dt = bal.GetCompanyShortCodeAndSessionID(); cmbsessionName.DataSource = dt; cmbsessionName.DisplayMember = "code"; cmbsessionName.ValueMember = "ID"; cmbsessionName.SelectedIndex = 0; }
private void LoadComboData() { dt = p_Bal.GetCompanyShortCodeAndSessionID(); if (dt.Rows.Count > 0) { cmbSession.DataSource = dt; cmbSession.DisplayMember = "Code"; cmbSession.ValueMember = "ID"; } else { MessageBox.Show("Session Invalid"); } }
private void ChkCompanySelection_CheckedChanged(object sender, EventArgs e) { if (ChkCompanySelection.Checked) { CmbsessionName.Enabled = true; DataTable dt = new DataTable(); dt = Bal.GetCompanyShortCodeAndSessionID(); CmbsessionName.DataSource = dt; CmbsessionName.DisplayMember = dt.Columns["Code"].ToString(); CmbsessionName.ValueMember = dt.Columns["ID"].ToString(); //this.dtpFormdate.MinDate = DateTime.MaxValue; this.dtpTodate.CustomFormat = ""; dtpFormdate.Enabled = false; dtpTodate.Enabled = false; } else { CmbsessionName.Enabled = false; CmbsessionName.Text = ""; dtpFormdate.Enabled = true; dtpTodate.Enabled = true; } }