示例#1
0
 public bool agregarEmpleado(tbEmpleados empleado)
 {
     try {
         db.tbEmpleados.Add(empleado);
         db.SaveChanges();
         return(true);
     } catch (Exception) {
         return(false);
     }
 }
示例#2
0
 public bool modificarEmpleado(tbEmpleados empleado)
 {
     try {
         db.Entry(empleado).State = EntityState.Modified;
         db.SaveChanges();
         return(true);
     } catch (Exception) {
         return(false);
     }
 }
示例#3
0
        public bool modificarContraseña(string clave, string dni)
        {
            try {
                tbEmpleados empleado = busquedaEmpleado(dni)[0];
                empleado.Contraseña      = clave;
                db.Entry(empleado).State = EntityState.Modified;

                db.SaveChanges();
                return(true);
            } catch (Exception) {
                return(false);
            }
        }