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

            EmpServiceClient proxy  = new EmpServiceClient();
            Employee         record = proxy.GetEmpById(ecode);

            TxtEname.Text  = record.Ename;
            txtSalary.Text = record.Salary.ToString();
            txtDeptid.Text = record.Deptid.ToString();
        }
Beispiel #2
0
    protected void btnemployeebyid_Click(object sender, EventArgs e)
    {
        EmpServiceClient proxy = new EmpServiceClient("BasicHttpBinding_IEmpService");
        var Ecode = int.Parse(txtecode.Text);
        var a     = proxy.GetEmpById(Ecode);

        txtename.Text        = a.Ename.ToString();
        txtsalary.Text       = a.salary.ToString();
        txtdeptid.Text       = a.deptid.ToString();
        GridView1.DataSource = proxy.GetAllEmps().ToList();
        GridView1.DataBind();
    }