public bool UserDelete(string id) { string path = "/trainer/" + id + "/delete"; NameValueCollection reqparm = new NameValueCollection(); ServerComunication.DoPost(path, reqparm); return(true); }
public bool GetUser(string id) { string path = "/trainer/"; try { return(Parse(ServerComunication.DoGet(path + id))); }catch (Exception ex) { return(false); } }
public Boolean eventNew(string userId) { string path = "/events/" + userId + "/create"; NameValueCollection reqparm = new NameValueCollection(); reqparm.Add("timestamp", Timestamp.ToUniversalTime().ToString("yyyy-MM-ddTHH:mm:ssZ")); reqparm.Add("description", description); ServerComunication.DoPost(path, reqparm); return(true); }
public List <EventModel> Old(string userId, int limit = 30) { string path = "/events/upcoming/"; try { return(ParseMulti(ServerComunication.DoGet(path + userId + "?limit=" + limit.ToString()))); } catch (Exception ex) { return(null); } }
public Boolean UserChangePassword(string path) { NameValueCollection reqparm = new NameValueCollection(); // reqparm.Add("password", Password); reqparm.Add("firstName", firstName); reqparm.Add("lastName", lastName); String Response = ServerComunication.DoPost(path, reqparm); return(true); }
public Boolean UserSave() { string path = "/trainer/"; NameValueCollection reqparm = new NameValueCollection(); reqparm.Add("_id", _id); reqparm.Add("_rev", _rev); reqparm.Add("email", Email); reqparm.Add("username", UserName); reqparm.Add("firstName", firstName); reqparm.Add("lastName", lastName); String Response = ServerComunication.DoPost(path + _id, reqparm); return(true); }
public Boolean UserRegister() { string path = "/trainer"; try { NameValueCollection reqparm = new NameValueCollection(); reqparm.Add("email", Email); reqparm.Add("username", UserName); reqparm.Add("password", Password); reqparm.Add("firstName", firstName); reqparm.Add("lastName", lastName); String Response = ServerComunication.DoPost(path, reqparm); JObject myjObject = JObject.Parse(Response); return(Parse(myjObject)); } catch (Exception ex) { string message = ex.Message; return(false); } }
public void GetUsers(string path) { Parse(ServerComunication.DoGet(path)); }