コード例 #1
0
        private void addNewEmployeeToolStripMenuItem_Click(object sender, EventArgs e)
        {
            AddEmployee frm = new AddEmployee();

            frm.ShowDialog();
            this.Close();
        }
コード例 #2
0
        private void editEmployeeToolStripMenuItem_Click(object sender, EventArgs e)
        {
            OleDbConnection connection = new OleDbConnection(connS);

            try
            {
                foreach (ListViewItem itm in lvEmployees.Items)
                {
                    if (itm.Checked)
                    {
                        MessageBox.Show("You chose to edit this employee: " + itm.SubItems[1].Text + " " + itm.SubItems[2].Text);
                        AddEmployee frme = new AddEmployee(itm.Text, itm.SubItems[1].Text, itm.SubItems[2].Text, itm.SubItems[4].Text, itm.SubItems[3].Text);
                        frme.ShowDialog();
                    }
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
            finally {
                refreshListView();
            }
        }
コード例 #3
0
        private void button3_Click(object sender, EventArgs e)
        {
            AddEmployee frm = new AddEmployee();

            frm.ShowDialog();
        }