Beispiel #1
0
        private void Add_employee_info(Employee employee)
        {
            AddEdit_Employee add_Employee = new AddEdit_Employee();

            add_Employee.SetUpFormFor_New_Employee(employee);
            add_Employee.StartPosition = FormStartPosition.CenterScreen;
            DialogResult result = add_Employee.ShowDialog();

            if (result == DialogResult.Yes)
            {
                this.DialogResult = DialogResult.Yes;
                MessageBox.Show("Nurse Added.");
                this.Close();
            }
        }
Beispiel #2
0
        private void creditentals_button_Click(object sender, EventArgs e)
        {
            AddEdit_Employee edit_Employee = new AddEdit_Employee();

            if (this.editedNurse.UserName != null)
            {
                edit_Employee.SetUpFormToEditEmployee(this.editedNurse);
            }
            edit_Employee.StartPosition = FormStartPosition.CenterScreen;
            DialogResult result = edit_Employee.ShowDialog();

            if (result == DialogResult.Yes)
            {
                Employee employee = edit_Employee.ReturnedEmployee;
                this.editedNurse.EmployeeID = employee.EmployeeID;
                this.editedNurse.UserName   = employee.UserName;
                this.editedNurse.Password   = employee.Password;
                this.editedNurse.PersonId   = employee.PersonId;
                this.Refresh();
                this.SetUp_ForEditNurse(this.editedNurse);
            }
        }