public UserAccount CreateAccount(string username, string password, string email, string phoneNum = null) { UserAccount account = new UserAccount(userName: username, email: email, phoneNumber: phoneNum); ServerIOController serverIo = new ServerIOController(); serverIo.CreateUser(account, password); return(account); }
public UserAccount LogIn(string username, string password) { ServerIOController serverIo = new ServerIOController(); if (serverIo.AuthenticateUser(username, password)) { return(CurrentUser = GetUser(username)); } return(null); }
public List <NonRecurringGoal> GetUpcomingNonRecurringGoals(string username) { ServerIOController serverIo = new ServerIOController(); List <NonRecurringGoal> list = new List <NonRecurringGoal>(); foreach (Goal g in serverIo.GetUpcomingGoals(username)) { if (g.GetType() == typeof(NonRecurringGoal)) { list.Add((NonRecurringGoal)g); } } return(list); }
public void CreateRecurringGoal(string username, RecurringGoal goal) { ServerIOController serverIo = new ServerIOController(); serverIo.CreateRecurringGoal(goal, username); }
public void AddPoints(string username, int pointsToAdd) { ServerIOController serverIo = new ServerIOController(); serverIo.AddPoints(username, pointsToAdd); }
public UserAccount GetUser(string username) { ServerIOController serverIo = new ServerIOController(); return(serverIo.GetUser(username)); }
public bool DoesUserExist(string username) { ServerIOController serverIo = new ServerIOController(); return(serverIo.DoesUserExist(username)); }
public void UploadFile(File upload) { ServerIOController serverIo = new ServerIOController(); serverIo.UploadFile(upload); }
public void CreateNote(Note note, string username) { ServerIOController serverIo = new ServerIOController(); serverIo.CreateNote(note, username); }
public List <NoteMini> GetNotePreviews(string username) { ServerIOController serverIo = new ServerIOController(); return(serverIo.GetNotePreviews(username)); }
public Note GetNote(string guid, string username) { ServerIOController serverIo = new ServerIOController(); return(serverIo.GetNote(guid, username)); }
public void DeleteFile(string guid) { ServerIOController serverIo = new ServerIOController(); serverIo.DeleteFile(guid); }
public void ShareFile(string guid, Dictionary <string, Permission> users) { ServerIOController serverIo = new ServerIOController(); serverIo.ShareFile(guid, users); }
public File DownloadFile(string guid) { ServerIOController serverIo = new ServerIOController(); return(serverIo.DownloadFile(guid)); }
public void CompleteGoal(string goalGuid, string username) { ServerIOController serverIo = new ServerIOController(); serverIo.MarkGoalAsCompleted(goalGuid, username); }
public Goal GetGoal(string guid, string username) { ServerIOController serverIo = new ServerIOController(); return(serverIo.GetGoal(guid, username)); }
public void UpdateNote(Note note) { ServerIOController serverIo = new ServerIOController(); serverIo.UpdateNote(note); }
public List <Goal> GetOverdueGoals(string username) { ServerIOController serverIo = new ServerIOController(); return(serverIo.GetOverdueGoals(username)); }
public Month GetMonth(string username, int monthOfYear) { ServerIOController serverIo = new ServerIOController(); return(serverIo.GetMonth(username, monthOfYear)); }