protected void Page_Load(object sender, EventArgs e) { User u = (User)Session["UserEntity"]; if (u == null || u.RoleId != 5) { Response.Redirect("../Security.aspx"); } if (!IsPostBack) { //User userbean = (User)Session["UserEntity"]; //Supervisor.Text = "Hello," + userbean.Name; List <Department> listDepartment = df.GetDepName(); DropDownListDepartment.DataSource = listDepartment; DropDownListDepartment.DataTextField = "deptName"; DropDownListDepartment.DataValueField = "deptName"; DropDownListDepartment.DataBind(); List <RequestItem> listCategary = rif.GetCategoryName(); DropDownListCategory.DataSource = listCategary; DropDownListCategory.DataTextField = "CategoryName"; DropDownListCategory.DataValueField = "CategoryName"; DropDownListCategory.DataBind(); } }
public void GetDepName() { List <Department> l = departmentFacade.GetDepName(); Assert.IsNotNull(l); }