예제 #1
0
        private void SearchButton_Click(object sender, EventArgs e)
        {
            toolStripStatusLabel1.Text = "Searching";
            bool isGinLegal = int.TryParse(textBox1.Text, out int currentGin);

            if (!isGinLegal)
            {
                MessageBox.Show("Invalid Gin");
            }
            else
            {
                try
                {
                    Employee employee = data.DataDict[currentGin];
                    MessageBox.Show("Target employee found" + "\n" + employee.ToString());
                    SubForm editForm = new SubForm(this, employee, "Modify");
                    editForm.Show();
                    RefreshButton_Click(sender, e);
                }
                catch
                {
                    MessageBox.Show("No corresponding record");
                }
            }
            toolStripStatusLabel1.Text = "Ready";
        }
예제 #2
0
        private void AddButton_Click(object sender, EventArgs e)
        {
            toolStripStatusLabel1.Text = "Adding New Profile";
            SubForm editForm = new SubForm(this, null, "add");

            editForm.Show();
            RefreshButton_Click(sender, e);
            toolStripStatusLabel1.Text = "Ready";
        }
예제 #3
0
        private void SearchButton_Click(object sender, EventArgs e)
        {
            int currentGin = int.Parse(textBox1.Text);

            try
            {
                Employee employee = data.DataDict[currentGin];
                MessageBox.Show("Target employee found" + "\n" + employee.ToString());
                SubForm editForm = new SubForm(this, employee, "Modify");
                editForm.Show();
            }
            catch
            {
                MessageBox.Show("No corresponding record.");
            }
        }
예제 #4
0
        private void AddButton_Click(object sender, EventArgs e)
        {
            SubForm editForm = new SubForm(this, null, "add");

            editForm.Show();
        }