Пример #1
0
        private void mnuView_Click(object sender, EventArgs e)
        {
            frmRecord rec = new frmRecord();

            //hides current form
            this.Hide();
            //displays the record form
            rec.Show();
            //disables textboxes
            rec.txtFirstName.Enabled = false;
            rec.txtLastName.Enabled  = false;
            rec.txtStreet.Enabled    = false;
            rec.txtCity.Enabled      = false;
            rec.txtState.Enabled     = false;
            rec.txtZip.Enabled       = false;
            rec.txtPhone.Enabled     = false;
            rec.txtEmail.Enabled     = false;
            //disables the previous button
            rec.btnPrevious.Enabled = false;
            //hides ok button
            rec.btnOK.Hide();

            //calls display the data from the person to textboxes
            rec.display();
            //updates the label that countd the current person
            rec.lblRecordCounter.Text = Data._recCurrent + 1 + " of " + Data._lstPer.Count;
        }
Пример #2
0
        private void mnuDelete_Click(object sender, EventArgs e)
        {
            frmRecord rec = new frmRecord();

            //sets form title
            rec.Text = "Delete";
            //hides current form
            this.Hide();
            //displays the record form
            rec.Show();
            //change thje name of close button
            rec.btnOK.Text = "Delete";
            //change close text to cancel
            rec.btnClose.Text = "Cancel";
            //updates the label that countd the current person
            rec.lblRecordCounter.Text = Data._recCurrent + 1 + " of " + Data._lstPer.Count;
            //calls display the data from the person to textboxes
            rec.display();
        }