protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { Position_BAL objImpl = new Position_BAL(); litList.Text = objImpl.GetHTML(); } }
protected void Page_Load(object sender, EventArgs e) { try { EmployeeID = int.Parse(Request.Params["Id"]); } catch (Exception) { } if (!IsPostBack) { Subject_BAL objSubject_DAL = new Subject_BAL(); foreach (DataRow row in objSubject_DAL.GetAll().Rows) { ListItem item = new ListItem(row["SubjectName"].ToString(), row["SubjectID"].ToString()); item.Attributes["OptionGroup"] = row["DepartmentName"].ToString(); ddlSubject.Items.Add(item); } ddlSubject.Items.Insert(0, new ListItem("----Chọn---", "-1")); ddlSubject.DataBind(); Position_BAL objPosition_BAL = new Position_BAL(); ddlPosition.DataSource = objPosition_BAL.GetAll(); ddlPosition.DataTextField = "PositionName"; ddlPosition.DataValueField = "PositionID"; ddlPosition.DataBind(); ddlPosition.Items.Insert(0, new ListItem("----Chọn---", "-1")); if (EmployeeID > 0) { lblTitle.Text = "Sửa thông tin giảng viên"; } else { lblTitle.Text = "Thêm mới thông tin giảng viên"; } loadEntity(); } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { Subject_BAL objSubject_DAL = new Subject_BAL(); foreach (DataRow row in objSubject_DAL.GetAll().Rows) { ListItem item = new ListItem(row["SubjectName"].ToString(), row["SubjectID"].ToString()); item.Attributes["OptionGroup"] = row["DepartmentName"].ToString(); ddlSubject.Items.Add(item); } ddlSubject.Items.Insert(0, new ListItem("----Tất cả---", "-1")); ddlSubject.DataBind(); Position_BAL objPosition_BAL = new Position_BAL(); ddlPosition.DataSource = objPosition_BAL.GetAll(); ddlPosition.DataTextField = "PositionName"; ddlPosition.DataValueField = "PositionID"; ddlPosition.DataBind(); ddlPosition.Items.Insert(0, new ListItem("----Tất cả---", "-1")); loadData(); } }