public frmCartoes() { // Required for Windows Form Designer support InitializeComponent(); // TODO: Add any constructor code after InitializeComponent call mCartao = new cartao(); updateFields(); HabilitaControlesGravacao(false); }
public frmCartoes(int codCartao) { // Required for Windows Form Designer support InitializeComponent(); // TODO: Add any constructor code after InitializeComponent call try { mCartao = new cartao(codCartao); HabilitaControlesGravacao(false); updateFields(); } catch (System.Exception e) { System.Windows.Forms.MessageBox.Show(e.Source + ": " + e.Message); } }
// Traz busca as informações do cartao solicitado e apresenta os dados na tela! private void BuscaCartao(int codCartao) { if (TemTransacao()) { try { mCartao = null; mCartao = new cartao(codCartao); updateFields(); HabilitaControlesGravacao(false); } catch (System.Exception oException) { System.Windows.Forms.MessageBox.Show(oException.Source + ": " + oException.Message); } } }
// Solicita busca dos dados no banco de dados private void btnBuscaCartao_Click(object sender, System.EventArgs e) { try { mCartao = null; mCartao = new cartao(); HabilitaControlesGravacao(false); updateFields(); txtCodigoCartao.Focus(); } catch (System.Exception oException) { System.Windows.Forms.MessageBox.Show(oException.Source + ": " + oException.Message); } }