Beispiel #1
0
        public virtual void Show(PersonDetailsForm form)
        {
            PersonDetailsForm.ClearInputFields(form);

            form.idTextBox.Text            = this.Id;
            form.nameTextBox.Text          = this.Name;
            form.addressTextBox.Text       = this.Address;
            form.dobMaskedTextBox.Text     = this.DateOfBirth;
            form.contactMaskedTextBox.Text = this.ContactNumber;
        }
Beispiel #2
0
        private void CreatePersonDetails(PersonDetails personDetails)
        {
            string id = personDetails.Id;

            if (this.details.ContainsKey(id))
            {
                MessageBox.Show("This Person already exists");
            }
            else
            {
                this.details.Add(id, personDetails);
            }

            PersonDetailsForm.ClearInputFields(this);
        }
Beispiel #3
0
        private void SavePersonDetails(PersonDetails personDetails)
        {
            string id = personDetails.Id;

            if (this.details.ContainsKey(id))
            {
                this.details[id] = personDetails;
            }
            else
            {
                MessageBox.Show("This Person does not exists");
            }

            PersonDetailsForm.ClearInputFields(this);
        }