private void bp_planning_Click(object sender, EventArgs e) { Planning planning = new Planning(user); planning.Show(); this.Close(); }
private void buttonReturn_Click(object sender, EventArgs e) { int mechanic = -1; int state; switch (task.state) { case "To Do": state = 1; break; case "In Production": state = 2; break; case "Done": state = 3; break; case "Delay": state = 4; break; default: state = 1; break; } for (int i = 0; i < userTable.Rows.Count; i++) { if (userTable.Rows[i]["userName"] == comboBoxMechanic.SelectedItem) { mechanic = (int)userTable.Rows[i]["id"]; } } DBConnection.ModifyTask(state, task.id, mechanic); if (state == 3 && canUpdateStock) { EditSockPartsAmount(); } Planning planning = new Planning(user); planning.Show(); this.Close(); }