예제 #1
0
        private void getPagamento()
        {
            daoPagamento bdp   = new daoPagamento();
            DataSet      dsPag = bdp.getFormasPagamentos();

            dropForma.DataSource = dsPag;
            dropForma.DataBind();
            dropForma.Items.Insert(0, "Selecione");
        }
        //protected void txtLeitura_TextChanged(object sender, EventArgs e)
        //{
        //    if (txtLeitura.Text != "" && txtTitular.Text != "" && txtDocumento.Text != "" && txtQtdParcela.Text != "" && txtvencimentoCheque.Text != "")
        //    {
        //        string Ban = txtLeitura.Text.Substring(1, 3);
        //        txtBanco.Text = Ban;

        //        string Age = txtLeitura.Text.Substring(4, 4);
        //        txtAgencia.Text = Age;

        //        string Com = txtLeitura.Text.Substring(10, 3);

        //        string Che = txtLeitura.Text.Substring(13, 6);
        //        txtNrCheque.Text = Che;

        //        string Con = txtLeitura.Text.Substring(23, 9);
        //        txtConta.Text = Con;
        //        GravaPagamento(Convert.ToInt32(txtpedido.Text));
        //        txtLeitura.Text = "";
        //        txtLeitura.Focus();
        //    }
        //    else
        //    {
        //        //lblPagamento.Visible = true;
        //        //lblPagamento.Text="FAVOR PREENCHER TODOS OS DADOS..";
        //    }

        //}
        private void pro_getPagamentos()
        {
            DataSet      dt_pagamento = new DataSet();
            daoPagamento bdpg         = new daoPagamento();

            dt_pagamento = bdpg.getFormasPagamentos();
            if (dt_pagamento.Tables[0].Rows.Count > 0)
            {
                dropForma.DataSource = dt_pagamento;
                dropForma.DataBind();
                dropForma.Items.Insert(0, "Selecione");
                divpagamento.Visible = true;
            }
        }