private void changeFlowerSubmit_Click(object sender, EventArgs e) { // can't change latin name, as it's used to find the id //string changedLatinName = latinNameEntryBox.Text; string changedEnglishName = englishNameEntryBox.Text; string changedLatinName = latinNameEntryBox.Text; string changedBotanicalFam = botanicalFamEntryBox.Text; string changedNote = noteEntryBox.Text; string changedImgPath = imgPathView.Text; ChangeFlowerCtlr changeFlowerCtlrReference = new ChangeFlowerCtlr(copyOfFlowerId); // begin the checking of the database for an existing entry with these parameters string msgToDisplay = changeFlowerCtlrReference.verifyFlower(changedEnglishName, changedLatinName, changedBotanicalFam, changedNote, changedImgPath); englishNameEntryBox.Text = ""; latinNameEntryBox.Text = ""; botanicalFamEntryBox.Text = ""; noteEntryBox.Text = ""; imgPathView.Text = ""; MessageBox.Show(msgToDisplay); }
private void flowerProfileChangeFlowerBtn_Click(object sender, EventArgs e) { // only execute the code for the Change Flower event handler if the user is a Researcher or Admin if ((userAcctType == 2) || (userAcctType == 3)) { // have to pass along the displayed flower's primary key when displaying the Change Flower GUI // in order to change the attributes for the correct flower in the database ChangeFlowerCtlr ctlrToChangeFlower = new ChangeFlowerCtlr(primaryKey); ctlrToChangeFlower.displayChangeFlowerGUI(userAcctType); this.Hide(); } else { MessageBox.Show("Must be a researcher or administrator to use this feature."); } }