protected void Button4_Click(object sender, EventArgs e) { DeleteUser d = new DeleteUser(); d.UID = int.Parse(txtuid.Text); string res = client.Delete(d); lblmsg.Text = res.ToString(); }
protected void Button4_Click(object sender, EventArgs e) { if (txtuid.Text.Equals("")) { lblmsg.Text = "UserID is Empty"; } else { DeleteUser d = new DeleteUser(); d.UID = int.Parse(txtuid.Text); string res = client.Delete(d); lblmsg.Text = res.ToString(); } }
protected void btDelete_Click(object sender, EventArgs e) { GetTestData g = new GetTestData(); SqlConnection con = new SqlConnection("Data Source=DESKTOP-KT69I3S;Initial Catalog=WCFService;Persist Security Info=True;User ID=sa;Password=ifan99"); con.Open(); DeleteUser d = new DeleteUser(); d.UID = int.Parse(TextBoxID.Text); string res = client.Delete(d); lblmsgInsert.Text = res.ToString(); con.Close(); TextBoxID.Text = ""; TextBoxName.Text = ""; TextBoxEmail.Text = ""; }