Esempio n. 1
0
        private void frmLavado_Load(object sender, EventArgs e)
        {
            VclLavadero lavadero = new VclLavadero();
            listadatos = lavadero.mtdListar();
            dgvDatos.DataSource = lavadero.mtdListar();

           // combos
            clEmpleado empleado = new clEmpleado();
            DataTable dtempleado = new DataTable();
            dtempleado = empleado.mtdListar();
            cmbEmpleado.DataSource = dtempleado;
            cmbEmpleado.DisplayMember = "NombreP";
            cmbEmpleado.ValueMember = "IdPersona";
        }
Esempio n. 2
0
        private void button1_Click(object sender, EventArgs e)
        {
            VclLavadero lavadero = new VclLavadero();
            lavadero.PLACA = txtPlaca.Text;
            List<clAutomovil> RepetirPlaca = new List<clAutomovil>();

            RepetirPlaca = lavadero.mtdAutoCompletar();
            for (int i = 0; i < RepetirPlaca.Count; i++)
            {
                if (RepetirPlaca[i].Placa == txtPlaca.Text)
                {
                    MessageBox.Show("Este Automovil ya esta resgistrado");
                }
                else
                {
                    lavadero.PLACA = txtPlaca.Text;
                    string tipovehiculo = "";
                    if (tipovehiculo == "carro")
                    {
                        rbCarro.Checked = true;
                    }
                    else if (tipovehiculo == "moto")
                    {
                        rbMoto.Checked = true;
                    }
                    else if (tipovehiculo == "bicicleta")
                    {
                        rbBicicleta.Checked = true;
                    }
                    lavadero.TIPOVEHICULO = tipovehiculo;
                    clCliente objCliente = new clCliente();
                    int variable = objCliente.mtdAsignarVehiculo();
                    lblId.Text = variable.ToString();


                    int can = lavadero.mtdRegistrarAutomovil(variable);
                    if (can > 0)
                    {
                        MessageBox.Show("Registrado");
                        frmLavado_Load(null, null);
                    }
                    else
                    {
                        MessageBox.Show("ERORRRRRRRRRR");
                    }
                }
    }
}