Beispiel #1
0
    protected void Page_Load(object sender, EventArgs e)
    {
        try
        {
            HRMSServiceClient proxy = new HRMSServiceClient();
            List <Emplyoee>   list  = proxy.GetAllEmpForMe().ToList();
            GridView1.DataSource = list;
            GridView1.DataBind();
        }

        catch (FaultException <DivideByZeroException> ex)
        {
            Label4.Text = ex.Message;
        }
    }
Beispiel #2
0
    protected void Button2_Click(object sender, EventArgs e)
    {
        Emplyoee emp = new Emplyoee
        {
            Ecode  = int.Parse(TextBox1.Text),
            Ename  = TextBox2.Text,
            Salary = int.Parse(TextBox3.Text),
            Deptid = int.Parse(TextBox4.Text),
        };

        HRMSServiceClient proxy = new HRMSServiceClient();

        proxy.AddEmp(emp);
        List <Emplyoee> list = proxy.GetAllEmpForMe().ToList();

        GridView1.DataSource = list;
        GridView1.DataBind();
    }
Beispiel #3
0
 protected void Button3_Click(object sender, EventArgs e)
 {
     HRMSServiceClient proxy = new HRMSServiceClient();
 }