コード例 #1
0
 /// <summary>
 ///
 /// </summary>
 public void ValidaPedido()
 {
     try
     {
         DALConexao   cx        = new DALConexao(DadosDaConexao.StringDeConexao);
         BLLPCPEDC    blldup    = new BLLPCPEDC(cx);
         BLLPCPEDI    itens     = new BLLPCPEDI(cx);
         ModeloPCPEDC modelodup = blldup.CarregaPCPEDC(Convert.ToInt64(txtCodigo.Text));
         if (modelodup.origemped == "B")
         {
             frmMapa f = new frmMapa();
             f.numcar  = Convert.ToInt32(txtNumcar.Text);
             f.tipoimp = 2;
             tipodanfe = 1;
             f.Show();
         }
         else
         {
             blldup.DuplicaC(modelodup);
             blldup.DuplicaI(modelodup);
             //blldup.AlterarPediSel(modelodup);
             // blldup.AlterarPedSEL(modelodup);
             dgvItens.DataSource = "";
             dgvItens.DataSource = itens.Localizar(Convert.ToInt64(txtCodigo.Text));
         }
     }catch (Exception ex)
     {
         MessageBox.Show("Atenção: " + ex.Message, "Atenção!", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
     }
 }
コード例 #2
0
        private void btnSair_Click(object sender, EventArgs e)
        {
            frmMapa f = new frmMapa();

            f.pedidoi = pedidos[0];
            f.pedidof = pedidos[1];
            f.tipoimp = 1;
            f.numcar  = Convert.ToInt32(txtNumcar.Text);
            f.Show();
        }
コード例 #3
0
 private void frmPrincipal_KeyDown(object sender, KeyEventArgs e)
 {
     if (e.KeyCode == Keys.Escape)
     {
         LimpaTela();
     }
     if (e.KeyCode == Keys.F5)
     {
         frmMapa f = new frmMapa();
         f.pedidoi = pedidos[0];
         f.pedidof = pedidos[1];
         f.tipoimp = 1;
         f.Show();
     }
     if (e.KeyCode == Keys.Enter && (txtCodigo.Text != ""))
     {
         btnBuscar.Focus();
     }
 }