private void button2_Click(object sender, EventArgs e) { ServCon mnginput; mnginput = new ServCon(); string managerID = mngID.Text; string mngfname = fnamebox.Text; string mnglname = lnamebox.Text; string SQLcommand = "insert into manager values(" + managerID + ",'" + mngfname + "','" + mnglname + "')"; mnginput.execute(SQLcommand); }
private void Update_Click(object sender, EventArgs e) { ServCon mnginput; mnginput = new ServCon(); string managerID = mngID.Text; string mngfname = fnamebox.Text; string mnglname = lnamebox.Text; string SQLcommand = "update login set username = '******', lastname = '" + mnglname + "' where mngID = " + managerID; mnginput.modify(SQLcommand); MessageBox.Show("The Information has been Updated", "Query Successful"); }
private void CustomerData_Load(object sender, EventArgs e) { Cname.Text = User.person(); ServCon custout; int check = User.clrnce(); custout = new ServCon(); //if(User.clrnce() == 3) //{ string command = "select * from customer where cstusername = '******'"; string[] results = custout.query(command); int i = 0; while (results[i] != null) { custdat.Items.Add(results[i]); i++; } //} }