Exemplo n.º 1
0
        private void initializeFields()
        {
            if (rental.Renter != null)
            {
                renterName.Text      = rental.Renter.FullName;
                renterEmail.Text     = rental.Renter.CpEmail;
                renterLibNumber.Text = rental.Renter.LibraryNumber;
            }

            if (rental.Resource != null)
            {
                resourceId.Text   = rental.Resource.IdResource.ToString();
                resourceType.Text = rental.Resource.Type.ResourceName;
            }

            cardDataReader = new CardDataReader(okButton);
        }
Exemplo n.º 2
0
        private void intializeFields()
        {
            //setup roles combobox item source
            roleSelector.ItemsSource = Roles;

            //set the fields
            idRenter.Text = renter.IdRenter.ToString();

            libNumberText.Text = renter.LibraryNumber;

            firstName.Text = renter.FirstName;
            lastName.Text  = renter.LastName;

            cpEmail.Text = renter.CpEmail;
            roleSelector.SelectedValue = renter.Role;
            roleSelector.IsEnabled     = !isEdit;

            canRent.IsChecked = renter.CanRent;

            cardDataReader = new CardDataReader(applyButton);
        }