Пример #1
0
        // Saves when the form closes
        private void employeeAdd_FormClosed(object sender, FormClosedEventArgs e)
        {
            Form1.currentStaff = original;
            SaveToFile.serializeAll();

            if (action == 1 && Form1.currentStaff.Count > 0)
            {
                employeeSelect eS = new employeeSelect();
                eS.ShowDialog();
            }
        }
Пример #2
0
        // Opens up change employee winform
        private void changeEmployeeButton_Click(object sender, EventArgs e)
        {
            // If there's any staff
            if (Form1.currentStaff.Count > 0)
            {
                employeeSelect eS = new employeeSelect();
                eS.ShowDialog();
            }
            else
            {
                employeeAdd aE = new employeeAdd(1);
                aE.ShowDialog();
            }
            // Display what employee is logged in
            this.Text = currentEmployee + ": " + versionNumber;

            Refresh();
        }
Пример #3
0
        // "Contructor"
        public Form1()
        {
            InitializeComponent();

            //new SplashScreen();

            instrumentList.DataSource = allInstruments;
            newDataDisplay.Text       = "";
            setFilepath();
            instrumentList.Select();
            // Sort instruments into their respective lists
            sortInstruments();
            searchBox.Select();

            // Select employee
            if (currentStaff.Count != 0)
            {
                employeeSelect eS = new employeeSelect();
                eS.ShowDialog();
            }
            this.Text = currentEmployee + ": " + versionNumber;
        }