public static Model.UsuarioBo UpdUsuario(int id, string pwdNueva) { var query = new UpdUsuario(); try { if (query.Execute(id, pwdNueva) > 0) { return(GetUsuario(id)); } } catch (Exception ex) { var msg = "Excepcion Controlada: " + ex.Message; throw new Exception(msg, ex); } return(null); }
public static Model.UsuarioBo UpdUsuario(Model.UsuarioBo usuario) { var query = new UpdUsuario(); try { if (query.Execute(usuario.Id, usuario.Persona.Id, usuario.CodPrf, usuario.EstUsr) > 0) { return(GetUsuarios().SingleOrDefault(x => x.Id == usuario.Id)); } } catch (Exception ex) { var msg = "Excepcion Controlada: " + ex.Message; throw new Exception(msg, ex); } return(null); }