示例#1
0
        private void frmAlta_Click_1(object sender, EventArgs e)
        {
            frmAltaCliente i = new frmAltaCliente();

            i.Show();
            this.Close();
        }
示例#2
0
 public void registrar(AbmCliente.frmAltaCliente frmAlta)//Regitro al cliente verificando que no esta creado y que nadie use el mismo mail
 {
     if (this.mailRepetido())
     {
         MessageBox.Show("El mail ya ha sido utilizado, ingrese uno distinto.");
     }
     else
     {
         try
         {
             SqlDataReader dataReader = DBConnection.getInstance()
                                        .executeQuery("INSERT INTO FAAE.Cliente VALUES('" + tipoDoc + "'," + nroDoc + ",'" + nombre + "','" + apellido + "','" + mail + "','" + telefono + "','" + calle + "'," + numero + ",'" + localidad + "','" + pais + "','" + nacionalidad + "'," + habilitado + ", CONVERT(SMALLDATETIME, CONVERT(DATETIME, '" + fechaNac.ToShortDateString() + "'))" + "," + piso + ",'" + depto + "')");
             MessageBox.Show("Cliente creado correctamente");
             dataReader.Close();
             frmAlta.Close();
             AbmCliente.frmABMCliente i = new AbmCliente.frmABMCliente();
             i.Show();
         }
         catch (Exception e)
         {
             MessageBox.Show("Usuario ya creado." + e.ToString());
         }
     }
 }