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


C# Report.GetUsers方法代码示例

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


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

示例1: GetUserDetails

        private void GetUserDetails(int sort,string Location)
        {
            try
            {
                Attendance.BAL.Report obj = new Report();

                DataTable dt = obj.GetUsers(Location.Trim(), sort);
                Session["AllusersData"] = dt;
                if (dt.Rows.Count > 0)
                {
                    
                    if (sort == 0)
                    {
                        lblTotal.Text = "Total employee: " + dt.Rows[0]["TotalCount"].ToString() + " " + " " + " " + " " + "Active employee: " + dt.Rows[0]["ActiveCount"].ToString() + " " + " " + " " + " " + "Incative employee: " + dt.Rows[0]["InactiveCount"].ToString();
                    }
                    else if (sort == 1)
                    {
                        lblTotal.Text = "Total employee: " + dt.Rows[0]["TotalCount"].ToString() + " " + " " + " " + " " + "Active employee: " + dt.Rows[0]["ActiveCount"].ToString() + " " + " " + " " + " " + "Incative employee: " + dt.Rows[0]["InactiveCount"].ToString();
                    }
                    else
                    {
                        lblTotal.Text = "Total employee: " + dt.Rows[0]["TotalCount"].ToString() + " " + " " + " " + " " + "Active employee: " + dt.Rows[0]["ActiveCount"].ToString() + " " + " " + " " + " " + "Incative employee: " + dt.Rows[0]["InactiveCount"].ToString();
                    }
                    grdUsers.DataSource = dt;
                    grdUsers.DataBind();

                    BizUtility.GridSortInitail("Ascending", "Firstname", grdUsers, 0, dt);
                }
            }
            catch (Exception ex)
            {
            }
        }
开发者ID:kamaelyoung,项目名称:HR.bizstrides,代码行数:33,代码来源:AdminUserManagement.aspx.cs

示例2: GetUserDetails

        private void GetUserDetails(int sort,int shiftID)
        {
            try
            {
                Attendance.BAL.Report obj = new Report();

                DataTable dt = obj.GetUsers(Session["LocationName"].ToString().Trim(), sort,shiftID);
                Session["AllusersData"] = dt;
                if (dt.Rows.Count > 0)
                {
                  //  Total employee: 30 Active employee: 25 Incative employee: 5
                    if(sort==0)
                    {
                        lblTotal.Text = "Total employee: " + dt.Rows[0]["TotalCount"].ToString() + " " + " " + " " + " " + "Active employee: " + dt.Rows[0]["ActiveCount"].ToString() +" "+" "+" "+" "+"Incative employee: " + dt.Rows[0]["InactiveCount"].ToString();
                    }
                    else if (sort ==1)
                    {
                        lblTotal.Text = "Total employee: " + dt.Rows[0]["TotalCount"].ToString() + " " + " " + " " + " " + "Active employee: " + dt.Rows[0]["ActiveCount"].ToString() +" "+" "+" "+" "+"Incative employee: " + dt.Rows[0]["InactiveCount"].ToString();
                    }
                    else
                    {
                        lblTotal.Text = "Total employee: " + dt.Rows[0]["TotalCount"].ToString() + " " + " " + " " + " " + "Active employee: " + dt.Rows[0]["ActiveCount"].ToString() +" "+" "+" "+" "+"Incative employee: " + dt.Rows[0]["InactiveCount"].ToString();
                    }
                    grdUsers.DataSource = dt;
                    grdUsers.DataBind();
                    lblGrdNodata.Text = "";
                    dvNodata.Style["display"] = "none";

                    BizUtility.GridSortInitail("Ascending", "Firstname", grdUsers, 0, dt);
                }
                else
                {
                    lblTotal.Text = "";
                    lblGrdNodata.Text = "No data found";
                    dvNodata.Style["display"] = "block";
                    grdUsers.DataSource = null;
                    grdUsers.DataBind();
                }
            }
            catch (Exception ex)
            {
            }
        }
开发者ID:hugo-mirad,项目名称:test-hr-live,代码行数:43,代码来源:UserManagement.aspx.cs


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