⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 userinfo.aspx.cs

📁 简单的cI真的是很简单 你想要就下载吧
💻 CS
字号:
using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using WebService;

public partial class UserInfo : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {

        int _orgID = int.Parse(Request.QueryString["OrgID"].ToString());//获取从TreeView单击组织ID
        ShowEmployeessInfo(_orgID);
    }

    public void ShowEmployeessInfo(int _OrgID)
    {
        VinciService vinciService = new VinciService();
        EmployeesEntity[] employeesEntity;
        employeesEntity = vinciService.GetEmployeessList(_OrgID);
        //循环查询每一个员工


        for (int i = 0; i < employeesEntity.Length; i++)
        {
            HtmlTableRow htmlTableRow = new HtmlTableRow();

            HtmlTableCell cell_EmployeeID = new HtmlTableCell();
            cell_EmployeeID.InnerText = employeesEntity[i].EmployeeID.ToString();
            htmlTableRow.Cells.Add(cell_EmployeeID);

            HtmlTableCell cell_LastName = new HtmlTableCell();
            cell_LastName.InnerText = employeesEntity[i].LastName;
            htmlTableRow.Cells.Add(cell_LastName);

            HtmlTableCell cell_FirstName = new HtmlTableCell();
            cell_FirstName.InnerText = employeesEntity[i].FirstName;
            htmlTableRow.Cells.Add(cell_FirstName);

            HtmlTableCell cell_Title = new HtmlTableCell();
            cell_Title.InnerText = employeesEntity[i].Title;
            htmlTableRow.Cells.Add(cell_Title);

            HtmlTableCell cell_BirthDate = new HtmlTableCell();
            cell_BirthDate.InnerText = employeesEntity[i].BirthDate.ToString();
            htmlTableRow.Cells.Add(cell_BirthDate);

            HtmlTableCell cell_HireDate = new HtmlTableCell();
            cell_HireDate.InnerText = employeesEntity[i].HireDate.ToString();
            htmlTableRow.Cells.Add(cell_HireDate);



            HtmlTableCell cell_Address = new HtmlTableCell();
            cell_Address.InnerText = employeesEntity[i].Address;
            htmlTableRow.Cells.Add(cell_Address);

            HtmlTableCell cell_City = new HtmlTableCell();
            cell_City.InnerText = employeesEntity[i].City;
            htmlTableRow.Cells.Add(cell_City);

            HtmlTableCell cell_ReportsTo = new HtmlTableCell();
            cell_ReportsTo.InnerText = employeesEntity[i].ReportsTo.ToString(); ;
            htmlTableRow.Cells.Add(cell_ReportsTo);

            HtmlTableCell cell_OrgID = new HtmlTableCell();
            cell_OrgID.InnerText = employeesEntity[i].OrgID.ToString();
            htmlTableRow.Cells.Add(cell_OrgID);

            HtmlTableCell cell_IsActive = new HtmlTableCell();
            cell_IsActive.InnerText = employeesEntity[i].IsActive.ToString();
            htmlTableRow.Cells.Add(cell_IsActive);


            HtmlTableCell cell_LoginName = new HtmlTableCell();
            cell_LoginName.InnerText = employeesEntity[i].LoginName;
            htmlTableRow.Cells.Add(cell_LoginName);

            HtmlTableCell cell_Notes = new HtmlTableCell();
            cell_Notes.InnerText = employeesEntity[i].Notes;
            htmlTableRow.Cells.Add(cell_Notes);

            HtmlTableCell cell_edit = new HtmlTableCell();
            cell_edit.InnerHtml = "<input id=btn_edit_" + employeesEntity[i].EmployeeID.ToString() + " type='button' value='编辑信息' />";
            htmlTableRow.Cells.Add(cell_edit);

            HtmlTableCell cell_delete = new HtmlTableCell();
            cell_delete.InnerHtml = "<input id=btn_delete_" + employeesEntity[i].EmployeeID.ToString() + " type='button' value='删除记录' />";
            htmlTableRow.Cells.Add(cell_delete);

            tb_employeeInfo.Rows.Add(htmlTableRow);
        }
    }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -