private void deleteBTN_Click(object sender, EventArgs e) { if (MetroMessageBox.Show(this, "Delete this record?", "Confirmation", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.No) { return; } newcallinclass a = new newcallinclass(this); a.deletecallin(tempcin); }
private void addBTN_Click(object sender, EventArgs e) { cleanCallINEntry(); newcallinclass a = new newcallinclass(this); a.addcallin(calldateTXT.Text, projectTXT.Text, addressTXT.Text, recipientTXT.Text, contactTXT.Text, emailTXT.Text, foilTXT.Text, screenTXT.Text, windowsTXT.Text, doorsTXT.Text, otherTXT.Text, datevisitedTXT.Text, assignedpersonnelTXT.Text); }
public void buttonsearchclick(Control objectname, string column) { objectname.Text = objectname.Text.Replace("'", "`"); objectname.Text = objectname.Text.Replace("\"", "``"); if (objectname.Text == "") { MetroMessageBox.Show(this, "Please enter " + column + " to search", "Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning); } else { CallinTableClass b = new CallinTableClass(this); newcallinclass a = new newcallinclass(this); string str = "select " + b.callintbcolumns + " from callintb where " + column + " like '%" + objectname.Text + "%' order by autonum desc"; a.loadsearchresult(str); } }
private void updateBTN_Click(object sender, EventArgs e) { cleanCallINEntry(); if (tempcin == "") { } else { if (MetroMessageBox.Show(this, "Save changes?", "Confirmation", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.No) { return; } newcallinclass a = new newcallinclass(this); a.updatecallin(tempcin, calldateTXT.Text, projectTXT.Text, addressTXT.Text, recipientTXT.Text, contactTXT.Text, emailTXT.Text, foilTXT.Text, screenTXT.Text, windowsTXT.Text, doorsTXT.Text, otherTXT.Text, datevisitedTXT.Text, assignedpersonnelTXT.Text); } }