示例#1
0
 protected void ChangeUser(object sender, EventArgs e)
 {
     OrgServiceClient client = new OrgServiceClient();
     Session["user"] = client.GetEmployee(this.ddlConnectAs.SelectedValue);
     this.currentUser = (Employee)Session["user"];
     client.Close();
     this.ConfigureInboxTables();
 }
示例#2
0
        // get the name and id of the employee
        string GetEmployeeName(string employeeId)
        {
            OrgServiceClient client = new OrgServiceClient();
            Employee         emp    = client.GetEmployee(employeeId);

            client.Close();
            return(string.Format("{0} - {1}", emp.Id, emp.Name));
        }
示例#3
0
        protected void ChangeUser(object sender, EventArgs e)
        {
            OrgServiceClient client = new OrgServiceClient();

            Session["user"]  = client.GetEmployee(this.ddlConnectAs.SelectedValue);
            this.currentUser = (Employee)Session["user"];
            client.Close();
            this.ConfigureInboxTables();
        }
示例#4
0
        void BindEmployees()
        {
            OrgServiceClient client = new OrgServiceClient();

            IList <Employee> employees = client.GetAllEmployees().OrderBy(e => e.Name).ToList();

            foreach (Employee employee in employees)
            {
                this.ddlConnectAs.Items.Add(new ListItem(string.Format("{0} - {1} ({2} - {3})", employee.Id, employee.Name, employee.Position.Name, employee.Department.Name), employee.Id));
            }

            if (currentUser != null)
            {
                this.ddlConnectAs.Items.FindByValue(currentUser.Id).Selected = true;
            }
            else
            {
                Session["user"]  = client.GetEmployee(ddlConnectAs.SelectedItem.Value);
                this.currentUser = (Employee)Session["user"];
            }

            client.Close();
        }
示例#5
0
        void BindEmployees()
        {
            OrgServiceClient client = new OrgServiceClient();

            IList<Employee> employees = client.GetAllEmployees().OrderBy(e => e.Name).ToList();

            foreach (Employee employee in employees)
            {
                this.ddlConnectAs.Items.Add(new ListItem(string.Format("{0} - {1} ({2} - {3})", employee.Id, employee.Name, employee.Position.Name, employee.Department.Name), employee.Id));
            }

            if (currentUser != null)
            {
                this.ddlConnectAs.Items.FindByValue(currentUser.Id).Selected = true;
            }
            else
            {
                Session["user"] = client.GetEmployee(ddlConnectAs.SelectedItem.Value);
                this.currentUser = (Employee)Session["user"];
            }

            client.Close();
        }
 // get the name and id of the employee
 string GetEmployeeName(string employeeId)
 {
     OrgServiceClient client = new OrgServiceClient();
     Employee emp = client.GetEmployee(employeeId);
     client.Close();
     return string.Format("{0} - {1}", emp.Id, emp.Name);
 }