Ejemplo n.º 1
0
        public MemberForm(int congregationId,bool isFirstMember,bool essentialFieldsOnly, bool isUpdate, EditMembersForm editForm)
        {
            InitializeComponent();
            congo = manager.CongregationByCongregationId(congregationId);
            firstMember = isFirstMember;
            neccessaryFieldsOnly = essentialFieldsOnly;
            update = isUpdate;
            emf = editForm;

            if (neccessaryFieldsOnly == true)
            {
                UserNameLabel.Visible = false;
                UserNameTextBox.Visible = false;
                PasswordLabel.Visible = false;
                PasswordTextBox.Visible = false;
                MiddleName.Visible = false;
                MiddleNameLabel.Visible = false;
                DateOfBirthPicker.Visible = false;
                DateOfBirthLabel.Visible = false;
                BaptismDateLabel.Visible = false;
                BaptismDatePicker.Visible = false;
                if(update==true)
                {
                    FirstName.Text = emf.SelectedMember.FirstName;
                    LastName.Text = emf.SelectedMember.LastName;
                    PreferredName.Text = emf.SelectedMember.PreferredName;
                    DeleteMemberButton.Visible = true;
                    AddUpdateButton.Text = "Update Member";
                }
            }
        }
Ejemplo n.º 2
0
        private void editMembersToolStripMenuItem_Click(object sender, EventArgs e)
        {
            EditMembersForm em = new EditMembersForm(ThisMember.CongregationId);

            em.WindowState = FormWindowState.Normal;
            em.Show();
        }
Ejemplo n.º 3
0
        public MemberForm(int congregationId, bool isFirstMember, bool essentialFieldsOnly, bool isUpdate, EditMembersForm editForm)
        {
            InitializeComponent();
            congo                = manager.CongregationByCongregationId(congregationId);
            firstMember          = isFirstMember;
            neccessaryFieldsOnly = essentialFieldsOnly;
            update               = isUpdate;
            emf = editForm;


            if (neccessaryFieldsOnly == true)
            {
                UserNameLabel.Visible     = false;
                UserNameTextBox.Visible   = false;
                PasswordLabel.Visible     = false;
                PasswordTextBox.Visible   = false;
                MiddleName.Visible        = false;
                MiddleNameLabel.Visible   = false;
                DateOfBirthPicker.Visible = false;
                DateOfBirthLabel.Visible  = false;
                BaptismDateLabel.Visible  = false;
                BaptismDatePicker.Visible = false;
                if (update == true)
                {
                    FirstName.Text             = emf.SelectedMember.FirstName;
                    LastName.Text              = emf.SelectedMember.LastName;
                    PreferredName.Text         = emf.SelectedMember.PreferredName;
                    DeleteMemberButton.Visible = true;
                    AddUpdateButton.Text       = "Update Member";
                }
            }
        }
Ejemplo n.º 4
0
 private void editMembersToolStripMenuItem_Click(object sender, EventArgs e)
 {
     EditMembersForm em = new EditMembersForm(ThisMember.CongregationId);
     em.WindowState = FormWindowState.Normal;
     em.Show();
 }