当前位置: 首页>>代码示例>>C#>>正文


C# Display.DisplayDepartmentName方法代码示例

本文整理汇总了C#中Display.DisplayDepartmentName方法的典型用法代码示例。如果您正苦于以下问题:C# Display.DisplayDepartmentName方法的具体用法?C# Display.DisplayDepartmentName怎么用?C# Display.DisplayDepartmentName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Display的用法示例。


在下文中一共展示了Display.DisplayDepartmentName方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Page_Load


//.........这里部分代码省略.........

        string start_date = dt.getSAPStartPeriodDate(month, year);
        string end_date = dt.getSAPEndPeriodDate(month, year);

        StartDateOfPeriod = start_date;
        EndDateOfPeriod = end_date;
        //Response.Write(start_date + end_date);

        Label lb = new Label();
        lb.Text = disp.DisplayDaysTabel(count_days, 18);
        days.Controls.Add(lb);

        //Response.Write(start_date + end_date);
        //Period period_time = perdb.getPeriod(Convert.ToInt32(month), Convert.ToInt32(year));

        setButtons(role);

        //Response.Write(start_date + "-" + end_date + "<br>");

        this.employees = null;/// db.getEmployeeList(start_date, end_date, user.TabNum, this.role);
        EmployeeList emp_list = new EmployeeList();
        List<Post> post_list = null;/// pl.getPosts(db.getPostList(start_date, end_date, user.TabNum, this.role));
        if (post_list != null)
        {
            fillPosts(post_list);
        }
        else
        {
            ListItem li = new ListItem("�������� ���������");
            ddl_post.Items.Add(li);
        }

        /*if (post != "")
        {
            if (post != "���")
            {
                EmployeeList empl = new EmployeeList();
               // this.employees = empl.getEmployeesOnCurrentPost(post, employees);

            }
        }

        if (fio != "")
        {
            EmployeeList emp_fio = new EmployeeList();
            this.employees = emp_fio.getEmployeesByFIO(fio, employees);
        }

        if (tab_number != "")
        {
            EmployeeList emp_tab = new EmployeeList();
            this.employees = emp_tab.getEmployeesByTab(tab_number, employees);
        }*/

        if (check)
        {
            EmployeeList emp_check = new EmployeeList();
            /////this.employees = emp_check.getWrongCheckedEmployees(employees, count_days, hours, overhours);
        }

        if (employees != null)
        {

            DepartmentList department_list = new DepartmentList();
            List<Department> departments = department_list.getDepartments(employees);

            foreach (Department dep in departments)
            {

                Label depart = new Label();
                depart.Text = disp.DisplayDepartmentName(dep.DepartmentName, dep.DepartmentID, StartDateOfPeriod);
                content.Controls.Add(depart);

                Label lbEmps = new Label();
                lbEmps.Text = "<div  id='" + dep.DepartmentID + "' style='display:none'>";

                // �������� ���� �������� ��� �������� ��������
                /*EmployeeList emp_list = new EmployeeList();
                List<Employee> emps = emp_list.getEmployeesOfDepartment(dep.DepartmentID, employees);
                EmployeeComparerByPostASC cmpByPostASC = new EmployeeComparerByPostASC();
                emps.Sort(cmpByPostASC);
                //for (int j = 0; j < 100; j++)
                foreach (Employee em in emps)
                {
                    lbEmps.Text += "<table cellpadding='0' cellspacing='0' border='0' class='employee'><tr><td class='main_info_left_no'>&nbsp</td><td class='employee_post'>" + em.Post + "</td><td class='employee_id'>" + em.EmployeeID + "</td><td class='employee_name'><img src='App_Resources/person.gif' style='cursor: hand; cursor: pointer;'>&nbsp<span style='cursor: hand; cursor: pointer;'  onclick='window.open(\"" + getCardUrl(em.EmployeeID) +"\",\"displayWindow\",\"menubar=no,width=800,height=600,resizable=yes,scrollbars=yes\")'>" + em.FullName + "</span></td><td class='employee_grid_line_center'>&nbsp;</td><td>" + disp.DisplaySchedules(count_days, 18, em.EmployeeID, dep.DepartmentID, hours, overhours, em.Schedule, em.ScheduleDeflection, role, check, closed) + "</td><td class='main_info_right_no'></td></tr></table>";

                }*/
                lbEmps.Text += "</div>";
                content.Controls.Add(lbEmps);

            }

        }

        // ajax �� �������� ������ ����������� ������������� �������������
        string cbReference = Page.ClientScript.GetCallbackEventReference(this, "arg", "ClientCallback", "context");
        string func_name = "FillEmployeesCallback";
        string cbScript = "function " + func_name + "(arg, context)" + "{" + cbReference + ";" + "}";
        Page.ClientScript.RegisterClientScriptBlock(this.GetType(), func_name, cbScript, true);
    }
开发者ID:ROLF-IT-Department,项目名称:timeboard,代码行数:101,代码来源:Tabel.aspx.cs


注:本文中的Display.DisplayDepartmentName方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。