Ejemplo n.º 1
0
        private void Registration()
        {
            currentAccount.Password = ComputeSha256Hash(currentAccount.Password);
            DALService.AddClient(currentAccount.Login, currentAccount.Password, currentClient);
            accounts.Add(CurrentAccount);
            clients.Add(CurrentClient);
            CurrentAccount = DALService.GetAccount(currentAccount);
            CurrentClient  = currentAccount.Client;

            if (DALService.GetAccount(currentAccount) != null)
            {
                CurrentAccount = DALService.GetAccount(currentAccount);

                w1.Close();
                FillRecords();
                FillDeals();
                FillArtists();
                FillGenres();
                FillPublishers();
                if (currentAccount.IsClient)
                {
                    CurrentClient = currentAccount.Client;
                    FillSalesForClient();
                    FillSetAsideRecordsForClient();
                }
                else
                {
                    FillRemovedRecords();
                    FillDiscardedRecords();
                    FillSalesHistories();
                    FillSetAsideRecords();
                }
                Show();
            }
            w1.Close();
            OnPropertyChanged(nameof(currentAccount));
            OnPropertyChanged(nameof(CurrentClient));
        }