54 lines
1.5 KiB
C#
54 lines
1.5 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.ComponentModel;
|
|
using System.Data;
|
|
using System.Drawing;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using System.Windows.Forms;
|
|
using DAL;
|
|
using BLL;
|
|
|
|
namespace IBRCAD
|
|
{
|
|
public partial class frm_consultatipopagamento : Form
|
|
{
|
|
public int codigo;
|
|
public frm_consultatipopagamento()
|
|
{
|
|
InitializeComponent();
|
|
}
|
|
|
|
private void Frm_consultatipopagamento_Load(object sender, EventArgs e)
|
|
{
|
|
BtLocalizar_Click(sender, e);
|
|
dgvDados.Columns[0].HeaderText = "Código";
|
|
dgvDados.Columns[0].Width = 50;
|
|
dgvDados.Columns[1].HeaderText = "Tipo do Pagamento";
|
|
dgvDados.Columns[1].Width = 700;
|
|
}
|
|
|
|
private void BtLocalizar_Click(object sender, EventArgs e)
|
|
{
|
|
DALLconexao cx = new DALLconexao (DadosDaConexao.StringDeConexao);
|
|
BLLTipoPagamento bll = new BLLTipoPagamento(cx);
|
|
dgvDados.DataSource = bll.Localizar(txtValor.Text);
|
|
}
|
|
|
|
private void DgvDados_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
|
|
{
|
|
if (e.RowIndex >= 0)
|
|
{
|
|
this.codigo = Convert.ToInt32(dgvDados.Rows[e.RowIndex].Cells[0].Value);
|
|
this.Close();
|
|
}
|
|
}
|
|
|
|
private void Btn_imprimir_Click(object sender, EventArgs e)
|
|
{
|
|
//printDGV.Print_DataGridView(dgvDados);
|
|
}
|
|
}
|
|
}
|