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


C# DBFunctions.getallemployee方法代码示例

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


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

示例1: DropDowndepartment_SelectedIndexChanged

    protected void DropDowndepartment_SelectedIndexChanged(object sender, EventArgs e)
    {
        DBFunctions db = new DBFunctions();
        if(DropDowndepartment.SelectedValue==""){
            return;
        }
        int deptid=int.Parse(DropDowndepartment.SelectedValue);
           var programs = db.getprogramslist().Where(x => x.DeptID == deptid).ToList();
        Program_tbl prgrm=new Program_tbl{ProgramName="Select Programme"};
        programs.Add(prgrm);
        DropDownprogramme.DataSource = programs.OrderBy(x=>x.ID);
        DropDownprogramme.DataTextField = "ProgramName";
        DropDownprogramme.DataValueField = "ID";
        DropDownprogramme.DataBind();

        DropDownteacher.DataSource = db.getallemployee(0, db.getemployee_count(deptid), deptid);
        DropDownteacher.DataTextField = "Name";
        DropDownteacher.DataValueField = "ID";
        DropDownteacher.DataBind();
    }
开发者ID:EezeSolutions,项目名称:Higher_Erp,代码行数:20,代码来源:AssignCourseToEmplloyee.aspx.cs

示例2: loademployees

    private void loademployees()
    {
       
      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<Employee_tbl> employees = new List<Employee_tbl>();
      if (Request.QueryString["dept"] == null || Request.QueryString["dept"]=="All")
      {
          
          employees = db.getallemployee(page - 1, pageSize, 0);
          pageEnd = db.getemployee_count(0);
      }
      else
      {

          int deptid = int.Parse(Request.QueryString["dept"]);
          employees = db.getallemployee(page - 1, pageSize, deptid);
          pageEnd = db.getemployee_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);
      
    }
开发者ID:EezeSolutions,项目名称:Higher_Erp,代码行数:67,代码来源:ManageEmployee.aspx.cs

示例3: DropDowndepartment_SelectedIndexChanged

    protected void DropDowndepartment_SelectedIndexChanged(object sender, EventArgs e)
    {
        DBFunctions db = new DBFunctions();
        List<Employee_tbl> emp=new List<Employee_tbl>();
            int pageStart = 1;
            int pageEnd = 10;
        if (DropDowndepartment.SelectedValue != "All")
        {
            int deptid = int.Parse(DropDowndepartment.SelectedValue);
            emp = db.getallemployee(0, 10,deptid);
            renderemployees(emp);
            pageEnd = db.getemployee_count(deptid);
        }
        else
        {
             emp = db.getallemployee(0, 10,0);
            renderemployees(emp);
            pageEnd = db.getemployee_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);

    }
开发者ID:EezeSolutions,项目名称:Higher_Erp,代码行数:39,代码来源:ManageEmployee.aspx.cs


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