//Ingresar Empeno private void btnInvoice_Click(object sender, EventArgs e) { if (txtNombre.Text.Equals("") || txtNombre.Text == null || txtNombre2.Text.Equals("") || txtNombre2.Text == null || txtApellido.Text.Equals("") || txtApellido.Text == null || txtApellido2.Text.Equals("") || txtApellido2.Text == null || txttel.Text.Equals("") || txttel.Text.Equals("") || txtCorreo_.Text.Equals("") || txtCorreo_.Text == null || txtCedula.Text.Equals("") || txtCedula.Text == null || txtDireccion.Text.Equals("") || txtDireccion.Text == null) { MessageBox.Show("Rellene Todos los Campos"); } else { ControladorCliente co = new ControladorCliente(); co.InsertarDatos(txtNombre.Text, txtNombre2.Text, txtApellido.Text, txtApellido2.Text, txttel.Text, txtCorreo_.Text, txtCedula.Text, txtDireccion.Text); ControlProducto cp = new ControlProducto(); cp.InsertarDatos(Convert.ToInt32(idTipo.SelectedValue), txtValor.Text , txtDescripcion.Text, txtNombreProducto.Text); ControlEmpeno c = new ControlEmpeno(); c.InsertarDatos(Convert.ToInt32(idEmpleado.SelectedValue), Convert.ToDouble(txtMonto_.Text) , Convert.ToInt32(txtCuota.Text), txtFrecuencia.Text, dateVencimiento_.Value.Date, txtCedula.Text, Convert.ToInt32(idTipo.SelectedValue), txtNombreProducto.Text); AccesoDatoUsuario acc = new AccesoDatoUsuario(); acc.TablaDePago(txtCedula.Text, txtFrecuencia.Text, txtMonto_.Text); MessageBox.Show("AGREGADO CORRECTAMENTE"); } }
public string restraurarPass(string nombre) { try { AccesoDatoUsuario acceso = new AccesoDatoUsuario(); return(acceso.CambiarPass(nombre)); } catch (Exception e) { return(e.Message); } }
public bool LoginUsser(string user, string pass) { try { AccesoDatoUsuario acceso = new AccesoDatoUsuario(); return(acceso.Login(user, pass)); } catch (Exception e) { return(false); } }