Beispiel #1
0
 private void FApontarEntrega_Load(object sender, EventArgs e)
 {
     this.Icon = Utils.ResourcesUtils.TecnoAliance_ICO;
     if (cPrevenda != null)
     {
         bsPreVenda.Add(cPrevenda);
     }
     lcfg = CamadaNegocio.Restaurante.Cadastro.TCN_CFG.Buscar(string.Empty, null);
     if (lcfg.Count.Equals(0))
     {
         MessageBox.Show("Não existe CFG. Restaurante cadastrada.", "Erro", MessageBoxButtons.OK, MessageBoxIcon.Error); return;
     }
 }
Beispiel #2
0
        private void afterbusca()
        {
            TpBusca[] filtro = new TpBusca[0];
            Estruturas.CriarParametro(ref filtro, "isnull(a.st_registro, 'A')", "'C'", st_cancelado.Checked ? "=" : "<>");
            if (!string.IsNullOrEmpty(CD_Produto.Text.Trim()))
            {
                Array.Resize(ref filtro, filtro.Length + 1);
                filtro[filtro.Length - 1].vNM_Campo = "a.CD_Produto";
                filtro[filtro.Length - 1].vOperador = "=";
                filtro[filtro.Length - 1].vVL_Busca = CD_Produto.Text.Trim();
            }
            if (!string.IsNullOrEmpty(DS_Produto.Text.Trim()))
            {
                Array.Resize(ref filtro, filtro.Length + 1);
                filtro[filtro.Length - 1].vNM_Campo = "a.DS_Produto";
                filtro[filtro.Length - 1].vOperador = "like";
                filtro[filtro.Length - 1].vVL_Busca = "'%" + DS_Produto.Text.Trim() + "%'";
            }
            if (!string.IsNullOrEmpty(CD_Grupo.Text.Trim()))
            {
                Array.Resize(ref filtro, filtro.Length + 1);
                filtro[filtro.Length - 1].vNM_Campo = "a.CD_Grupo";
                filtro[filtro.Length - 1].vOperador = "=";
                filtro[filtro.Length - 1].vVL_Busca = "'" + CD_Grupo.Text.Trim() + "'";
            }
            if (!string.IsNullOrEmpty(TP_Produto.Text.Trim()))
            {
                Array.Resize(ref filtro, filtro.Length + 1);
                filtro[filtro.Length - 1].vNM_Campo = "a.TP_Produto";
                filtro[filtro.Length - 1].vOperador = "=";
                filtro[filtro.Length - 1].vVL_Busca = "'" + TP_Produto.Text.Trim() + "'";
            }
            CamadaDados.Restaurante.Cadastro.TList_CFG lcfg = CamadaNegocio.Restaurante.Cadastro.TCN_CFG.Buscar(string.Empty, null);
            Hashtable hs = new Hashtable(2);

            hs.Add("@CD_TABELAPRECO", lcfg[0].cd_tabelapreco);
            hs.Add("@CD_EMPRESA", lcfg[0].cd_empresa);
            bsProduto.DataSource = new CamadaDados.Estoque.Cadastros.TCD_CadProduto().Select(filtro, 0,
                                                                                             string.Empty, string.Empty, string.Empty, hs);
            bsProduto.ResetCurrentItem();
        }
Beispiel #3
0
        private void abrirmapa()
        {
            CamadaDados.Restaurante.Cadastro.TList_CFG lcfg = new CamadaDados.Restaurante.Cadastro.TList_CFG();
            lcfg = CamadaNegocio.Restaurante.Cadastro.TCN_CFG.Buscar(string.Empty, null);
            CamadaDados.Financeiro.Cadastros.TList_CadEndereco end = new CamadaDados.Financeiro.Cadastros.TList_CadEndereco();
            end = CamadaNegocio.Financeiro.Cadastros.TCN_CadEndereco.Buscar(lcfg[0].Cd_Clifor, string.Empty, string.Empty, string.Empty, string.Empty, string.Empty, string.Empty, string.Empty, string.Empty, string.Empty, string.Empty, string.Empty, string.Empty, string.Empty, 1, null);

            CamadaDados.Financeiro.Cadastros.TList_CadEndereco endclif = new CamadaDados.Financeiro.Cadastros.TList_CadEndereco();
            endclif = CamadaNegocio.Financeiro.Cadastros.TCN_CadEndereco.Buscar((bsPreVenda.Current as TRegistro_PreVenda).cd_clifor, string.Empty, string.Empty, string.Empty, string.Empty, string.Empty, string.Empty, string.Empty, string.Empty, string.Empty, string.Empty, string.Empty, string.Empty, string.Empty, 1, null);

            using (Proc_Commoditties.FLocalizacaoGoogleMaps proc = new Proc_Commoditties.FLocalizacaoGoogleMaps())
            {
                proc.pOrigem = end[0].DS_Cidade + " " + end[0].Ds_endereco + " " + end[0].Numero
                               + " " + end[0].Cep;
                proc.pDestino = endclif[0].DS_Cidade + " " + endclif[0].Ds_endereco + " " + endclif[0].Numero
                                + " " + endclif[0].Cep;

                if (proc.ShowDialog() == DialogResult.OK)
                {
                }
            }
        }
Beispiel #4
0
        private void FPainelRestaurante_Load(object sender, EventArgs e)
        {
            this.Icon = Utils.ResourcesUtils.TecnoAliance_ICO;
            //Buscar PDV
            lPdv =
                CamadaNegocio.Faturamento.Cadastros.TCN_PontoVenda.Buscar(string.Empty,
                                                                          string.Empty,
                                                                          Utils.Parametros.pubTerminal,
                                                                          string.Empty,
                                                                          null);
            if (lPdv.Count > 0)
            {
                lblPdv.Text = lPdv[0].Id_pdvstr + "-" + lPdv[0].Ds_pdv;
            }
            else
            {
                MessageBox.Show("Não existe ponto venda cadastrado para o terminal " + Utils.Parametros.pubTerminal, "Mensagem", MessageBoxButtons.OK, MessageBoxIcon.Information);
                this.BeginInvoke(new MethodInvoker(Close));
                return;
            }

            //Controla visibilidade de componentes
            CamadaDados.Restaurante.Cadastro.TList_CFG lConf =
                CamadaNegocio.Restaurante.Cadastro.TCN_CFG.Buscar(lPdv[0].Cd_empresa, null);
            if (lConf.Count > 0)
            {
                lConf.ForEach(p =>
                {
                    if (p.cd_empresa == lPdv[0].Cd_empresa)
                    {
                        if (string.IsNullOrEmpty(p.Cd_horaboliche))
                        {
                            lblPistaBoliche.Visible = false;
                        }
                    }
                });
            }
            visibilidadeComponentes();
        }