本文整理汇总了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)
{
}
}
示例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)
{
}
}