示例#1
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         employeeTable Antonio = eBLL.getEEinfoById(1);
         if (Antonio.employeeID == 0)
         {
             testInsert();
         }
     }
 }
示例#2
0
 protected void GridPhoto_ItemDataBound(object sender, GridItemEventArgs e)
 {
     if (e.Item is GridDataItem)
     {
         GridDataItem item = e.Item as GridDataItem;
         Button       btn  = item["Delete"].Controls[0] as Button;
         btn.Enabled = isEditable;
         int roleId, userId;
         if (int.TryParse(item["roleID"].Text, out roleId) && int.TryParse(item["userID"].Text, out userId))
         {
             if (roleId == 1)
             {
                 item["roleID"].Text = "管理员";
                 employeeTable ee = eeBLL.getEEinfoById(userId);
                 item["userID"].Text = ee.employeeName;
             }
             else
             {
                 item["roleID"].Text = "维修人员";
                 repairmanTable rm = rmBLL.getRMinfoById(userId);
                 item["userID"].Text = rm.repairmanName;
             }
         }
     }
 }