private String SetInfo() { loginInfo info = new loginInfo(); igrejafont11DataSet igrejafont11DataSet = new igrejafont11DataSet(); SqlDataReader usrRdr = null; String firstLogin = "******"; SqlConnection conn = new SqlConnection(info.GetStringConnection()); conn.Open(); SqlCommand comm1 = new SqlCommand("SELECT * FROM usuarios WHERE Nome = @usuario", conn); comm1.Parameters.Add("@usuario", SqlDbType.VarChar).Value = loginFormUserTextBox.Text; usrRdr = comm1.ExecuteReader(); if (usrRdr.HasRows) { while (usrRdr.Read()) { info.SetNome(usrRdr.GetString(0)); info.SetSenha(usrRdr.GetString(1)); info.SetIgreja(usrRdr.GetString(2)); info.SetRole(usrRdr.GetString(3)); info.SetRegiao(usrRdr.GetString(4)); if (usrRdr.GetString(5) != null) { firstLogin = usrRdr.GetString(5); } info.SetCidade(usrRdr.GetString(6)); info.SetEstado(usrRdr.GetString(7)); } } return(firstLogin); }
private void formIgrejasRemoveOkButton_Click(object sender, EventArgs e) { DialogResult result = MessageBox.Show("Deseja remover o Usuário: " + formUserRemoveComboBox.Text, "Question", MessageBoxButtons.YesNo, MessageBoxIcon.Question); TesourariaIFV.loginInfo info = new loginInfo(); if (result == DialogResult.Yes) { SqlConnection conn = new SqlConnection(info.GetStringConnection()); conn.Open(); SqlCommand comm1 = new SqlCommand("DELETE FROM Usuarios WHERE Nome = @Nome", conn); comm1.Parameters.Add("@Nome", SqlDbType.VarChar).Value = formUserRemoveComboBox.SelectedValue.ToString(); comm1.ExecuteReader(); usuariosBindingSource.RemoveAt(formUserRemoveComboBox.SelectedIndex); formUserRemoveComboBox.DataSource = null; formUserRemoveComboBox.DataSource = usuariosBindingSource; formUserRemoveComboBox.DisplayMember = "Nome"; formUserRemoveComboBox.ValueMember = "Nome"; formUserRemoveComboBox.Update(); formUserRemoveComboBox.Refresh(); } }
// POST: api/Login public User Post([FromBody] loginInfo value) { Console.WriteLine("new Login Attempt: " + value); User user = SessionHandler.TryLoggingIn(value.username, value.password); return(user); }
public ReportCaixa() { InitializeComponent(); 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); } loginInfo info = new loginInfo(); if (info.GetRole() == "Igreja Local") { formReportCaixaComboBox.Visible = false; label4.Visible = false; } else { FillIgrejasDropDown(); } }
public tokenObj validatesApiUser(loginInfo login) { authFunc auth = new authFunc(); tokenObj token = auth.validatesApiUser(login); return(token); }
private void FiltraCelulas() { if (celulaCheckBox.Checked != true) { loginInfo info = new loginInfo(); if (setorComboBox.SelectedValue != null && areaComboBox.SelectedValue != null && distritoComboBox.SelectedValue != null && redeComboBox.SelectedValue != null) { celulasBindingSource.Filter = "Setor = '" + setorComboBox.SelectedValue.ToString() + "'" + "AND Area = '" + areaComboBox.SelectedValue.ToString() + "'" + "AND Distrito = '" + distritoComboBox.SelectedValue.ToString() + "'" + "AND Rede = '" + redeComboBox.SelectedValue.ToString() + "'" + "AND Igreja = '" + igreja + "'"; } else if (areaComboBox.SelectedValue != null && distritoComboBox.SelectedValue != null && redeComboBox.SelectedValue != null) { celulasBindingSource.Filter = "Area = '" + areaComboBox.SelectedValue.ToString() + "'" + "AND Distrito = '" + distritoComboBox.SelectedValue.ToString() + "'" + "AND Rede = '" + redeComboBox.SelectedValue.ToString() + "'" + "AND Igreja = '" + igreja + "'"; } else if (distritoComboBox.SelectedValue != null && redeComboBox.SelectedValue != null) { celulasBindingSource.Filter = "Distrito = '" + distritoComboBox.SelectedValue.ToString() + "'" + "AND Rede = '" + redeComboBox.SelectedValue.ToString() + "'" + "AND Igreja = '" + igreja + "'"; } else if (redeComboBox.SelectedValue != null) { celulasBindingSource.Filter = "Rede = '" + redeComboBox.SelectedValue.ToString() + "'" + "AND Igreja = '" + igreja + "'"; } else { celulasBindingSource.Filter = "Igreja = '" + igreja + "'"; } } }
private void createReportCaixaBanco() { loginInfo info = new loginInfo(); DateTime dataInicialMonth = new DateTime(reportCaixaMonthDateTimePicker.Value.Year, reportCaixaMonthDateTimePicker.Value.Month, 01); DateTime dataFinalMonth = new DateTime(reportCaixaMonthDateTimePicker.Value.Year, reportCaixaMonthDateTimePicker.Value.Month, DateTime.DaysInMonth(reportCaixaMonthDateTimePicker.Value.Year, reportCaixaMonthDateTimePicker.Value.Month)); DateTime dataInicial = new DateTime(reportCaixaInitialDateTimePicker.Value.Year, reportCaixaInitialDateTimePicker.Value.Month, reportCaixaInitialDateTimePicker.Value.Day); DateTime dataFinal = new DateTime(reportCaixaFinalDateTimePicker.Value.Year, reportCaixaFinalDateTimePicker.Value.Month, reportCaixaFinalDateTimePicker.Value.Day); if (reportCaixaMonthRadioButton.Checked == true) { TesourariaIFV.Forms.ReportForms.ManagementReport.ReportForms.ESIgreja report = new ReportForms.ESIgreja(dataInicialMonth, dataFinalMonth, formReportCaixaComboBox.SelectedValue.ToString());//, CalculaSaldoInicialGeral(formReportCaixaComboBox.SelectedValue.ToString(), dataInicialMonth)); report.Show(); } else { if (reportCaixaPeriodRadioButton.Checked == true) { TesourariaIFV.Forms.ReportForms.ManagementReport.ReportForms.ESIgreja report = new ReportForms.ESIgreja(dataInicial, dataFinal, formReportCaixaComboBox.SelectedValue.ToString());//, CalculaSaldoInicialGeral(formReportCaixaComboBox.SelectedValue.ToString(), dataInicial)); report.Show(); } else { MessageBox.Show("Por favor, selecione Mês/Ano ou Período.", "Information", MessageBoxButtons.OK, MessageBoxIcon.Information); } } }
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 FiltraSetorPorArea() { loginInfo info = new loginInfo(); if (setorCheckBox.Checked == false) { if (areaComboBox.SelectedValue != null && distritoComboBox.SelectedValue != null && redeComboBox.SelectedValue != null) { setoresBindingSource.Filter = "Area = '" + areaComboBox.SelectedValue.ToString() + "'" + "AND Distrito = '" + distritoComboBox.SelectedValue.ToString() + "'" + "AND Rede = '" + redeComboBox.SelectedValue.ToString() + "'" + "AND Igreja = '" + igreja + "'"; } else if (distritoComboBox.SelectedValue != null && redeComboBox.SelectedValue != null) { setoresBindingSource.Filter = "Distrito = '" + distritoComboBox.SelectedValue.ToString() + "'" + "AND Rede = '" + redeComboBox.SelectedValue.ToString() + "'" + "AND Igreja = '" + igreja + "'"; } else if (redeComboBox.SelectedValue != null) { setoresBindingSource.Filter = "Rede = '" + redeComboBox.SelectedValue.ToString() + "'" + "AND Igreja = '" + igreja + "'"; } else { setoresBindingSource.Filter = "Igreja = '" + igreja + "'"; } } else { FiltraCelulas(); } }
private void reportDizimoComboBox_SelectedIndexChanged(object sender, EventArgs e) { loginInfo info = new loginInfo(); membrosBindingSource.Filter = "igreja = '" + reportDizimoComboBox.Text + "'"; FillDataGridView(); }
private void formGrupoRemoveOkButton_Click(object sender, EventArgs e) { DialogResult result = MessageBox.Show("Deseja remover o grupo: " + formGrupoRemoveComboBox.Text, "Question", MessageBoxButtons.YesNo, MessageBoxIcon.Question); TesourariaIFV.loginInfo info = new loginInfo(); if (result == DialogResult.Yes) { SqlConnection conn = new SqlConnection(info.GetStringConnection()); conn.Open(); SqlCommand comm1 = new SqlCommand("DELETE FROM GruposPlanosDeContas WHERE Codigo = @Codigo", conn); comm1.Parameters.Add("@Codigo", SqlDbType.VarChar).Value = Convert.ToInt16(formGrupoRemoveComboBox.SelectedValue.ToString()); comm1.ExecuteReader(); gruposPlanosDeContasBindingSource.RemoveAt(formGrupoRemoveComboBox.SelectedIndex); formGrupoRemoveComboBox.DataSource = null; formGrupoRemoveComboBox.DataSource = gruposPlanosDeContasBindingSource; formGrupoRemoveComboBox.DisplayMember = "Descricao"; formGrupoRemoveComboBox.ValueMember = "Codigo"; formGrupoRemoveComboBox.Update(); formGrupoRemoveComboBox.Refresh(); } }
private void searchMemberButton_Click(object sender, EventArgs e) { Membros.MembroSearch search = new Membros.MembroSearch(igrejaComboBox.Text); search.ShowDialog(); int code = search.MemberCode; if (code != 0) { loginInfo info = new loginInfo(); SqlDataReader usrRdr = null; SqlConnection conn = new SqlConnection(info.GetStringConnection()); conn.Open(); SqlCommand comm1 = new SqlCommand("select * from Membros where Codigo=@codigo", conn); comm1.Parameters.Add("@codigo", SqlDbType.VarChar).Value = code; usrRdr = comm1.ExecuteReader(); if (usrRdr.HasRows) { while (usrRdr.Read()) { int codigo = usrRdr.GetInt32(0); codTextBox.Text = Convert.ToString(codigo); respTextBox.Text = (string)usrRdr.GetString(1); foneTextBox.Text = (string)usrRdr.GetString(13); emailTextBox.Text = (string)usrRdr.GetString(21); } } } }
public BbsPageBase() { UserInfo = new loginInfo(); // //TODO: 在此处添加构造函数逻辑 // UserInfo = getUserInfo(); }
private void FillIgrejasDropDown() { loginInfo info = new loginInfo(); if (info.GetRole() == "Coord Estadual") { igrejasBindingSource.Filter = "Estado = '" + info.GetEstado() + "'"; } }
private void SetWindowToRole() { loginInfo info = new loginInfo(); if (info.GetRole() == "Igreja Local") { administraçãoToolStripMenuItem.Enabled = false; } }
protected void btnsubmit_Click(object sender, EventArgs e) { try { //change password for admin login string OldPswd, NewPswd, ConfirmPswd; OldPswd = txtOldPswd.Text.Trim(); NewPswd = txtNewPswd.Text.Trim(); ConfirmPswd = txtCpswd.Text.Trim(); string userid = Session["userid"].ToString(); if (Checks.Empty(OldPswd) && Checks.Empty(NewPswd) && Checks.Empty(ConfirmPswd)) { lblMsg.Text = "All fields required!"; } else if (Checks.Empty(OldPswd)) { lblMsg.Text = "Old password is required!"; } else if (Checks.Empty(NewPswd)) { lblMsg.Text = "New password is required!"; } else if (Checks.Empty(ConfirmPswd)) { lblMsg.Text = "Confirm-password is required!"; } else { int user = int.Parse(Session["UserID"].ToString()); BakersLoungeEntities data = new BakersLoungeEntities(); loginInfo li = new loginInfo(); li = (from l in data.loginInfoes where l.LoginInfoId == user where l.Password == OldPswd select l).FirstOrDefault(); //Linq query if (li != null) { var image = from l in data.loginInfoes where l.LoginInfoId == user select l; foreach (loginInfo li1 in image) { li1.Password = NewPswd; lblMsg.Text = "!Password Changed Successfully"; } } else if (li == null) { lblMsg.Text = "!Old Password Incorrect"; } data.SaveChanges(); } } catch (Exception ex) { lblMsg.Text = ex.Message; } }
protected void Page_Load(object sender, EventArgs e) { lInfo = (loginInfo)Session["userloined"]; if (lInfo == null) { Response.Redirect(Request.Url.ToString()); } //if (!IsPostBack) getTypeList(); }
private void ConvidadoAdmin_Load(object sender, EventArgs e) { // TODO: This line of code loads data into the 'gerenciaCelulasDataSet.Convidados' table. You can move, or remove it, as needed. this.convidadosTableAdapter.Fill(this.gerenciaCelulasDataSet.Convidados); // TODO: This line of code loads data into the 'gerenciaCelulasDataSet.Celulas' table. You can move, or remove it, as needed. this.celulasTableAdapter.Fill(this.gerenciaCelulasDataSet.Celulas); // TODO: This line of code loads data into the 'gerenciaCelulasDataSet.Setores' table. You can move, or remove it, as needed. this.setoresTableAdapter.Fill(this.gerenciaCelulasDataSet.Setores); // TODO: This line of code loads data into the 'gerenciaCelulasDataSet.Areas' table. You can move, or remove it, as needed. this.areasTableAdapter.Fill(this.gerenciaCelulasDataSet.Areas); // TODO: This line of code loads data into the 'gerenciaCelulasDataSet.Distritos' table. You can move, or remove it, as needed. this.distritosTableAdapter.Fill(this.gerenciaCelulasDataSet.Distritos); // TODO: This line of code loads data into the 'gerenciaCelulasDataSet.Redes' table. You can move, or remove it, as needed. this.redesTableAdapter.Fill(this.gerenciaCelulasDataSet.Redes); // TODO: This line of code loads data into the 'gerenciaCelulasDataSet.Igrejas' table. You can move, or remove it, as needed. this.igrejasTableAdapter.Fill(this.gerenciaCelulasDataSet.Igrejas); // TODO: This line of code loads data into the 'gerenciaCelulasDataSet.Membros' table. You can move, or remove it, as needed. this.membrosTableAdapter.Fill(this.gerenciaCelulasDataSet.Membros); loginInfo login = new loginInfo(); if (login.GetRole().Equals("Igreja Local")) { igrejaComboBox.SelectedValue = login.GetIgreja(); igrejaComboBox.Enabled = false; } 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; 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; }
public static loginInfo ShowDialog() { Form loginPrompt = new Form(); loginPrompt.Width = 325; loginPrompt.Height = 225; loginPrompt.Text = "Login"; loginPrompt.Location = new System.Drawing.Point(14, 133); //loginInfo st_Login = new loginInfo(); Label lblLogin = new Label() { Left = 25, Top = 20, Text = "SYSTEM CODE: " }; TextBox tbx_entry1 = new TextBox() { Left = 150, Top = 20, TextAlign = System.Windows.Forms.HorizontalAlignment.Right, Size = new System.Drawing.Size(75, 20) }; Label lblLogin2 = new Label() { Left = 25, Top = 60, Text = "USER NAME: " }; TextBox tbx_entry2 = new TextBox() { Left = 150, Top = 60, TextAlign = System.Windows.Forms.HorizontalAlignment.Right, Size = new System.Drawing.Size(75, 20) }; Label lblLogin3 = new Label() { Left = 25, Top = 100, Text = "PASSWORD: "******"Ok", Left = 180, Width = 100, Top = 150 }; btOK.Click += (sender, e) => { loginPrompt.Close(); }; loginPrompt.AcceptButton = btOK; loginPrompt.Controls.Add(lblLogin); loginPrompt.Controls.Add(tbx_entry1); loginPrompt.Controls.Add(lblLogin2); loginPrompt.Controls.Add(tbx_entry2); loginPrompt.Controls.Add(lblLogin3); loginPrompt.Controls.Add(tbx_entry3); loginPrompt.Controls.Add(btOK); loginPrompt.ShowDialog(); loginInfo st_Login = new loginInfo(tbx_entry1.Text, tbx_entry2.Text, tbx_entry3.Text); return(st_Login); }
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 enterContribNameTextBox_TextChanged(object sender, EventArgs e) { loginInfo info = new loginInfo(); if (info.GetRole() == "Igreja Local") { membrosBindingSource.Filter = "Igreja = '" + info.GetIgreja() + "' AND Nome like '%" + enterContribNameTextBox.Text + "%'"; } else { membrosBindingSource.Filter = "Igreja = '" + enterContribComboBox.SelectedValue.ToString() + "' AND Nome like '%" + enterContribNameTextBox.Text + "%'"; } }
private loginInfo getUserInfo() { UserInfo caUserInfo = PageBase.GetCurrentUserInfo; loginInfo info = new loginInfo(); User user = new User(); string strLoginName = caUserInfo.UserCode; user = bll.GetUserEntity(strLoginName); if (user != null) { info.UID = user.ID; info.LoginName = user.LoginName; info.UserName = user.Name; info.IsAdmin = false; info.IsFeedback = false; info.IsSuperAdmin = false; string[] SuperAdminList = BBsConfig.SuperAdminList.ToString().Split('|'); if (SuperAdminList.Where(c => c.ToLower().Equals(info.LoginName.ToLower())).Count() > 0) { info.IsSuperAdmin = true; } string[] strAdminList = BBsConfig.AdminList.ToString().Split('|'); if (strAdminList.Where(c => c.ToLower().Equals(info.LoginName.ToLower())).Count() > 0) { info.IsAdmin = true; } string[] strFeedbackList = BBsConfig.FeedbackList.ToString().Split('|'); if (strFeedbackList.Where(c => c.ToLower().Equals(info.LoginName.ToLower())).Count() > 0) { info.IsFeedback = true; } } else { //添加用户 User userNew = new User(); userNew.LoginName = caUserInfo.UserCode.ToString(); userNew.Name = caUserInfo.UserName.ToString(); userNew.Email = caUserInfo.Email; userNew.Phone = ""; userNew.DeptID = caUserInfo.DepartmentId; userNew.UpadateTime = DateTime.Now; userNew.Guid = caUserInfo.UserID.ToString(); userNew.TitleCount = 0; userNew.ReCount = 0; userNew.FeedbackCount = 0; bll.AddUser(userNew); } return(info); }
private void AddMember() { igrejafont11DataSetTableAdapters.MembrosTableAdapter adapter = new igrejafont11DataSetTableAdapters.MembrosTableAdapter(); loginInfo info = new loginInfo(); if (membersListCodeTextBox.Text.Equals("")) { TesourariaIFV.igrejafont11DataSet.MembrosRow newRow = igrejafont11DataSet.Membros.NewMembrosRow(); newRow.Nome = membersListNameTextBox.Text; if (membersListComboBox.Visible) { newRow.Igreja = membersListComboBox.Text; } else { newRow.Igreja = info.GetIgreja(); } try { membrosBindingSource.EndEdit(); igrejafont11DataSet.Membros.AddMembrosRow(newRow); adapter.Update(igrejafont11DataSet.Membros); membersListCodeTextBox.Enabled = false; //membersListNameTextBox.Enabled = false; membersListCodeTextBox.Text = ""; membersListNameTextBox.Text = ""; } catch { MessageBox.Show("Adição Falhou!"); } } else { try { membersListDataGridView.CurrentRow.Cells[1].Value = membersListNameTextBox.Text; membrosBindingSource.EndEdit(); adapter.Update(igrejafont11DataSet.Membros); membersListCodeTextBox.Enabled = false; //membersListNameTextBox.Enabled = false; membersListCodeTextBox.Text = ""; membersListNameTextBox.Text = ""; } catch { MessageBox.Show("Edição Falhou!"); } } }
private void reportPlanoDeContasOkButton_Click(object sender, EventArgs e) { loginInfo info = new loginInfo(); if (info.GetRole() == "Igreja Local") { if (reportPlanoDeContasMonthRadioButton.Checked == true) { DateTime dataInicial = new DateTime(reportPlanoDeContasMonthDateTimePicker.Value.Year, reportPlanoDeContasMonthDateTimePicker.Value.Month, 01); DateTime dataFinal = new DateTime(reportPlanoDeContasMonthDateTimePicker.Value.Year, reportPlanoDeContasMonthDateTimePicker.Value.Month, DateTime.DaysInMonth(reportPlanoDeContasMonthDateTimePicker.Value.Year, reportPlanoDeContasMonthDateTimePicker.Value.Month)); TesourariaIFV.Forms.Reports_Forms.ReportPlanoDeContasTotaisFinal report = new ReportPlanoDeContasTotaisFinal(dataInicial, dataFinal, info.GetIgreja()); report.Show(); } else if (reportPlanoDeContasPeriodRadioButton.Checked == true) { TesourariaIFV.Forms.Reports_Forms.ReportPlanoDeContasTotaisFinal report = new ReportPlanoDeContasTotaisFinal(reportPlanoDeContasInitialDateTimePicker.Value, reportPlanoDeContasFinalDateTimePicker.Value, info.GetIgreja()); report.Show(); } else { MessageBox.Show("Por favor, selecione Mês/Ano ou Período.", "Information", MessageBoxButtons.OK, MessageBoxIcon.Information); } } else { if (reportPlanoDeContasMonthRadioButton.Checked == true) { DateTime dataInicial = new DateTime(reportPlanoDeContasMonthDateTimePicker.Value.Year, reportPlanoDeContasMonthDateTimePicker.Value.Month, 01); DateTime dataFinal = new DateTime(reportPlanoDeContasMonthDateTimePicker.Value.Year, reportPlanoDeContasMonthDateTimePicker.Value.Month, DateTime.DaysInMonth(reportPlanoDeContasMonthDateTimePicker.Value.Year, reportPlanoDeContasMonthDateTimePicker.Value.Month)); TesourariaIFV.Forms.Reports_Forms.ReportPlanoDeContasTotaisFinal report = new ReportPlanoDeContasTotaisFinal(dataInicial, dataFinal, reportPlanoDeContasComboBox.SelectedValue.ToString()); report.Show(); } else if (reportPlanoDeContasPeriodRadioButton.Checked == true) { TesourariaIFV.Forms.Reports_Forms.ReportPlanoDeContasTotaisFinal report = new ReportPlanoDeContasTotaisFinal(reportPlanoDeContasInitialDateTimePicker.Value, reportPlanoDeContasFinalDateTimePicker.Value, reportPlanoDeContasComboBox.SelectedValue.ToString()); report.Show(); } else { MessageBox.Show("Por favor, selecione Mês/Ano ou Período.", "Information", MessageBoxButtons.OK, MessageBoxIcon.Information); } } }
private void createReportBanco() { loginInfo info = new loginInfo(); DateTime dataInicialMonth = new DateTime(reportCaixaMonthDateTimePicker.Value.Year, reportCaixaMonthDateTimePicker.Value.Month, 01); DateTime dataFinalMonth = new DateTime(reportCaixaMonthDateTimePicker.Value.Year, reportCaixaMonthDateTimePicker.Value.Month, DateTime.DaysInMonth(reportCaixaMonthDateTimePicker.Value.Year, reportCaixaMonthDateTimePicker.Value.Month)); DateTime dataInicial = new DateTime(reportCaixaInitialDateTimePicker.Value.Year, reportCaixaInitialDateTimePicker.Value.Month, reportCaixaInitialDateTimePicker.Value.Day); DateTime dataFinal = new DateTime(reportCaixaFinalDateTimePicker.Value.Year, reportCaixaFinalDateTimePicker.Value.Month, reportCaixaFinalDateTimePicker.Value.Day); if (info.GetRole() == "Igreja Local") { if (reportCaixaMonthRadioButton.Checked == true) { TesourariaIFV.Forms.ReportLivroBanco reportBanco = new ReportLivroBanco(dataInicialMonth, dataFinalMonth, info.GetIgreja(), CalculaSaldoInicialBanco(info.GetIgreja(), dataInicialMonth)); reportBanco.Show(); } else if (reportCaixaPeriodRadioButton.Checked == true) { TesourariaIFV.Forms.ReportLivroBanco reportBanco = new ReportLivroBanco(dataInicial, dataFinal, info.GetIgreja(), CalculaSaldoInicialBanco(info.GetIgreja(), dataInicial)); reportBanco.Show(); } else { MessageBox.Show("Por favor, selecione Mês/Ano ou Período.", "Information", MessageBoxButtons.OK, MessageBoxIcon.Information); } } else { if (reportCaixaMonthRadioButton.Checked == true) { TesourariaIFV.Forms.ReportLivroBanco reportBanco = new ReportLivroBanco(dataInicialMonth, dataFinalMonth, formReportCaixaComboBox.SelectedValue.ToString(), CalculaSaldoInicialBanco(formReportCaixaComboBox.SelectedValue.ToString(), dataInicialMonth)); reportBanco.Show(); } else if (reportCaixaPeriodRadioButton.Checked == true) { TesourariaIFV.Forms.ReportLivroBanco reportBanco = new ReportLivroBanco(dataInicial, dataFinal, formReportCaixaComboBox.SelectedValue.ToString(), CalculaSaldoInicialBanco(formReportCaixaComboBox.SelectedValue.ToString(), dataInicial)); reportBanco.Show(); } else { MessageBox.Show("Por favor, selecione Mês/Ano ou Período.", "Information", MessageBoxButtons.OK, MessageBoxIcon.Information); } } }
public AdminEntriesForm() { InitializeComponent(); loginInfo info = new loginInfo(); if (info.GetRole() == "Igreja Local") { adminEntriesComboBox.Visible = false; label4.Visible = false; } else { FillIgrejasDropDown(); } }
private void createReportCaixaBanco() { loginInfo info = new loginInfo(); DateTime dataInicialMonth = new DateTime(adminEntriesMonthDateTimePicker.Value.Year, adminEntriesMonthDateTimePicker.Value.Month, 01); DateTime dataFinalMonth = new DateTime(adminEntriesMonthDateTimePicker.Value.Year, adminEntriesMonthDateTimePicker.Value.Month, DateTime.DaysInMonth(adminEntriesMonthDateTimePicker.Value.Year, adminEntriesMonthDateTimePicker.Value.Month)); DateTime dataInicial = new DateTime(adminEntriesInitialDateTimePicker.Value.Year, adminEntriesInitialDateTimePicker.Value.Month, adminEntriesInitialDateTimePicker.Value.Day); DateTime dataFinal = new DateTime(adminEntriesFinalDateTimePicker.Value.Year, adminEntriesFinalDateTimePicker.Value.Month, adminEntriesFinalDateTimePicker.Value.Day); if (info.GetRole() == "Igreja Local") { if (adminEntriesMonthRadioButton.Checked == true) { TesourariaIFV.Forms.AdminEntriesDataGridView grid = new AdminEntriesDataGridView(dataInicialMonth, dataFinalMonth, loginInfo.igreja, "CaixaBanco"); grid.Show(); } else if (adminEntriesPeriodRadioButton.Checked == true) { TesourariaIFV.Forms.AdminEntriesDataGridView grid = new AdminEntriesDataGridView(dataInicial, dataFinal, loginInfo.igreja, "CaixaBanco"); grid.Show(); } else { MessageBox.Show("Por favor, selecione Mês/Ano ou Período.", "Information", MessageBoxButtons.OK, MessageBoxIcon.Information); } } else { if (adminEntriesMonthRadioButton.Checked == true) { TesourariaIFV.Forms.AdminEntriesDataGridView grid = new AdminEntriesDataGridView(dataInicialMonth, dataFinalMonth, adminEntriesComboBox.SelectedValue.ToString(), "CaixaBanco"); grid.Show(); } else if (adminEntriesPeriodRadioButton.Checked == true) { TesourariaIFV.Forms.AdminEntriesDataGridView grid = new AdminEntriesDataGridView(dataInicial, dataFinal, adminEntriesComboBox.SelectedValue.ToString(), "CaixaBanco"); grid.Show(); } else { MessageBox.Show("Por favor, selecione Mês/Ano ou Período.", "Information", MessageBoxButtons.OK, MessageBoxIcon.Information); } } }
/// <summary> /// //Login admin panel /// //Enter username and password to login /// </summary> protected void btnLogin_Click(object sender, EventArgs e) { try { string userName, pswd; userName = txtUserName.Text.Trim(); pswd = txtPswd.Text.Trim(); if (Checks.Empty(userName) && Checks.Empty(pswd)) { lblMsg.Text = "User name and password are required!"; } else if (Checks.Empty(userName)) { lblMsg.Text = "User name is required!"; } else if (Checks.Empty(pswd)) { lblMsg.Text = "Password is required!"; } else { BakersLoungeEntities data = new BakersLoungeEntities(); loginInfo li = new loginInfo(); // linq query li = (from log in data.loginInfoes where log.UserName == userName & log.Password == pswd select log).First(); if (li != null) { // create session for the user Session["Username"] = userName; Session["UserID"] = li.LoginInfoId; Response.Redirect("admin/Dashboard.aspx"); } else { lblMsg.Text = "*Invalid Username Or Password!!"; } } } catch (Exception ex) { lblMsg.Text = ex.Message; } }
private void ReportPlanoDeContas_Load(object sender, EventArgs e) { this.estadosTableAdapter.Fill(this.igrejafont11DataSet.Estados); this.igrejasTableAdapter.FillBy(this.igrejafont11DataSet.Igrejas); comboBox1.SelectedIndex = 0; loginInfo info = new loginInfo(); if (info.GetRole() == "Igreja Local") { reportPlanoDeContasComboBox.Visible = false; label4.Visible = false; } else { FillIgrejasDropDown(); } }
private void button1_Click(object sender, EventArgs e) { loginInfo info = new loginInfo(); MembroSearch search = new MembroSearch(igreja); search.ShowDialog(); discipCode = search.MemberCode; if (discipCode != 0) { membrosBindingSource1.Position = membrosBindingSource1.Find("Codigo", discipCode.ToString()); DataRowView row = (DataRowView)membrosBindingSource1.Current; MemberAddDiscTextBox.Text = row["Nome"].ToString(); } }
private void loginBTN_Click(object sender, EventArgs e) { loginInfo myLoginInfo = new loginInfo(); username = usernameTB.Text.Trim().ToString(); myLoginInfo.setUsername(username); myLoginInfo.setPassword(passwordTB.Text.Trim().ToString()); dataTypes objToSend = new dataTypes(); objToSend.setType(typeof(loginInfo).ToString()); objToSend.setObject(myLoginInfo); IFormatter formatter = new BinaryFormatter(); Stream stream = new MemoryStream(); formatter.Serialize(stream, objToSend); byte[] buffer = ((MemoryStream)stream).ToArray(); netServ.m_clientSocket.Send(buffer, buffer.Length, 0); stream.Close(); showChat(); msgHst.Text = "Welcome to Student Connections. You are connected as [" + username + "]."; }