protected void Page_Load(object sender, EventArgs e) { if (VerifyUtility.IsNumber_NotNull(Request["AdminUser_ID"])) AdminUser_ID = Convert.ToInt32(Request["AdminUser_ID"]); b_AdminUser = new BLL.AdminUser(); e_AdminUser = b_AdminUser.Select_AdminUser(AdminUser_ID); if (!Page.IsPostBack) { if (AdminUser_ID == 0) { AdminUser_PassWord_TD.Visible = false; AdminUser_Status_TD.ColSpan = 2; AdminUser_AddTime.Visible = false; } else { if (e_AdminUser != null) { AdminUser_Name.Text = e_AdminUser.AdminUser_Name; AdminUser_NickName.Text = e_AdminUser.AdminUser_NickName; if (e_AdminUser.AdminUser_Status == 0) { AdminUser_Status1.Checked = true; AdminUser_Status2.Checked = false; } AdminUser_AddTime.InnerHtml += e_AdminUser.AdminUser_AddTime.ToString(); AdminUser_Submit.Text = " 修改 "; } } } }
private Entity.AdminUser GetAdminUser(int p_AdminUser_ID) { if (p_AdminUser_ID <= 0) return null; BLL.AdminUser b_AdminUser = new BLL.AdminUser(); Entity.AdminUser e_AdminUser = b_AdminUser.Select_AdminUser(p_AdminUser_ID); return e_AdminUser; }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { BLL.AdminUser b_AdminUser = new BLL.AdminUser(); Entity.AdminUser[] e_AdminUser = b_AdminUser.Select_AdminUser(g_AdminUser); if (e_AdminUser != null) { int i = 1; foreach (Entity.AdminUser o_AdminUser in e_AdminUser) { HtmlTableRow o_HtmlTableRow = new HtmlTableRow(); HtmlTableCell o_HtmlTableCell; HtmlAnchor o_HtmlAnchor; o_HtmlAnchor = new HtmlAnchor(); o_HtmlAnchor.HRef = "#"; o_HtmlAnchor.Attributes.Add("onclick", "window.open('AdminUser_Detail.aspx?AdminUser_ID=" + o_AdminUser.AdminUser_ID.ToString() + "','AdminUser','toolbar=no,menubar=no,location=no,status=no,resizable=yes,scrollbars=yes,width=680px,height=510px');return false;"); o_HtmlAnchor.Attributes.Add("class", "AdminToolsLink2"); o_HtmlAnchor.InnerText = i.ToString(); o_HtmlTableCell = new HtmlTableCell(); o_HtmlTableCell.Controls.Add(o_HtmlAnchor); o_HtmlTableRow.Controls.Add(o_HtmlTableCell); o_HtmlTableCell = new HtmlTableCell(); o_HtmlTableCell.InnerText = o_AdminUser.AdminUser_Name; o_HtmlTableRow.Controls.Add(o_HtmlTableCell); o_HtmlTableCell = new HtmlTableCell(); o_HtmlTableCell.InnerText = o_AdminUser.AdminUser_NickName; o_HtmlTableRow.Controls.Add(o_HtmlTableCell); o_HtmlTableCell = new HtmlTableCell(); if (o_AdminUser.AdminUser_Status == 0) o_HtmlTableCell.InnerText = "管理员"; else o_HtmlTableCell.InnerText = "普通用户"; o_HtmlTableRow.Controls.Add(o_HtmlTableCell); o_HtmlTableCell = new HtmlTableCell(); o_HtmlTableCell.InnerText = o_AdminUser.AdminUser_AddTime.ToString(); o_HtmlTableRow.Controls.Add(o_HtmlTableCell); o_HtmlAnchor = new HtmlAnchor(); o_HtmlAnchor.HRef = "AdminUser_Delete.aspx?AdminUser_ID=" + o_AdminUser.AdminUser_ID.ToString(); o_HtmlAnchor.Attributes.Add("class", "AdminToolsLink2"); o_HtmlAnchor.InnerText = "删除"; o_HtmlTableCell = new HtmlTableCell(); o_HtmlTableCell.Controls.Add(o_HtmlAnchor); o_HtmlTableRow.Controls.Add(o_HtmlTableCell); o_HtmlTableRow.Align = "center"; o_HtmlTableRow.Height = "30"; g_MainTable.Rows.Add(o_HtmlTableRow); i++; } } } }
private void GetAdminUser(Entity.AdminUser p_AdminUser) { Booking_AdminUser_ID.Items.Clear(); if (p_AdminUser == null) return; BLL.AdminUser b_AdminUser = new BLL.AdminUser(); Entity.AdminUser[] e_AdminUser = b_AdminUser.Select_AdminUser(); if (e_AdminUser != null) { foreach (Entity.AdminUser o_AdminUser in e_AdminUser) { ListItem o_ListItem = new ListItem(o_AdminUser.AdminUser_Name + " " + o_AdminUser.AdminUser_NickName, o_AdminUser.AdminUser_ID.ToString()); if (o_AdminUser.AdminUser_ID == p_AdminUser.AdminUser_ID) o_ListItem.Selected = true; Booking_AdminUser_ID.Items.Add(o_ListItem); } } }