Beispiel #1
0
    public WCFEmployee findCurrentRepresentative(string headid)
    {
        int         head       = Convert.ToInt32(headid);
        Employee    current    = dhmanager.getDepartmentRepresentative(head);
        WCFEmployee wcfcurrent = WCFEmployee.Make(current.employeecode, current.employeename, current.employeeemail, current.deptcode, current.role, current.del);

        return(wcfcurrent);
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        IIdentity id = User.Identity;

        headcode = Convert.ToInt32(User.Identity.Name);
        e1       = d.getDepartmentRepresentative(headcode);
        if (!IsPostBack)
        {
            List <Employee> elist = d.PopulateEmpList(headcode);
            DropDownList1.DataSource     = elist;
            DropDownList1.DataTextField  = "employeename";
            DropDownList1.DataValueField = "employeecode";
            DropDownList1.DataBind();

            Label1.Text = e1.employeename;
        }
    }