示例#1
0
 private void tlaAddCliente_Load(object sender, EventArgs e)
 {
     cliente = new Banco.Cliente();
     if (!cliente.conectar())
     {
         this.Close();
         MessageBox.Show("Banco de dados indisponivel", "Alerta | Knoodou");
     }
     if (this.id > 0)
     {
         string[] valores = cliente.buscarUmCliente(this.id);
         inCpf.Text = valores[0];
         inTelefone.Text = valores[1];
         dateNASC.Text = valores[2];
         inRg.Text = valores[3];
         inEndereco.Text = valores[4];
         inNome.Text = valores[5];
         if (valores[6] == "m") radioButton1.Checked = true; else radioButton2.Checked = true;
         inCelular.Text = valores[7];
         inEmail.Text = valores[8];
         inMsn.Text = valores[9];
         this.Text = "Editar cliente | Knoodou";
         btOk.Text = "Atualizar";
     }
 }
示例#2
0
 private void tlaAddCliente_Load(object sender, EventArgs e)
 {
     cliente = new Banco.Cliente();
     if (!cliente.conectar())
     {
         this.Close();
         MessageBox.Show("Banco de dados indisponivel", "Alerta | Knoodou");
     }
     if (this.id > 0)
     {
         string[] valores = cliente.buscarUmCliente(this.id);
         inCpf.Text      = valores[0];
         inTelefone.Text = valores[1];
         dateNASC.Text   = valores[2];
         inRg.Text       = valores[3];
         inEndereco.Text = valores[4];
         inNome.Text     = valores[5];
         if (valores[6] == "m")
         {
             radioButton1.Checked = true;
         }
         else
         {
             radioButton2.Checked = true;
         }
         inCelular.Text = valores[7];
         inEmail.Text   = valores[8];
         inMsn.Text     = valores[9];
         this.Text      = "Editar cliente | Knoodou";
         btOk.Text      = "Atualizar";
     }
 }
示例#3
0
 private void tlaCADcliente_Load(object sender, EventArgs e)
 {
     listar = new Banco.Cliente();
     this.popularTabelaCliente();
 }
示例#4
0
 private void tlaCADcliente_Load(object sender, EventArgs e)
 {
     listar = new Banco.Cliente();
     this.popularTabelaCliente();
 }