/// <summary> /// Initializes a new instance of the <see cref="bumget.Profil"/> class. /// </summary> /// <param name="firstName">First name.</param> /// <param name="name">Name.</param> /// <param name="name">Password.</param> /// <param name="currency">Currency.</param> /// <param name="subCategories">Sub categories (a string with Id of subcategories like that "1-2-3").</param> public Profil (string login, string password, Devise currency, string subCategories) { db.CreateTable<Profil>(); Login = login; Password = password; Currency = currency; CurrencyId = currency.Id; SubCategories = subCategories; db.Insert (this); }
/// <summary> /// Initializes a new instance of the <see cref="bumget.Profil"/> class. /// </summary> /// <param name="firstName">First name.</param> /// <param name="name">Name.</param> /// <param name="name">Password.</param> /// <param name="currency">Currency.</param> /// <param name="subCategories">Sub categories (a string with Id of subcategories like that "1-2-3").</param> public Profil(string login, string password, Devise currency, string subCategories) { db.CreateTable <Profil>(); Login = login; Password = password; Currency = currency; CurrencyId = currency.Id; SubCategories = subCategories; db.Insert(this); }
/// <summary> /// Allow new user to create a new Profile /// </summary> public static void ProfilCreationPage() { Console.Clear(); Console.WriteLine("*******************************"); Console.WriteLine("**** Profil Creation Page *****"); Console.WriteLine("*******************************"); string login = Menu.userLoginCreation(); string password = Menu.userPasswordCreation(); Devise userCurrency = Menu.userFavouriteCurrencyCreation(); Profil currentProfil = new Profil(login, password, userCurrency, ""); Menu.userCategoryCreation(currentProfil); Console.WriteLine("\n****************************************"); Console.WriteLine("Profil saved. You will be able to log in.\nPlease push a key to continue..."); Console.WriteLine("******************************************"); Console.ReadKey(); Menu.HomePage(); }