Esempio n. 1
0
        private async void PopulateData()
        {
            auctioners = (await AuctioneerService.GetAuctioneers()).ToList();
            auctioners.Insert(0, new AuctioneerModel());

            Users_comboBox.DataSource = auctioners;

            RegistrationMode = Users_comboBox.SelectedIndex == 0;
        }
Esempio n. 2
0
        private void Registration_button_Click(object sender, EventArgs e)
        {
            Isvalidinput = Utils.ValidateInput(Name_textBox, Name_label);
            Isvalidinput = Utils.ValidateInput(LastName_textBox, LastName_label);
            Isvalidinput = Utils.ValidateInput(UserName_textBox, UserName_label);
            Isvalidinput = Utils.ValidateInput(Password_textBox, Password_label);
            Isvalidinput = Utils.ValidateInput(RepeatPassword_textBox, RepeatPassword_label);

            if (RegistrationMode)
            {
                AuctioneerService.RegisterAuctioneer(InitializeAuctioneer(new AuctioneerModel()));
            }
            else
            {
                AuctioneerService.EditAuctioneer(InitializeAuctioneer(selectedAuctioneer));
                Users_comboBox.SelectedIndex = 0;
            }
            PopulateData();
        }