コード例 #1
0
        private void UpdateEmployeeRoleButton_Click(object sender, EventArgs e)
        {
            try
            {
                EmployeesData ed = new EmployeesData();

                SqlEmployeesRepository employees = new SqlEmployeesRepository(connectionString);
                employees.UpdateEmployeeRole(Convert.ToInt32(EmployeeIdText.Text), EmailTextbox.Text, NameTextbox.Text, EmployeeRoleText.Text, Convert.ToInt32(SalaryTextbox.Text));
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.ToString());
            }
        }
コード例 #2
0
        private void CreateEmployeeButton_Click(object sender, EventArgs e)
        {
            try
            {
                SqlEmployeesRepository employees = new SqlEmployeesRepository(connectionString);

                Employees createEmployees = employees.CreateEmployee(EmailTextbox.Text, NameTextbox.Text, RoleTextbox.Text, Convert.ToInt32(SalaryTextbox.Text));
                list.Add(createEmployees);

                EmployeesData ed = new EmployeesData();
                ed.dataGridView1.DataSource = list;
            }
            catch (Exception ex)
            {
                MessageBox.Show("There cannot be any empty or incorrectly entered parameters. Check submission.");
            }
        }
コード例 #3
0
ファイル: MainDataSelection.cs プロジェクト: akshay1929/560GP
        private void EmployeesButton_Click(object sender, EventArgs e)
        {
            EmployeesData ed = new EmployeesData();

            ed.ShowDialog();
        }