Ejemplo n.º 1
0
        private void PesquisaRapida()
        {
            CreaterCursor Cr = new CreaterCursor();

            this.Cursor = Cr.CreateCursor(Cr.btmap, 0, 0);

            try
            {
                RowRelatorio.Clear();
                RowRelatorio.Add(new RowsFiltro("NOMECLIENTE", "System.String", "collate pt_br like", "%" + txtPesquisaRapida.Text.Replace("'", "") + "%", "or"));
                RowRelatorio.Add(new RowsFiltro("CONVERSA", "System.String", "collate pt_br like", "%" + txtPesquisaRapida.Text.Replace("'", "") + "%", "or"));
                RowRelatorio.Add(new RowsFiltro("NOMECONTATO", "System.String", "collate pt_br like", "%" + txtPesquisaRapida.Text.Replace("'", "") + "%", "or"));

                //if (ValidacoesLibrary.ValidaTipoInt32(txtPesquisaRapida.Text))
                //{
                //    RowRelatorio.Add(new RowsFiltro("IDORDEMSERVICO", "System.Int32", "like", txtPesquisaRapida.Text.Replace("'", ""), "or"));
                //}

                if (txtPesquisaRapida.Text.Trim() != string.Empty)
                {
                    LIS_OCORRENCIATLMKColl = LIS_OCORRENCIATLMKP.ReadCollectionByParameter(RowRelatorio, "IDOCORRENCIATLMK DESC");

                    DataGriewDados.AutoGenerateColumns = false;
                    DataGriewDados.DataSource          = LIS_OCORRENCIATLMKColl;

                    label13.Text = LIS_OCORRENCIATLMKColl.Count.ToString();
                }

                this.Cursor = Cursors.Default;
            }
            catch (Exception ex)
            {
                this.Cursor = Cursors.Default;

                MessageBox.Show("Erro técnico: " + ex.Message,
                                ConfigSistema1.Default.NomeEmpresa,
                                MessageBoxButtons.OK,
                                MessageBoxIcon.Error,
                                MessageBoxDefaultButton.Button1);
            }
        }
Ejemplo n.º 2
0
        private void PreencheGrid()
        {
            CreaterCursor Cr = new CreaterCursor();

            this.Cursor = Cr.CreateCursor(Cr.btmap, 0, 0);

            try
            {
                TotalGeralPedido = 0;

                DataGriewDados.Rows.Clear();

                foreach (var LIS_PRODUTOOSFECH2Ty in LIS_PRODUTOOSFECHColl)
                {
                    string DataEmissao  = Convert.ToDateTime(LIS_PRODUTOOSFECH2Ty.DATAEMISSAO).ToString("dd/MM/yyyy");
                    string TotalProduto = Convert.ToDecimal(LIS_PRODUTOOSFECH2Ty.VALORTOTAL).ToString("n2");

                    DataGridViewRow row2         = new DataGridViewRow();
                    string          Quantidade   = Convert.ToDecimal(LIS_PRODUTOOSFECH2Ty.QUANTIDADE).ToString("n2");
                    string          ORDEMServico = LIS_PRODUTOOSFECH2Ty.IDORDEMSERVICO.ToString().PadLeft(6, '0');
                    row2.CreateCells(DataGriewDados, LIS_PRODUTOOSFECH2Ty.IDPRODUTO.ToString(), LIS_PRODUTOOSFECH2Ty.NOMEPRODUTO, ORDEMServico, DataEmissao, Quantidade, TotalProduto);
                    row2.DefaultCellStyle.Font = new Font("Arial", 8);
                    DataGriewDados.Rows.Add(row2);

                    TotalGeralPedido += Convert.ToDecimal(TotalProduto);
                }

                DataGridViewRow row2_3 = new DataGridViewRow();

                row2_3.CreateCells(DataGriewDados, string.Empty, string.Empty, string.Empty, string.Empty, "Total: ", TotalGeralPedido.ToString("n2"));
                row2_3.DefaultCellStyle.Font = new Font("Arial", 8);
                DataGriewDados.Rows.Add(row2_3);

                this.Cursor = Cursors.Default;
            }
            catch (Exception EX)
            {
                this.Cursor = Cursors.Default;
                MessageBox.Show("Erro técnico: " + EX.Message);
            }
        }
Ejemplo n.º 3
0
        private void FrmTipoRegiao_Load(object sender, EventArgs e)
        {
            CreaterCursor Cr = new CreaterCursor();

            this.Cursor = Cr.CreateCursor(Cr.btmap, 0, 0);

            this.MinimizeBox     = false;
            this.FormBorderStyle = FormBorderStyle.FixedDialog;

            GetToolStripButtonCadastro();
            GetAllGrupoCategoria();

            if (_IDGRUPOCATEGORIA != -1)
            {
                Entity = GRUPOCATEGORIAP.Read(_IDGRUPOCATEGORIA);
            }

            CONFISISTEMATy = CONFISISTEMAP.Read(1);

            this.Cursor = Cursors.Default;
        }
Ejemplo n.º 4
0
        private void btnPesquisa_Click(object sender, EventArgs e)
        {
            CreaterCursor Cr = new CreaterCursor();

            this.Cursor = Cr.CreateCursor(Cr.btmap, 0, 0);

            if (cbTipoPesquisa.Text == "Todos")
            {
                LIS_EQUIPAMENTOColl = LIS_EQUIPAMENTOP.ReadCollectionByParameter(null, "NOME");
                DataGriewDados.AutoGenerateColumns = false;
                DataGriewDados.DataSource          = LIS_EQUIPAMENTOColl;

                lblTotalPesquisa.Text = LIS_EQUIPAMENTOColl.Count.ToString();
            }
            else
            {
                PesquisaFiltro();
            }

            this.Cursor = Cursors.Default;
        }
Ejemplo n.º 5
0
        private void FrmFornecedor_Load(object sender, EventArgs e)
        {
            CreaterCursor Cr = new CreaterCursor();

            this.Cursor = Cr.CreateCursor(Cr.btmap, 0, 0);

            this.MinimizeBox     = false;
            this.FormBorderStyle = FormBorderStyle.FixedDialog;

            GetToolStripButtonCadastro();

            PreencheDropTipoPesquisa();
            PreencheDropCamposPesquisa();

            lblObsField.ForeColor = ConfigSistema1.Default.ColorFieldObs;


            this.Cursor = Cursors.Default;

            VerificaAcesso();
        }
Ejemplo n.º 6
0
        private void FrmTipoRegiao_Load(object sender, EventArgs e)
        {
            CreaterCursor Cr = new CreaterCursor();

            this.Cursor = Cr.CreateCursor(Cr.btmap, 0, 0);

            this.MinimizeBox     = false;
            this.FormBorderStyle = FormBorderStyle.FixedDialog;

            GetToolStripButtonCadastro();

            PreencheDropCamposPesquisa();
            PreencheDropTipoPesquisa();

            if (_IDNCM != -1)
            {
                Entity = NCMP.Read(_IDNCM);
            }

            this.Cursor = Cursors.Default;
        }
Ejemplo n.º 7
0
        private void PesquisaeEntrada()
        {
            CreaterCursor Cr = new CreaterCursor();

            this.Cursor = Cr.CreateCursor(Cr.btmap, 0, 0);

            try
            {
                //Filtra Produtos Nota Fiscal
                RowRelatorio.Clear();
                RowRelatorio.Add(new RowsFiltro("DATAMOVIM", "System.DateTime", ">=", Util.ConverStringDateSearch(msktDataInicial.Text)));
                RowRelatorio.Add(new RowsFiltro("DATAMOVIM", "System.DateTime", "<=", Util.ConverStringDateSearch(msktDataFinal.Text)));
                RowRelatorio.Add(new RowsFiltro("FLAGSINTEGRA", "System.String", "=", "S"));

                LIS_MOVPRODUTOESColl = LIS_MOVPRODUTOESP.ReadCollectionByParameter(RowRelatorio, "NDOCUMENTO, DATAMOVIM DESC");

                LIS_MOVPRODUTOESCollection LIS_MOVPRODUTOESColl2 = new LIS_MOVPRODUTOESCollection();
                //  Remove CFOP repetido e Aliq. ICMS
                foreach (LIS_MOVPRODUTOESEntity item in LIS_MOVPRODUTOESColl)
                {
                    if (LIS_MOVPRODUTOESColl2.Find(delegate(LIS_MOVPRODUTOESEntity item2)
                                                   { return(item2.CODCFOP == item.CODCFOP && item2.ALQICMS == item.ALQICMS && item2.NDOCUMENTO == item.NDOCUMENTO); }) == null)
                    {
                        LIS_MOVPRODUTOESColl2.Add(item);
                    }
                }

                LIS_MOVPRODUTOESColl.Clear();
                LIS_MOVPRODUTOESColl = LIS_MOVPRODUTOESColl2;

                PreencheGrid3();

                this.Cursor = Cursors.Default;
            }
            catch (Exception ex)
            {
                this.Cursor = Cursors.Default;
                MessageBox.Show("Erro técnico: " + ex.Message);
            }
        }
Ejemplo n.º 8
0
        private void PesquisaRapida()
        {
            CreaterCursor Cr = new CreaterCursor();

            this.Cursor = Cr.CreateCursor(Cr.btmap, 0, 0);

            try
            {
                RowRelatorio.Clear();
                RowRelatorio.Add(new RowsFiltro("NOME", "System.String", "collate pt_br like", "%" + txtPesquisaRapida.Text.Replace("'", "") + "%", "or"));
                RowRelatorio.Add(new RowsFiltro("NOMEFANTASIA", "System.String", "collate pt_br like", "%" + txtPesquisaRapida.Text.Replace("'", "") + "%", "or"));

                if (ValidacoesLibrary.ValidaTipoInt32(txtPesquisaRapida.Text))
                {
                    RowRelatorio.Add(new RowsFiltro("IDFORNECEDOR", "System.Int32", "like", txtPesquisaRapida.Text.Replace("'", ""), "or"));
                }

                if (txtPesquisaRapida.Text.Trim() != string.Empty)
                {
                    FornecedorColl = FORNECEDORP.ReadCollectionByParameter(RowRelatorio, "NOME");

                    DataGriewDados.AutoGenerateColumns = false;
                    DataGriewDados.DataSource          = FornecedorColl;

                    lblTotalPesquisa.Text = FornecedorColl.Count.ToString();
                }

                this.Cursor = Cursors.Default;
            }
            catch (Exception ex)
            {
                this.Cursor = Cursors.Default;

                MessageBox.Show("Erro técnico: " + ex.Message,
                                ConfigSistema1.Default.NomeEmpresa,
                                MessageBoxButtons.OK,
                                MessageBoxIcon.Error,
                                MessageBoxDefaultButton.Button1);
            }
        }
Ejemplo n.º 9
0
        private void FrmEmpresa_Load(object sender, EventArgs e)
        {
            try
            {
                CreaterCursor Cr = new CreaterCursor();
                this.Cursor = Cr.CreateCursor(Cr.btmap, 0, 0);

                this.MinimizeBox     = false;
                this.FormBorderStyle = FormBorderStyle.FixedDialog;

                btnSair.Image = Util.GetAddressImage(21);

                EMPRESAProvider EMPRESAP  = new EMPRESAProvider();
                EMPRESAEntity   EMPRESATy = EMPRESAP.Read(1);

                txtRazaoSocial.Text   = EMPRESATy.NOMECLIENTE;
                txtNomeFantasita.Text = EMPRESATy.NOMEFANTASIA;
                txtEndereco.Text      = EMPRESATy.ENDERECO;
                txtBairro.Text        = EMPRESATy.BAIRRO;
                txtCep.Text           = EMPRESATy.CEP;
                txtCidade.Text        = EMPRESATy.CIDADE;
                txtUF.Text            = EMPRESATy.UF;
                txtTelefone.Text      = EMPRESATy.TELEFONE;
                txtEmail.Text         = EMPRESATy.EMAIL;
                txtCNPJCPF.Text       = EMPRESATy.CNPJCPF;
                txtIERG.Text          = EMPRESATy.IE;
                //txtPlano.Text = EMPRESATy.REGISTRO;
                txtComplemento.Text = EMPRESATy.COMPLEMENTO;
                txtNUmero.Text      = EMPRESATy.NUMERO;

                txtNumLicenca.Text = GetVolumeSerial("c");

                this.Cursor = Cursors.Default;
            }
            catch (Exception ex)
            {
                this.Cursor = Cursors.Default;
                MessageBox.Show("Erro técnico: " + ex.Message);
            }
        }
Ejemplo n.º 10
0
        private void Pesquisa()
        {
            CreaterCursor Cr = new CreaterCursor();

            this.Cursor = Cr.CreateCursor(Cr.btmap, 0, 0);

            try
            {
                RowRelatorio.Clear();
                if (Convert.ToInt32(cbCliente.SelectedValue) > 0)
                {
                    RowRelatorio.Add(new RowsFiltro("IDCLIENTE", "System.Int32", "=", cbCliente.SelectedValue.ToString()));
                }

                if (Convert.ToInt32(cbVendedor.SelectedValue) > 0)
                {
                    RowRelatorio.Add(new RowsFiltro("IDFUNCIONARIO", "System.Int32", "=", cbVendedor.SelectedValue.ToString()));
                }

                if (Convert.ToInt32(cbStatus.SelectedValue) > 0)
                {
                    RowRelatorio.Add(new RowsFiltro("IDSTATUSTLMK", "System.Int32", "=", cbStatus.SelectedValue.ToString()));
                }

                LIS_AGENDAVENDEDORTLMKColl = LIS_AGENDAVENDEDORTLMKP.ReadCollectionByParameter(RowRelatorio, "NOMECLIENTE");

                DataGriewDados.AutoGenerateColumns = false;
                DataGriewDados.DataSource          = LIS_AGENDAVENDEDORTLMKColl;

                label13.Text = LIS_AGENDAVENDEDORTLMKColl.Count.ToString();

                PaintGrid();
                this.Cursor = Cursors.Default;
            }
            catch (Exception ex)
            {
                this.Cursor = Cursors.Default;
                MessageBox.Show("Erro técnico: " + ex.Message);
            }
        }
Ejemplo n.º 11
0
        private void FrmTipoRegiao_Load(object sender, EventArgs e)
        {
            CreaterCursor Cr = new CreaterCursor();

            this.Cursor = Cr.CreateCursor(Cr.btmap, 0, 0);

            this.MinimizeBox     = false;
            this.FormBorderStyle = FormBorderStyle.FixedDialog;

            GetToolStripButtonCadastro();
            GetAllLocalCobranca();
            VerificaAcesso();

            if (_WEBSERVICEID != -1)
            {
                Entity = WEBSERVICEP.Read(_WEBSERVICEID);
            }

            GetDropUF2();

            this.Cursor = Cursors.Default;
        }
Ejemplo n.º 12
0
        private void PreencheGrid()
        {
            CreaterCursor Cr = new CreaterCursor();

            this.Cursor = Cr.CreateCursor(Cr.btmap, 0, 0);

            try
            {
                QuantTotal    = 0;
                QuantSubTotal = 0;

                DataGriewDados.Rows.Clear();

                foreach (var LIS_OCORRENCIATLMKTy in LIS_OCORRENCIATLMKColl)
                {
                    QuantSubTotal = QuantOcorrencias(Convert.ToInt32(LIS_OCORRENCIATLMKTy.IDFUNCIONARIO));
                    QuantTotal   += QuantSubTotal;

                    DataGridViewRow row2 = new DataGridViewRow();
                    row2.CreateCells(DataGriewDados, "", LIS_OCORRENCIATLMKTy.NOMEFUNCIONARIO, QuantSubTotal);
                    row2.DefaultCellStyle.Font = new Font("Arial", 8);
                    DataGriewDados.Rows.Add(row2);
                }

                DataGriewDados.Sort(DataGriewDados.Columns["quantidade"], ListSortDirection.Descending);

                DataGridViewRow rowLinha = new DataGridViewRow();
                rowLinha.CreateCells(DataGriewDados, "_________", "__________________________________________________________________ TOTAL GERAL: ", QuantTotal.ToString());
                rowLinha.DefaultCellStyle.Font = new Font("Arial", 8, FontStyle.Bold);
                DataGriewDados.Rows.Add(rowLinha);

                this.Cursor = Cursors.Default;
            }
            catch (Exception EX)
            {
                this.Cursor = Cursors.Default;
                MessageBox.Show("Erro técnico: " + EX.Message);
            }
        }
Ejemplo n.º 13
0
        private void FrmStatus_Load(object sender, EventArgs e)
        {
            CreaterCursor Cr = new CreaterCursor();

            this.Cursor = Cr.CreateCursor(Cr.btmap, 0, 0);

            this.MinimizeBox     = false;
            this.FormBorderStyle = FormBorderStyle.FixedDialog;

            GetAllStatus();
            GetToolStripButtonCadastro();
            GetGrupoStatus();

            if (_IDSTATUS != -1)
            {
                Entity = STATUSP.Read(_IDSTATUS);
            }

            cbGrupoStatus.SelectedValue = IDGRUPOSTATUS;

            this.Cursor = Cursors.Default;
        }
Ejemplo n.º 14
0
        private void PesquisaPedido()
        {
            CreaterCursor Cr = new CreaterCursor();

            this.Cursor = Cr.CreateCursor(Cr.btmap, 0, 0);

            try
            {
                LIS_PEDIDOProvider LIS_PEDIDOP = new LIS_PEDIDOProvider();

                RowsFiltroCollection RowRelatorio = new RowsFiltroCollection();
                // if (txtNomePesquisa.Text.Trim().Length > 0 && !ValidacoesLibrary.ValidaTipoInt32(txtNomePesquisa.Text.Trim()))
                if (ValidacoesLibrary.ValidaTipoInt32(txtNomePesquisa.Text.Trim()))
                {
                    RowRelatorio.Add(new RowsFiltro("IDPEDIDO", "System.Int32", "=", txtNomePesquisa.Text));
                    LIS_PEDIDOColl = LIS_PEDIDOP.ReadCollectionByParameter(RowRelatorio, "IDPEDIDO desc");
                }
                else
                {
                    LIS_PEDIDOColl = LIS_PEDIDOP.ReadCollectionByParameter(null, "IDPEDIDO desc");
                }

                DataGriewSearch.AutoGenerateColumns = false;
                DataGriewSearch.DataSource          = LIS_PEDIDOColl;
                txtNomePesquisa.Focus();

                this.Cursor = Cursors.Default;
            }
            catch (Exception)
            {
                this.Cursor = Cursors.Default;

                MessageBox.Show(ConfigMessage.Default.searchFieldType,
                                ConfigSistema1.Default.NomeEmpresa,
                                MessageBoxButtons.OK,
                                MessageBoxIcon.Error,
                                MessageBoxDefaultButton.Button1);
            }
        }
Ejemplo n.º 15
0
        private void PesquisaRapida()
        {
            CreaterCursor Cr = new CreaterCursor();

            this.Cursor = Cr.CreateCursor(Cr.btmap, 0, 0);

            try
            {
                RowRelatorio.Clear();
                RowRelatorio.Add(new RowsFiltro("NOMECLIENTE", "System.String", "collate pt_br like", "%" + txtPesquisaRapida.Text.Replace("'", "") + "%", "or"));
                RowRelatorio.Add(new RowsFiltro("NOMEFUNCIONARIO", "System.String", "collate pt_br like", "%" + txtPesquisaRapida.Text.Replace("'", "") + "%", "or"));
                RowRelatorio.Add(new RowsFiltro("NOMESTATUSTLMK", "System.String", "collate pt_br like", "%" + txtPesquisaRapida.Text.Replace("'", "") + "%", "or"));


                if (ValidacoesLibrary.ValidaTipoInt32(txtPesquisaRapida.Text))
                {
                    RowRelatorio.Add(new RowsFiltro("IDCLIENTE", "System.Int32", "like", txtPesquisaRapida.Text.Replace("'", ""), "or"));
                }

                LIS_AGENDAVENDEDORTLMKColl         = LIS_AGENDAVENDEDORTLMKP.ReadCollectionByParameter(RowRelatorio, "NOMECLIENTE");
                DataGriewDados.AutoGenerateColumns = false;
                DataGriewDados.DataSource          = LIS_AGENDAVENDEDORTLMKColl;
                label13.Text = LIS_AGENDAVENDEDORTLMKColl.Count.ToString();


                PaintGrid();

                this.Cursor = Cursors.Default;
            }
            catch (Exception ex)
            {
                this.Cursor = Cursors.Default;
                MessageBox.Show("Erro técnico: " + ex.Message,
                                ConfigSistema1.Default.NomeEmpresa,
                                MessageBoxButtons.OK,
                                MessageBoxIcon.Error,
                                MessageBoxDefaultButton.Button1);
            }
        }
Ejemplo n.º 16
0
        private void FrmTipoRegiao_Load(object sender, EventArgs e)
        {
            CreaterCursor Cr = new CreaterCursor();

            this.Cursor = Cr.CreateCursor(Cr.btmap, 0, 0);

            this.MinimizeBox     = false;
            this.FormBorderStyle = FormBorderStyle.FixedDialog;

            cbVendedor.Image = Util.GetAddressImage(6);

            txtCodPedido.Text = _IDPEDIDO.ToString();
            mkdtPedido.Text   = DatePedido;
            ListaProdutoEntrega(_IDPEDIDO);

            GetDropProdutos();
            GetFuncionario();

            msktDataEntrega.Text = DateTime.Now.ToString("dd/MM/yyyy");

            this.Cursor = Cursors.Default;
        }
Ejemplo n.º 17
0
        private void PesquisasLotes()
        {
            CreaterCursor Cr = new CreaterCursor();

            this.Cursor = Cr.CreateCursor(Cr.btmap, 0, 0);

            try
            {
                //Pesquisa Todos os Estoques de Lote
                RowRelatorio.Clear();
                RowRelatorio.Add(new RowsFiltro("FLAGTIPO", "System.String", "=", "E"));
                RowRelatorio.Add(new RowsFiltro("FLAGATIVO", "System.String", "=", "S"));

                LIS_ESTOQUELOTEColl = LIS_ESTOQUELOTEP.ReadCollectionByParameter(RowRelatorio, "DATAVALIDADE");

                //Limpa Grid
                DataGriewDados.Rows.Clear();
                foreach (var item in LIS_ESTOQUELOTEColl)
                {
                    Decimal SaldoEstoqueLote = SaldoProduto(item.CODLOTE, Convert.ToInt32(item.IDPRODUTO));

                    if (SaldoEstoqueLote > 0)
                    {
                        PreencherGrid(item.CODLOTE, item.IDPRODUTO, SaldoEstoqueLote);
                    }
                }

                this.Cursor = Cursors.Default;
            }
            catch (Exception ex)
            {
                this.Cursor = Cursors.Default;
                MessageBox.Show("Erro técnico: " + ex.Message,
                                ConfigSistema1.Default.NomeEmpresa,
                                MessageBoxButtons.OK,
                                MessageBoxIcon.Error,
                                MessageBoxDefaultButton.Button1);
            }
        }
Ejemplo n.º 18
0
        private void GetAllStatus()
        {
            CreaterCursor Cr = new CreaterCursor();

            this.Cursor = Cr.CreateCursor(Cr.btmap, 0, 0);

            try
            {
                GRUPOAGENDATLMKColl = GRUPOAGENDATLMKP.ReadCollectionByParameter(null);
                DataGriewDados.AutoGenerateColumns = false;
                DataGriewDados.DataSource          = GRUPOAGENDATLMKColl;

                lblTotalPesquisa.Text = GRUPOAGENDATLMKColl.Count.ToString();

                this.Cursor = Cursors.Default;
            }
            catch (Exception ex)
            {
                this.Cursor = Cursors.Default;
                MessageBox.Show("Erro técnico: " + ex.Message);
            }
        }
Ejemplo n.º 19
0
        private void ExibirItens(int IdPedido)
        {
            CreaterCursor Cr = new CreaterCursor();

            this.Cursor = Cr.CreateCursor(Cr.btmap, 0, 0);

            try
            {
                foreach (var item in PEDIDOVENDAIMEXAPPColl)
                {
                    if (item.IDPEDIDODISPLAY == IdPedido)
                    {
                        IList <PEDIDOVENDAITEMIMEXAPPEntity> PEDIDOVENDAITEMIMEXAPPColl;
                        PEDIDOVENDAITEMIMEXAPPColl = item.ITENS;
                        string ProdutosItens = "";
                        foreach (var item2 in PEDIDOVENDAITEMIMEXAPPColl)
                        {
                            string NomeProduto = BuscaNomeProduto(Convert.ToInt32(item2.IDPRODUTO));
                            NomeProduto    = Util.LimiterText(NomeProduto, 20).PadRight(20, '.');
                            ProdutosItens += NomeProduto + "Qtd: " + item2.VQTDITEM.ToString().PadRight(5, ' ') + " X " + Convert.ToDecimal(item2.VUNITARIOVENDA).ToString("n2") + " = " + Convert.ToDecimal(item2.VSUBTOTAL).ToString("n2") + Environment.NewLine;
                        }

                        MessageBox.Show(ProdutosItens);
                    }
                }

                this.Cursor = Cursors.Default;
            }
            catch (Exception ex)
            {
                this.Cursor = Cursors.Default;

                MessageBox.Show("Erro técnico: " + ex.Message,
                                ConfigSistema1.Default.NomeEmpresa,
                                MessageBoxButtons.OK,
                                MessageBoxIcon.Error,
                                MessageBoxDefaultButton.Button1);
            }
        }
Ejemplo n.º 20
0
        private void PreencheGridPagar()
        {
            try
            {
                decimal QuantTotal      = 0;
                decimal ValorTotal      = 0;
                decimal ValotTotalGeral = 0;

                CreaterCursor Cr = new CreaterCursor();
                this.Cursor = Cr.CreateCursor(Cr.btmap, 0, 0);

                //DataGridRelaDupl.Rows.Clear();

                foreach (var LIS_DUPLICATAPAGARTy in LIS_DUPLICATAPAGARColl)
                {
                    QuantTotal = 0;
                    ValorTotal = 0;

                    ValotTotalGeral += ValorTotal;
                    DataGridViewRow row2 = new DataGridViewRow();
                    row2.CreateCells(DataGridRelaDupl, LIS_DUPLICATAPAGARTy.NUMERO, "Pagar", LIS_DUPLICATAPAGARTy.NOMEFORNECEDOR, Convert.ToDateTime(LIS_DUPLICATAPAGARTy.DATAEMISSAO).ToString("dd/MM/yyyy"), Convert.ToDateTime(LIS_DUPLICATAPAGARTy.DATAVECTO).ToString("dd/MM/yyyy"), Convert.ToDateTime(LIS_DUPLICATAPAGARTy.DATAPAGTO).ToString("dd/MM/yyyy"), Convert.ToDecimal(LIS_DUPLICATAPAGARTy.VALORDUPLICATA).ToString("n2"), Convert.ToDecimal(LIS_DUPLICATAPAGARTy.VALORPAGO).ToString("n2"), LIS_DUPLICATAPAGARTy.NOMESTATUS);
                    row2.DefaultCellStyle.Font = new Font("Arial", 8);
                    DataGridRelaDupl.Rows.Add(row2);
                }

                //DataGridViewRow rowLinha = new DataGridViewRow();
                //rowLinha.CreateCells(DataGridRelaDupl, "_________", "___________________________________________________________", "Total Geral", ValotTotalGeral.ToString("n2"));
                //rowLinha.DefaultCellStyle.Font = new Font("Arial", 8, FontStyle.Bold);
                //DataGridRelaDupl.Rows.Add(rowLinha);

                this.Cursor = Cursors.Default;
            }
            catch (Exception ex)
            {
                this.Cursor = Cursors.Default;
                MessageBox.Show("Erro técnico: " + ex.Message);
            }
        }
Ejemplo n.º 21
0
        private void ExibirEstoqueAtual()
        {
            CreaterCursor Cr = new CreaterCursor();

            this.Cursor = Cr.CreateCursor(Cr.btmap, 0, 0);

            try
            {
                for (int i = 0; i < DgBDOrigem.RowCount - 1; i++)
                {
                    DataGridViewCell celula = null;

                    for (int x = 0; x < DgBDOrigem.ColumnCount; x++)
                    {
                        celula = DgBDOrigem[x, i];
                        if (celula.Value != null)
                        {
                            string valor = celula.Value.ToString().ToUpper();

                            if (x == 0)
                            {
                                DgBDOrigem.Rows[i].Cells[2].Value = BuscarEstoqueAtual(Convert.ToInt32(valor)).ToString();
                            }
                        }
                    }

                    Application.DoEvents();
                    lblRegistrosVerificados.Text = "Registros Verificados: " + i.ToString();
                }

                this.Cursor = Cursors.Default;
            }
            catch (Exception ex)
            {
                this.Cursor = Cursors.Default;
                MessageBox.Show("Erro Técnico: " + ex.Message);
            }
        }
Ejemplo n.º 22
0
        private void PreencheGrid()
        {
            CreaterCursor Cr = new CreaterCursor();

            this.Cursor = Cr.CreateCursor(Cr.btmap, 0, 0);

            DataGriewDados.Rows.Clear();

            foreach (var LIS_PRODUTOSTy in LIS_PRODUTOSColl)
            {
                string DataEmissao = string.Empty;

                DataGridViewRow row2        = new DataGridViewRow();
                string          CODPRODUTO  = LIS_PRODUTOSTy.IDPRODUTO.ToString();
                string          NOMEPRODUTO = LIS_PRODUTOSTy.NOMEPRODUTO;
                string          ENTRADA     = RetornaQuantEntrada(Convert.ToInt32(LIS_PRODUTOSTy.IDPRODUTO)).ToString();
                string          SAIDA       = RetornaQuantSaida(Convert.ToInt32(LIS_PRODUTOSTy.IDPRODUTO)).ToString();
                string          SALDO       = (Convert.ToDecimal(ENTRADA) - Convert.ToDecimal(SAIDA)).ToString();

                if (!chkProdSemMov.Checked)
                {
                    if (SALDO != "0")
                    {
                        row2.CreateCells(DataGriewDados, CODPRODUTO, NOMEPRODUTO, ENTRADA, SAIDA, SALDO);
                        row2.DefaultCellStyle.Font = new Font("Arial", 8);
                        DataGriewDados.Rows.Add(row2);
                    }
                }
                else
                {
                    row2.CreateCells(DataGriewDados, CODPRODUTO, NOMEPRODUTO, ENTRADA, SAIDA, SALDO);
                    row2.DefaultCellStyle.Font = new Font("Arial", 8);
                    DataGriewDados.Rows.Add(row2);
                }
            }

            this.Cursor = Cursors.Default;
        }
Ejemplo n.º 23
0
        private void PreencheGrid()
        {
            CreaterCursor Cr = new CreaterCursor();

            this.Cursor = Cr.CreateCursor(Cr.btmap, 0, 0);

            try
            {
                foreach (var LIS_DUPLICATARECEBERTy in LIS_DUPLICATARECEBERColl)
                {
                    DataGridViewRow row1 = new DataGridViewRow();

                    string DataPagto = "";
                    TotalGeral = TotalGeral + Convert.ToDecimal(LIS_DUPLICATARECEBERTy.VALORDUPLICATA);

                    if (LIS_DUPLICATARECEBERTy.DATAPAGTO != null)
                    {
                        DataPagto = Convert.ToDateTime(LIS_DUPLICATARECEBERTy.DATAPAGTO).ToString("dd/MM/yyyy");
                    }

                    row1.CreateCells(DataGridRelaDupl, LIS_DUPLICATARECEBERTy.NUMERO, LIS_DUPLICATARECEBERTy.NOMECLIENTE, Convert.ToDateTime(LIS_DUPLICATARECEBERTy.DATAEMISSAO).ToString("dd/MM/yyyy"),
                                     Convert.ToDateTime(LIS_DUPLICATARECEBERTy.DATAVECTO).ToString("dd/MM/yyyy"), DataPagto, Convert.ToDecimal(LIS_DUPLICATARECEBERTy.VALORDUPLICATA).ToString("n2"),
                                     Convert.ToDecimal(LIS_DUPLICATARECEBERTy.VALORDEVEDOR).ToString("n2"), Convert.ToDecimal(LIS_DUPLICATARECEBERTy.VALORPAGO).ToString("n2"), LIS_DUPLICATARECEBERTy.NOMESTATUS);
                    row1.DefaultCellStyle.Font = new Font("Arial", 8);
                    DataGridRelaDupl.Rows.Add(row1);

                    contador++;
                }

                lblObs.Text = "Total de Registros: " + contador.ToString();
                this.Cursor = Cursors.Default;
            }
            catch (Exception ex)
            {
                this.Cursor = Cursors.Default;
                MessageBox.Show("Erro técnico: " + ex.Message);
            }
        }
Ejemplo n.º 24
0
        private void PreencheGrid()
        {
            ValotTotalGeral = 0;

            CreaterCursor Cr = new CreaterCursor();

            this.Cursor = Cr.CreateCursor(Cr.btmap, 0, 0);

            DataGriewDados.Rows.Clear();
            CUPOMELETRONICOProvider CUPOMELETRONICOP = new CUPOMELETRONICOProvider();

            foreach (var LIS_PRODUTONFCETy in LIS_PRODUTONFCEColl)
            {
                CUPOMELETRONICOEntity CUPOMELETRONICOTy = new CUPOMELETRONICOEntity();
                CUPOMELETRONICOTy = CUPOMELETRONICOP.Read(Convert.ToInt32(LIS_PRODUTONFCETy.CUPOMELETRONICOID));
                string NumCupom   = CUPOMELETRONICOTy.NUMERONFCE.ToString();
                string Data       = Convert.ToDateTime(CUPOMELETRONICOTy.DTEMISSAO).ToString("dd/MM/yyyy");
                string Produto    = LIS_PRODUTONFCETy.NOMEPRODUTO;
                string Quantidade = Convert.ToDecimal(LIS_PRODUTONFCETy.QUANTIDADE).ToString("n3");
                string VlUnit     = Convert.ToDecimal(LIS_PRODUTONFCETy.VALORUNITARIO).ToString("n3");
                string VlTotal    = Convert.ToDecimal(LIS_PRODUTONFCETy.VALORTOTAL).ToString("n2");

                ValotTotalGeral += Convert.ToDecimal(LIS_PRODUTONFCETy.VALORTOTAL);

                DataGridViewRow row2 = new DataGridViewRow();
                row2.CreateCells(DataGriewDados, NumCupom, Data, Produto, Quantidade, VlUnit, VlTotal);
                row2.DefaultCellStyle.Font = new Font("Arial", 8);
                DataGriewDados.Rows.Add(row2);
            }

            DataGridViewRow rowLinha = new DataGridViewRow();

            rowLinha.CreateCells(DataGriewDados, "", "", "", "", "Total Geral: ", ValotTotalGeral.ToString("n2"));
            rowLinha.DefaultCellStyle.Font = new Font("Arial", 8, FontStyle.Bold);
            DataGriewDados.Rows.Add(rowLinha);

            this.Cursor = Cursors.Default;
        }
Ejemplo n.º 25
0
        //Busca lista de Condições de pagamentono IMEX APP
        private void BuscaListaPrazoPagamento()
        {
            CreaterCursor Cr = new CreaterCursor();

            this.Cursor = Cr.CreateCursor(Cr.btmap, 0, 0);

            try
            {
                CONDICAOPAGAMENTOIMEXAPPColl = CONDICAOPAGAMENTOIMEXAPPP.GetID2();

                this.Cursor = Cursors.Default;
            }
            catch (Exception ex)
            {
                this.Cursor = Cursors.Default;

                MessageBox.Show("Erro técnico: " + ex.Message,
                                ConfigSistema1.Default.NomeEmpresa,
                                MessageBoxButtons.OK,
                                MessageBoxIcon.Error,
                                MessageBoxDefaultButton.Button1);
            }
        }
Ejemplo n.º 26
0
        //Busca lista de Vendedores no IMEX APP
        private void BuscaListaVendedores()
        {
            CreaterCursor Cr = new CreaterCursor();

            this.Cursor = Cr.CreateCursor(Cr.btmap, 0, 0);

            try
            {
                EMPRESAASPNETUSERSIMEXAPPColl = EMPRESAASPNETUSERSIMEXAPPP.GetID();

                this.Cursor = Cursors.Default;
            }
            catch (Exception ex)
            {
                this.Cursor = Cursors.Default;

                MessageBox.Show("Erro técnico: " + ex.Message,
                                ConfigSistema1.Default.NomeEmpresa,
                                MessageBoxButtons.OK,
                                MessageBoxIcon.Error,
                                MessageBoxDefaultButton.Button1);
            }
        }
Ejemplo n.º 27
0
        //Busca lista de Produtos no IMEX APP
        private void BuscaListaProdutos()
        {
            CreaterCursor Cr = new CreaterCursor();

            this.Cursor = Cr.CreateCursor(Cr.btmap, 0, 0);

            try
            {
                PRODUTODATAMODELIMEXAPPColl = PRODUTODATAMODELIMEXAPP.GetID();

                this.Cursor = Cursors.Default;
            }
            catch (Exception ex)
            {
                this.Cursor = Cursors.Default;

                MessageBox.Show("Erro técnico: " + ex.Message,
                                ConfigSistema1.Default.NomeEmpresa,
                                MessageBoxButtons.OK,
                                MessageBoxIcon.Error,
                                MessageBoxDefaultButton.Button1);
            }
        }
Ejemplo n.º 28
0
        private void btnPesquisa_Click(object sender, EventArgs e)
        {
            CreaterCursor Cr = new CreaterCursor();

            this.Cursor = Cr.CreateCursor(Cr.btmap, 0, 0);

            if (cbTipoPesquisa.Text == "Todos")
            {
                Filtro.Clear();

                NCMColl = NCMP.ReadCollectionByParameter(Filtro, "DESCRICAO");
                DataGriewDados.AutoGenerateColumns = false;
                DataGriewDados.DataSource          = NCMColl;

                lblTotalPesquisa.Text = NCMColl.Count.ToString();
            }
            else
            {
                PesquisaFiltro();
            }

            this.Cursor = Cursors.Default;
        }
Ejemplo n.º 29
0
        private string BuscaNomeProduto(int IDPRODUTO)
        {
            CreaterCursor Cr = new CreaterCursor();

            this.Cursor = Cr.CreateCursor(Cr.btmap, 0, 0);

            string result = "";

            try
            {
                foreach (var item in PRODUTODATAMODELIMEXAPPColl)
                {
                    if (item.IDPRODUTO == IDPRODUTO)
                    {
                        result = "Cód. " + item.XMEUID + " - " + item.XNOME;
                        break;
                    }
                }


                this.Cursor = Cursors.Default;

                return(result);
            }
            catch (Exception ex)
            {
                this.Cursor = Cursors.Default;

                MessageBox.Show("Erro técnico: " + ex.Message,
                                ConfigSistema1.Default.NomeEmpresa,
                                MessageBoxButtons.OK,
                                MessageBoxIcon.Error,
                                MessageBoxDefaultButton.Button1);

                return(result);
            }
        }
Ejemplo n.º 30
0
        private void FrmExtratoDuplReceber_Load(object sender, EventArgs e)
        {
            CreaterCursor Cr = new CreaterCursor();

            this.Cursor = Cr.CreateCursor(Cr.btmap, 0, 0);

            this.MinimizeBox     = false;
            this.FormBorderStyle = FormBorderStyle.FixedDialog;

            GetDropFornecedor();
            cbFornecedor.Focus();

            btnpdf.Image   = Util.GetAddressImage(17);
            btnExcel.Image = Util.GetAddressImage(18);
            btnPrint.Image = Util.GetAddressImage(19);

            btnPesquisa.Image      = Util.GetAddressImage(20);
            btnImprimir.Image      = Util.GetAddressImage(19);
            btnSair.Image          = Util.GetAddressImage(21);
            btnLimpaPesquisa.Image = Util.GetAddressImage(16);

            //Exibir dados do cliente consultado em outra tela
            if (CodFornecedor != -1)
            {
                rbTodas.Checked            = true;
                cbFornecedor.SelectedValue = CodFornecedor;
                btnPesquisa_Click(null, null);
            }


            if (!Util.Acessa_Tela(this.Name, FrmLogin._IdNivel))
            {
                this.Close();
            }

            this.Cursor = Cursors.Default;
        }