public List <clsUsuarioApp> ConsultarTodosUsuarios() { List <clsUsuarioApp> lstUsuarioApp = new List <clsUsuarioApp>(); DataTable dtRespuesta = null; clsPersistenciaUsuario objPersistenciaApp = new clsPersistenciaUsuario(); try { dtRespuesta = objPersistenciaApp.ConsultarTodoUsuario("AppMovil"); if (dtRespuesta != null) { foreach (DataRow dr in dtRespuesta.Rows) { clsUsuarioApp objUsuarioApp = new clsUsuarioApp(); objUsuarioApp.idUsuarioApp = dr[0].ToString(); objUsuarioApp.nombreUsuarioApp = dr[1].ToString(); objUsuarioApp.identificacionUsuarioApp = dr[2].ToString(); objUsuarioApp.pinUsuarioApp = dr[3].ToString(); DateTime fecha = DateTime.Parse(dr[4].ToString()); objUsuarioApp.fechaCreacionUsuarioApp = fecha.ToString("dd-MM-yyyy HH:mm:ss"); objUsuarioApp.eliminadoUsuarioApp = bool.Parse(dr[5].ToString()); lstUsuarioApp.Add(objUsuarioApp); } } } catch (Exception) { throw; } return(lstUsuarioApp); }
internal bool EliminarUsuarioApp(string idUsuario) { clsPersistenciaUsuario objPersistenciaApp = new clsPersistenciaUsuario(); bool retorno = false; try { retorno = objPersistenciaApp.EliminarUsuarioApp("AppMovil", idUsuario); } catch (Exception) { throw; } return(retorno); }
internal bool ValidarUsuario(string email, string password) { clsPersistenciaUsuario objPersistenciaApp = new clsPersistenciaUsuario(); bool retorno = false; try { retorno = objPersistenciaApp.InicioSession("AppMovil", email, password); } catch (Exception) { throw; } return(retorno); }
internal bool ModificarUsuarioApp(string strId, string strIdentificacion, string strNombre, string strPin, bool eliminado) { clsPersistenciaUsuario objPersistenciaApp = new clsPersistenciaUsuario(); bool retorno = false; try { retorno = objPersistenciaApp.ModificarUsuarioApp("AppMovil", strId, strIdentificacion, strNombre, strPin, eliminado); } catch (Exception) { throw; } return(retorno); }