private void btnCancel_Click(object sender, EventArgs e) { //Take the user back to the previous screen UpdatePassword updateForm = new UpdatePassword(); updateForm.Show(); this.Hide(); }
private void btnEnter_Click(object sender, EventArgs e) { if (rdoButtonInventory.Checked == true) { //open user inventory screen - RDL frmInventory InventoryScreen = new frmInventory(); InventoryScreen.Show(); this.Hide(); } if (rdoBtnEmployeeList.Checked == true) { //display employee list in listbox - rdl //This has been changed to a DataGridView Control which will display the list of employees currently in the group3.employee table - AC string connection = "server=cstnt.tstc.edu;user=group3;database=group3;port=3306;password=password3"; empConn = new MySqlConnection(connection); empDataAdapt = new MySqlDataAdapter(); empDataSet = new DataSet(); string sqlStatement = "SELECT * FROM group3.employees; UPDATE group3.employees SET Total_Hours = Daily_Hours * 5; UPDATE group3.employees SET Total_Pay = Total_Hours * Pay;"; sqlComm = new MySqlCommand(sqlStatement, empConn); sqlComm.Connection = empConn; empDataAdapt.SelectCommand = sqlComm; empDataAdapt.Fill(empDataSet, "employees"); EmployeesDataGrid.DataSource = empDataSet; EmployeesDataGrid.DataMember = "employees"; btnAddEmployee.Show(); } if (rdoBtnSales.Checked == true) { //display total sales amount for day //Take the user to Report Form (Testing Only) - AC Report reportForm = new Report(); reportForm.Show(); this.Hide(); } if (rdoBtnPass.Checked == true) { //need a manager security login form -rdl //update password for specific employee in same form -rdl //Open the UpdatePassword Interface - AC UpdatePassword resetPWInterface = new UpdatePassword(); resetPWInterface.Show(); this.Hide(); } }