private void NewStaff_Load(object sender, EventArgs e) { StaffTypeManager aStaffTypeManager = new StaffTypeManager(); staffTypeCombobox.DataSource = aStaffTypeManager.GetAllStaffType(); StaffDesignationManager aStaffDesignationManager = new StaffDesignationManager(); designationComboBox.DataSource = aStaffDesignationManager.GetAllStaffDesignation(); }
private void addButton_Click(object sender, EventArgs e) { StaffType aStaffType = new StaffType(); aStaffType.Type = typeTextBox.Text; StaffTypeManager aStaffTypeManager = new StaffTypeManager(); bool condition; condition = aStaffTypeManager.SaveAll(aStaffType); if (condition) { MessageBox.Show("Staff Type Added Successfully"); } else { MessageBox.Show("Something Eror!!"); } }