Example #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                dropNhom.DataSource = NhomController.GetAll();
                dropNhom.DataBind();
                dropNhom.Items.Insert(0, new ListItem("----------Lựa chọn----------", "0"));

                dropXepLoai.DataSource = XepLoaiController.GetAll();
                dropXepLoai.DataBind();
                dropXepLoai.Items.Insert(0, new ListItem("----------Lựa chọn----------", "0"));
            }
        }
Example #2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                dropTrungTam.DataSource = BoPhanController.GetAll();
                dropTrungTam.DataBind();
                dropTrungTam.Items.Insert(0, new ListItem("Tất cả", "0"));

                if (!CurrentUser.IsAdmin && !CurrentUser.IsSuperAdmin)
                {
                    dropTrungTam.Enabled       = false;
                    dropTrungTam.SelectedValue = CurrentUser.IDTrungTam.ToString();
                }

                dropNhom.DataSource = NhomController.GetAll();
                dropNhom.DataBind();
                dropNhom.SelectedValue = "2";
                dropPortal.Items.Clear();
                PortalController.LoadPortals(dropPortal.Items);
            }
        }