private void RedesAdd_Load(object sender, EventArgs e) { this.setoresTableAdapter1.Fill(this.igrejafont10DataSet.Setores1); this.setoresTableAdapter.FillBy(this.igrejafont10DataSet.Setores); this.areasTableAdapter.FillBy(this.igrejafont10DataSet.Areas); this.distritosTableAdapter.Fill(this.igrejafont10DataSet.Distritos); this.redesTableAdapter1.Fill(this.igrejafont10DataSet.Redes); this.igrejasTableAdapter1.Fill(this.igrejafont10DataSet.Igrejas); this.celulasTableAdapter.Fill(this.igrejafont10DataSet.Celulas); loginInfo login = new loginInfo(); igrejaComboBox.SelectedValue = login.GetIgreja(); if (login.GetRole().Equals("Igreja Local")) { igrejaComboBox.Enabled = false; } else if (login.GetRole().Equals("Presidente Estadual")) { igrejasBindingSource.Filter = "Estado = '" + login.GetEstado() + "'"; } FiltraCheckBox(); cellMembersLabel.Text = dataGridView.RowCount.ToString(); float widthRatio = Screen.PrimaryScreen.Bounds.Width / 1366F; float heightRatio = Screen.PrimaryScreen.Bounds.Height / 768F; SizeF scale = new SizeF(widthRatio, heightRatio); this.Scale(scale); foreach (Control control in this.Controls) { control.Font = new Font("Microsoft Sans Serif", control.Font.SizeInPoints * heightRatio * widthRatio); } }
private void FillIgrejasDropDown() { loginInfo info = new loginInfo(); if (info.GetRole() == "Coord Estadual") { igrejasBindingSource.Filter = "Estado = '" + info.GetEstado() + "'"; } }
private void FillIgrejasDropDown() { loginInfo info = new loginInfo(); if (info.GetRole() == "Presidente Estadual") { igrejasBindingSource.Filter = "Estado = '" + info.GetEstado() + "'"; } else if (info.GetRole() == "Presidente Regional") { igrejasBindingSource.Filter = "Regiao = '" + info.GetRegiao() + "'"; } }
private void FillIgrejasDropDown() { loginInfo info = new loginInfo(); if (info.GetRole() == "Presidente Estadual") { comboBox1.SelectedItem = info.GetRegiao(); comboBox1.Enabled = false; checkBox1.Enabled = false; comboBox2.SelectedValue = info.GetEstado(); comboBox2.Enabled = false; checkBox2.Enabled = false; } else if (info.GetRole() == "Presidente Regional") { comboBox1.SelectedItem = info.GetRegiao(); comboBox1.Enabled = false; checkBox1.Enabled = false; } }
private void SetRegiao() { loginInfo info = new loginInfo(); SqlDataReader usrRdr = null; SqlConnection conn = new SqlConnection(info.GetStringConnection()); conn.Open(); SqlCommand comm1 = new SqlCommand("SELECT * FROM Estados WHERE Sigla = @estado", conn); comm1.Parameters.Add("@estado", SqlDbType.VarChar).Value = info.GetEstado(); usrRdr = comm1.ExecuteReader(); if (usrRdr.HasRows) { while (usrRdr.Read()) { info.SetRegiao(usrRdr.GetString(2)); } } }
private void MemberAdmin_Load(object sender, EventArgs e) { // TODO: This line of code loads data into the 'igrejafont10DataSet.FrequenciaCelula11' table. You can move, or remove it, as needed. this.frequenciaCelula11TableAdapter.FillByDistinct(this.igrejafont10DataSet.FrequenciaCelula11); this.frequenciaCelula1TableAdapter.FillBy(this.igrejafont10DataSet.FrequenciaCelula1); this.celulasTableAdapter.FillBy(this.igrejafont10DataSet.Celulas); this.setoresTableAdapter.FillBy(this.igrejafont10DataSet.Setores); this.areasTableAdapter.FillBy(this.igrejafont10DataSet.Areas); this.distritosTableAdapter.Fill(this.igrejafont10DataSet.Distritos); this.redesTableAdapter.Fill(this.igrejafont10DataSet.Redes); this.igrejasTableAdapter.Fill(this.igrejafont10DataSet.Igrejas); this.membrosTableAdapter.FillBy(this.igrejafont10DataSet.Membros); loginInfo login = new loginInfo(); igrejaComboBox.SelectedValue = login.GetIgreja(); if (login.GetRole().Equals("Igreja Local")) { igrejaComboBox.SelectedValue = login.GetIgreja(); igrejaComboBox.Enabled = false; } else if (login.GetRole().Equals("Presidente Estadual")) { igrejasBindingSource.Filter = "Estado = '" + login.GetEstado() + "'"; } redesBindingSource.Filter = ""; redeComboBox.SelectedIndex = -1; redeComboBox.Enabled = false; distritosBindingSource.Filter = ""; distritoComboBox.SelectedIndex = -1; distritoComboBox.Enabled = false; distritoCheckBox.Checked = true; areasBindingSource.Filter = ""; areaComboBox.SelectedIndex = -1; areaComboBox.Enabled = false; areaCheckBox.Checked = true; setoresBindingSource.Filter = ""; setorComboBox.SelectedIndex = -1; setorComboBox.Enabled = false; setorCheckBox.Checked = true; celulasBindingSource.Filter = ""; celulaComboBox.SelectedIndex = -1; celulaComboBox.Enabled = false; celulaCheckBox.Checked = true; FiltraMembros(); this.dataGridView.Columns[0].DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter; this.dataGridView.Columns[2].DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter; this.dataGridView.Columns[3].DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter; this.dataGridView.Columns[4].DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter; this.dataGridView.Columns[5].DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter; float widthRatio = Screen.PrimaryScreen.Bounds.Width / 1366F; float heightRatio = Screen.PrimaryScreen.Bounds.Height / 768F; SizeF scale = new SizeF(widthRatio, heightRatio); this.Scale(scale); foreach (Control control in this.Controls) { control.Font = new Font("Microsoft Sans Serif", control.Font.SizeInPoints * heightRatio * widthRatio); } }