Exemplo n.º 1
0
        private void CFG_Pedido_Leave(object sender, EventArgs e)
        {
            string vColunas = "cfg_pedido|=|'" + CFG_Pedido.Text.Trim() + "'";

            DataRow linha = UtilPesquisa.EDIT_LEAVE(vColunas, new Componentes.EditDefault[] { CFG_Pedido, DS_TipoPedido, TP_Movimento },
                                                    new TCD_CadCFGPedido());

            if (linha != null)
            {
                St_valoresfixos    = linha["ST_ValoresFixos"].ToString().Trim().ToUpper().Equals("S");
                St_commoditties    = linha["ST_Commoditties"].ToString().Trim().ToUpper().Equals("S");
                St_vincularcf      = linha["st_vincularcf"].ToString().Trim().ToUpper().Equals("S");
                St_gerarfin        = linha["st_gerarfin"].ToString().Trim().ToUpper().Equals("S");
                st_servico.Checked = linha["st_servico"].ToString().Trim().ToUpper().Equals("S");
                Nr_Serie.Clear();
                DS_Serie.Clear();
            }
            if (!string.IsNullOrEmpty(CD_Movto.Text))
            {
                CD_CMI.Clear();
                DS_CMI.Clear();
                CD_Movto.Clear();
                DS_Movto.Clear();
            }
        }
Exemplo n.º 2
0
        private void BB_CFG_Pedido_Click(object sender, EventArgs e)
        {
            string vColunas = "DS_TipoPedido|Configuração Pedido|350;" +
                              "CFG_Pedido|Cód. Configuração Pedido|100;" +
                              "TP_Movimento| Tipo Movimento |100;" +
                              "ST_Servico|Pedido Serviço|80";

            DataRowView linha = UtilPesquisa.BTN_BUSCA(vColunas, new Componentes.EditDefault[] { CFG_Pedido, DS_TipoPedido, TP_Movimento },
                                                       new TCD_CadCFGPedido(), string.Empty);

            if (linha != null)
            {
                St_valoresfixos    = linha["ST_ValoresFixos"].ToString().Trim().ToUpper().Equals("S");
                St_commoditties    = linha["ST_Commoditties"].ToString().Trim().ToUpper().Equals("S");
                St_vincularcf      = linha["st_vincularcf"].ToString().Trim().ToUpper().Equals("S");
                St_gerarfin        = linha["st_gerarfin"].ToString().Trim().ToUpper().Equals("S");
                st_servico.Checked = linha["st_servico"].ToString().Trim().ToUpper().Equals("S");
                Nr_Serie.Clear();
                DS_Serie.Clear();
            }
            if (!string.IsNullOrEmpty(CD_Movto.Text))
            {
                CD_CMI.Clear();
                DS_CMI.Clear();
                CD_Movto.Clear();
                DS_Movto.Clear();
            }
        }
Exemplo n.º 3
0
        public override void afterNovo()
        {
            if (tcCentral.SelectedIndex == 0)
            {
                if ((vTP_Modo == TTpModo.tm_busca) || (vTP_Modo == TTpModo.tm_Standby))
                {
                    BS_CadSerieNF.AddNew();
                    base.afterNovo();
                    if (!Nr_Serie.Focus())
                    {
                        DS_SerieNf.Focus();
                    }
                }
            }
            else
            {
                if ((vTP_Modo == TTpModo.tm_busca) || (vTP_Modo == TTpModo.tm_Standby))
                {
                    string NR_Serie_Sequencia = (BS_CadSerieNF.Current as TRegistro_CadSerieNF).Nr_Serie.Trim();
                    string DS_Serie_Sequencia = (BS_CadSerieNF.Current as TRegistro_CadSerieNF).DS_SerieNf.Trim();

                    BS_Sequencia.AddNew();
                    base.afterNovo();
                    CD_Empresa.Focus();

                    (BS_Sequencia.Current as TRegistro_CadSequenciaNF).Nr_Serie = NR_Serie_Sequencia;
                    (BS_Sequencia.Current as TRegistro_CadSequenciaNF).DS_Serie = DS_Serie_Sequencia;
                    NR_Serie_Sequencia_edit.Text = NR_Serie_Sequencia;
                    DS_Serie_Sequencia_edit.Text = DS_Serie_Sequencia;
                }
            }
        }
Exemplo n.º 4
0
 private void toolStrip_SalvaFis_Click(object sender, EventArgs e)
 {
     dataGrid_Fiscal.Enabled = true;
     //setando o nr_pedido igual ao pedido principal
     (bindingSource_PedidoCab.DataSource as TList_RegLanPedido)[dataGridNavegador.CurrentRow.Index].PedidoFiscal [dataGrid_Fiscal.CurrentRow.Index].Nr_pedido = Nr_Pedido.Value;
     BarraBotoesItem(toolStrip_ItemFiscal, TTpModo.tm_Standby);
     dataGrid_Fiscal.Enabled = true;
     Nr_Serie.Focus();
 }
Exemplo n.º 5
0
 public override void afterAltera()
 {
     base.afterAltera();
     Cbx_TP_Fiscal.Enabled = false;
     BB_CFG_Pedido.Enabled = false;
     CFG_Pedido.Enabled    = false;
     Nr_Serie.Focus();
     if (!string.IsNullOrEmpty(CD_Movto.Text))
     {
         CD_CMI.Enabled = true;
         BB_CMI.Enabled = true;
     }
     else
     {
         CD_CMI.Enabled = false;
         BB_CMI.Enabled = false;
     }
     CamadaDados.Faturamento.Cadastros.TList_CadCFGPedido lCfgPed =
         CamadaNegocio.Faturamento.Cadastros.TCN_CadCFGPedido.Buscar(CFG_Pedido.Text,
                                                                     string.Empty,
                                                                     string.Empty,
                                                                     string.Empty,
                                                                     string.Empty,
                                                                     string.Empty,
                                                                     string.Empty,
                                                                     string.Empty,
                                                                     string.Empty,
                                                                     string.Empty,
                                                                     string.Empty,
                                                                     decimal.Zero,
                                                                     1,
                                                                     string.Empty,
                                                                     null);
     if (lCfgPed.Count > 0)
     {
         St_valoresfixos = lCfgPed[0].St_valoresfixosbool;
         St_commoditties = lCfgPed[0].St_commodittiesbool;
         St_gerarfin     = lCfgPed[0].St_gerarfinbool;
     }
 }
Exemplo n.º 6
0
 private void TFCadCFGPedidoFiscal_Load(object sender, EventArgs e)
 {
     Utils.ShapeGrid.RestoreShape(this, gCadCFGPedidoFiscal);
     if (!string.IsNullOrEmpty(Utils.Parametros.pubCultura))
     {
         Idioma.TIdioma.AjustaCultura(this);
     }
     if (st_maximizar)
     {
         this.WindowState = FormWindowState.Maximized;
     }
     else
     {
         //Verificar se nao existe configuracao
         CamadaDados.Faturamento.Cadastros.TList_CadCFGPedidoFiscal lCfg =
             CamadaNegocio.Faturamento.Cadastros.TCN_CadCFGPedidoFiscal.Buscar(pCfg_pedido,
                                                                               pTp_fiscal,
                                                                               string.Empty,
                                                                               decimal.Zero,
                                                                               decimal.Zero,
                                                                               0,
                                                                               string.Empty,
                                                                               null);
         if (lCfg.Count > 0)
         {
             bsCFGPedidoFiscal.DataSource = lCfg;
             this.vTP_Modo = TTpModo.tm_busca;
             this.modoBotoes(this.vTP_Modo, true, true, false, true, false, true, true);
         }
         else
         {
             afterNovo();
             Cbx_TP_Fiscal.SelectedValue = pTp_fiscal;
             CFG_Pedido.Text             = pCfg_pedido;
             Nr_Serie.Focus();
         }
     }
 }
Exemplo n.º 7
0
 public override string ToString()
 {
     return(Nr_Serie.Trim() + "-" + DS_SerieNf.Trim());
 }