private void FrmVendaProduto_Load(object sender, EventArgs e) { try { this.FormBorderStyle = FormBorderStyle.FixedDialog; bntDateSelecFinal.Image = Util.GetAddressImage(11); bntDateSelecInicial.Image = Util.GetAddressImage(11); msktDataInicial.Text = DateTime.Now.ToString("dd/MM/yyyy"); msktDataFinal.Text = DateTime.Now.ToString("dd/MM/yyyy"); btnpdf.Image = Util.GetAddressImage(17); btnExcel.Image = Util.GetAddressImage(18); btnPrint.Image = Util.GetAddressImage(19); btnPesquisa.Image = Util.GetAddressImage(20); btnSair.Image = Util.GetAddressImage(21); GetFuncionario(); GetDropProdutos(); GetDropStatus(); cbStatus.SelectedValue = 1;// Status Envaido USUARIOProvider USUARIOP = new USUARIOProvider(); int idvendedor = Convert.ToInt32(USUARIOP.Read(FrmLogin._IdUsuario).IDFUNCIONARIO); cbFuncionario.SelectedValue = idvendedor; } catch (Exception ex) { MessageBox.Show("Erro técnico: " + ex.Message); } }
private void FrmAberturaCaixa_Load(object sender, EventArgs e) { try { this.FormBorderStyle = FormBorderStyle.FixedDialog; lblData.Text = DateTime.Now.ToString("dd/MM/yyyy"); GetFuncionario(); ExibiAberturaCaixa(); VerificaAcesso(); btnSair.Image = Util.GetAddressImage(21); btnSalvar.Image = Util.GetAddressImage(15); btnpdf.Image = Util.GetAddressImage(17); btnExcel.Image = Util.GetAddressImage(18); btnPrint.Image = Util.GetAddressImage(19); USUARIOProvider USUARIOP = new USUARIOProvider(); int idvendedor = Convert.ToInt32(USUARIOP.Read(FrmLogin._IdUsuario).IDFUNCIONARIO); cbFuncionario.SelectedValue = idvendedor; } catch (Exception ex) { MessageBox.Show("Erro técnico: " + ex.Message); } }
private void FrmPesquisaNFCe_Load(object sender, EventArgs e) { try { this.FormBorderStyle = FormBorderStyle.FixedDialog; PreencheDropCamposPesquisa(); PreencheDropTipoPesquisa(); bntDateSelecFinal.Image = Util.GetAddressImage(11); bntDateSelecInicial.Image = Util.GetAddressImage(11); msktDataInicial.Text = DateTime.Now.ToString("dd/MM/yyyy"); msktDataFinal.Text = DateTime.Now.ToString("dd/MM/yyyy"); btnPesquisa_Click(null, null); GetDropStatus(); GetFuncionario(); USUARIOProvider USUARIOP = new USUARIOProvider(); int idvendedor = Convert.ToInt32(USUARIOP.Read(FrmLogin._IdUsuario).IDFUNCIONARIO); cbFuncionario.SelectedValue = idvendedor; } catch (Exception ex) { MessageBox.Show("Erro técnico: " + ex.Message); } }
private bool VerificaLogin() { Boolean result = false; try { SecurityString SecurityS = new SecurityString(); string SENHAUSUARIO = SecurityS.encrypt(txtSenha.Text); USUARIOProvider USUARIOP = new USUARIOProvider(); RowsFiltroCollection RowRelatorio = new RowsFiltroCollection(); RowRelatorio.Add(new RowsFiltro("NOMEUSUARIO", "System.String", "=", txtNome.Text, "and")); RowRelatorio.Add(new RowsFiltro("SENHAUSUARIO", "System.String", "=", SENHAUSUARIO, "and")); RowRelatorio.Add(new RowsFiltro("FLAGATIVO", "System.String", "=", "S")); USUARIOCollection USUARIOColl = new USUARIOCollection(); USUARIOColl = USUARIOP.ReadCollectionByParameter(RowRelatorio); if (USUARIOColl.Count > 0) { _IdUsuario = USUARIOColl[0].IDUSUARIO; _IdNivel = Convert.ToInt32(USUARIOColl[0].IDNIVELUSUARIO); result = true; } else { result = false; } return(result); } catch (Exception ex) { MessageBox.Show("Não foi possível acessar o Banco de Dados!", "IMEX Sistemas", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1); MessageBox.Show("Erro técnico: " + ex.Message); RestaurarConfig(); result = false; return(result); } }
private void FrmProdutosMaisVendidos_Load(object sender, EventArgs e) { this.FormBorderStyle = FormBorderStyle.FixedDialog; btnPesquisa.Image = Util.GetAddressImage(20); btnImprimir.Image = Util.GetAddressImage(19); btnSair.Image = Util.GetAddressImage(21); bntDateSelecFinal.Image = Util.GetAddressImage(11); bntDateSelecInicial.Image = Util.GetAddressImage(11); msktDataInicial.Text = DateTime.Now.ToString("dd/MM/yyyy"); msktDataFinal.Text = DateTime.Now.ToString("dd/MM/yyyy"); GetFuncionario(); //Busca o Funcionario logado USUARIOEntity USUARIOTY = new USUARIOEntity(); USUARIOProvider USUARIOP = new USUARIOProvider(); USUARIOTY = USUARIOP.Read(FrmLogin._IdUsuario); cbFuncionario.SelectedValue = USUARIOTY.IDFUNCIONARIO; }
private void FrmServicoCliente_Load(object sender, EventArgs e) { this.MinimizeBox = false; this.FormBorderStyle = FormBorderStyle.FixedDialog; bntDateSelec.Image = Util.GetAddressImage(11); bntDateSelecFinal.Image = Util.GetAddressImage(11); btnPesquisa.Image = Util.GetAddressImage(20); btnImprimir.Image = Util.GetAddressImage(19); btnSair.Image = Util.GetAddressImage(21); btnpdf.Image = Util.GetAddressImage(17); btnExcel.Image = Util.GetAddressImage(18); btnPrint.Image = Util.GetAddressImage(19); btnpdf2.Image = Util.GetAddressImage(17); btnExcel2.Image = Util.GetAddressImage(18); btnPrint2.Image = Util.GetAddressImage(19); GetDropProdutos(); GetDropGrupoCategoria(); GetDropMarca(); GetDropCliente(); GetFuncionario(); mkdDataInicial.Text = DateTime.Now.ToString("dd/MM/yyyy"); mkdDataFinal.Text = DateTime.Now.ToString("dd/MM/yyyy"); //Busca o Funcionario logado USUARIOEntity USUARIOTY = new USUARIOEntity(); USUARIOProvider USUARIOP = new USUARIOProvider(); USUARIOTY = USUARIOP.Read(FrmLogin._IdUsuario); cbFuncionario.SelectedValue = USUARIOTY.IDFUNCIONARIO; }