本文整理汇总了C#中DBFunctions.getemployeePay_count方法的典型用法代码示例。如果您正苦于以下问题:C# DBFunctions.getemployeePay_count方法的具体用法?C# DBFunctions.getemployeePay_count怎么用?C# DBFunctions.getemployeePay_count使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DBFunctions
的用法示例。
在下文中一共展示了DBFunctions.getemployeePay_count方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: loademployeespays
public void loademployeespays(){
int pageStart = 1;
int pageEnd = 10;
if (Request.QueryString.ToString().Contains("page"))
{
page = Convert.ToInt32(Request.QueryString["page"].ToString());
pageEnd = pageSize * page;
pageStart = (pageEnd - pageSize) + 1;
}
literalStart.Text = pageStart.ToString();
literalEnd.Text = pageEnd.ToString();
DBFunctions db = new DBFunctions();
List<EmployeePay_tbl> employees = new List<EmployeePay_tbl>();
if (Request.QueryString["dept"] == null || Request.QueryString["dept"] == "All")
{
employees = db.getallemployee_pay(page - 1, pageSize,0);
pageEnd = db.getemployeePay_count(0);
}
else
{
int deptid = int.Parse(Request.QueryString["dept"]);
employees = db.getallemployee_pay(page - 1, pageSize,deptid);
pageEnd = db.getemployeePay_count(deptid);
DropDowndepartment.SelectedValue = deptid.ToString();
}
if (pageEnd > 10)
{
literalTotal.Text = pageEnd.ToString();
int pagett = 0;
pagett = Convert.ToInt16(literalEnd.Text);
if (pagett > pageEnd)
{
literalEnd.Text = pageEnd.ToString();
}
}
else
{
if (pageEnd == 0)
{
literalStart.Text = "";
}
literalTotal.Text = pageEnd.ToString();
literalEnd.Text = pageEnd.ToString();
}
string tmpUrl = string.Empty;
tmpUrl = "ManageEmployees.aspx?" + Request.QueryString.ToString();
if (tmpUrl.Contains("?page"))
{
tmpUrl = tmpUrl.Remove(tmpUrl.IndexOf("?page"));
}
StringBuilder listingString = new StringBuilder();
renderemployees(employees);
setpaging(pageEnd);
}
示例2: DropDowndepartment_SelectedIndexChanged
protected void DropDowndepartment_SelectedIndexChanged(object sender, EventArgs e)
{
DBFunctions db = new DBFunctions();
List<EmployeePay_tbl> emp = new List<EmployeePay_tbl>();
int pageStart = 1;
int pageEnd = 10;
if (DropDowndepartment.SelectedValue != "All")
{
int deptid = int.Parse(DropDowndepartment.SelectedValue);
emp = db.getallemployee_pay(0, 10, deptid);
renderemployees(emp);
pageEnd = db.getemployeePay_count(deptid);
}
else
{
emp = db.getallemployee_pay(0, 10, 0);
renderemployees(emp);
pageEnd = db.getemployeePay_count(0);
}
//if (Request.QueryString.ToString().Contains("page"))
//{
//page = Convert.ToInt32(Request.QueryString["page"].ToString());
// pageEnd = pageSize * page;
int total = pageEnd;
pageStart = (pageSize * page - pageSize) + 1;
// pageEnd = db.getemployee_count(0);
//}
literalStart.Text = pageStart.ToString();
if (pageEnd > 10)
{
pageEnd = pageSize * page;
}
literalEnd.Text = pageEnd.ToString();
literalTotal.Text = total.ToString();
setpaging(total);
}