Beispiel #1
0
        protected void btnDelete_Click(object sender, EventArgs e)
        {
            try
            {
                int ecode = int.Parse(txtEcode.Text);

                EmpServiceClient proxy = new EmpServiceClient();
                proxy.DeleteEmpById(ecode);
                lblMsg.Text = "Record deleted";

                GridView1.DataSource = proxy.GetAllEmps().ToList();
                GridView1.DataBind();
            }
            catch (FaultException <MyException> ex)
            {
                lblMsg.Text = ex.Message;
            }
        }