Exemplo n.º 1
0
        public void GetColumSelec(string Nometela, string NomeGrid)
        {
            NometelaSelec = Nometela;
            NomeGridSelec = NomeGrid;
            RowsFiltroCollection RowRelatorio = new RowsFiltroCollection();

            RowRelatorio.Add(new RowsFiltro("Nometela", "System.String", "=", Nometela, "and"));
            RowRelatorio.Add(new RowsFiltro("NomeGrid", "System.String", "=", NomeGrid, "and"));
            RowRelatorio.Add(new RowsFiltro("IDFUNCIONARIO", "System.Int32", "=", Convert.ToInt32(USUARIOP.Read(FrmLogin._IdUsuario).IDFUNCIONARIO).ToString()));

            IMPRGRIDColl = IMPRGRIDP.ReadCollectionByParameter(RowRelatorio, "IDIMPRGRID DESC");

            if (IMPRGRIDColl.Count > 0)
            {
                ctlPrintToFitPageWidthCHK.Checked = IMPRGRIDColl[0].FLAGAJUSTA == "S" ? true: false;
                chkPaisagem.Checked = IMPRGRIDColl[0].FLAGMODOPAISAGEM == "S" ? true : false;
                chkData.Checked     = IMPRGRIDColl[0].FLAGEXIBIRDATA == "S" ? true : false;

                //Armazena os campos do Banco de dados
                string[] CampoSelec = IMPRGRIDColl[0].CAMPOSSELECIONADOS.Split(',');

                ctlColumnsToPrintCHKLBX.Items.Clear();
                foreach (string column in AvailableColumnsOptions)
                {
                    if (VerificaSelec(column.ToString(), CampoSelec))
                    {
                        ctlColumnsToPrintCHKLBX.Items.Add(column, true);
                    }
                    else
                    {
                        ctlColumnsToPrintCHKLBX.Items.Add(column, false);
                    }
                }
            }
        }
Exemplo n.º 2
0
        private void DataGriewDados_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
        {
            if (LIS_USUARIOColl.Count > 0)
            {
                int rowindex = e.RowIndex;
                if (rowindex != -1)
                {
                    int CodigoSelect = Convert.ToInt32(LIS_USUARIOColl[rowindex].IDUSUARIO);

                    Entity = USUARIOP.Read(CodigoSelect);

                    tabControlUsuario.SelectTab(0);
                    txtNome.Focus();
                }
            }
        }
Exemplo n.º 3
0
        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);
            }
        }
Exemplo n.º 4
0
        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);
            }
        }
Exemplo n.º 5
0
        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);
            }
        }
Exemplo n.º 6
0
        public void GetColumSelec(string Nometela, string NomeGrid)
        {
            try
            {
                NometelaSelec = Nometela;
                NomeGridSelec = NomeGrid;
                RowsFiltroCollection RowRelatorio = new RowsFiltroCollection();
                RowRelatorio.Add(new RowsFiltro("Nometela", "System.String", "=", Nometela, "and"));
                RowRelatorio.Add(new RowsFiltro("NomeGrid", "System.String", "=", NomeGrid, "and"));
                RowRelatorio.Add(new RowsFiltro("IDFUNCIONARIO", "System.Int32", "=", Convert.ToInt32(USUARIOP.Read(FrmLogin._IdUsuario).IDFUNCIONARIO).ToString()));

                IMPRGRIDColl = IMPRGRIDP.ReadCollectionByParameter(RowRelatorio, "IDIMPRGRID DESC");

                if (IMPRGRIDColl.Count > 0)
                {
                    if (IMPRGRIDColl[0].FLAGEXIBIRDATA == "S")
                    {
                        chkExibirData.Checked = true;
                    }
                    else
                    {
                        chkExibirData.Checked = false;
                    }
                }

                string[] CampoSelec = IMPRGRIDColl[0].CAMPOSSELECIONADOS.Split(',');
                foreach (string s in CampoSelec)
                {
                    for (int i = 0; i < ctlColumnsToPrintCHKLBX.Items.Count; i++)
                    {
                        if (ctlColumnsToPrintCHKLBX.Items[i].ToString() == s)
                        {
                            ctlColumnsToPrintCHKLBX.SetItemCheckState(i, CheckState.Checked);
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show("Erro técnico: " + ex.Message);
            }
        }
Exemplo n.º 7
0
        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;
        }
Exemplo n.º 8
0
        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;
        }