protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                DataTable dt = BoPhanController.BoPhan_GetAllActive();

                dropTrungTam.DataSource = dt;
                dropTrungTam.DataBind();

                dropTrungTamSearch.DataSource = dt;
                dropTrungTamSearch.DataBind();

                int id = ConvertUtility.ToInt32(Request.QueryString["idTrungTam"]);
                if (id > 0)
                {
                    dropTruongPhongBan.Items.Clear();
                    dropTruongPhongBan.DataSource = DotDanhGiaController.GetAllNhanVienCapTBP_TP_PP(id);
                    dropTruongPhongBan.DataBind();

                    dropTrungTam.SelectedValue = dropTrungTamSearch.SelectedValue = id.ToString();
                }
                else
                {
                    dropTruongPhongBan.Items.Clear();
                    dropTruongPhongBan.DataSource = DotDanhGiaController.GetAllNhanVienCapTBP_TP_PP(ConvertUtility.ToInt32(dropTrungTam.SelectedValue));
                    dropTruongPhongBan.DataBind();
                }
            }
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            idDotDanhGia = ConvertUtility.ToInt32(Request.QueryString["id"]);
            if (!Page.IsPostBack)
            {
                dropDotDanhGia.DataSource = DotDanhGiaController.GetAll(3);
                dropDotDanhGia.DataBind();
                int idDotDanhActive = ConvertUtility.ToInt32(DotDanhGiaController.GetDaultDotDanhGia().Rows[0]["ID"]);
                dropDotDanhGia.SelectedValue = idDotDanhActive.ToString();

                dropTrungTam.DataSource = BoPhanController.BoPhan_GetAllActive();
                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();

                dropNhanVien.Items.Clear();
                dropNhanVien.DataSource = DotDanhGiaController.GetAllNhanVienCapTBP_TP_PP(ConvertUtility.ToInt32(dropTrungTam.SelectedValue));
                dropNhanVien.DataBind();
            }
        }
        protected void dgrPhongBan_RowDataBound(object sender, GridViewRowEventArgs e)
        {
            if (e.Row.RowIndex < 0)
            {
                return;
            }

            DropDownList dropTruongPhong = (DropDownList)e.Row.FindControl("dropTruongPhong");

            dropTruongPhong.Items.Clear();

            DataRowView currData = (DataRowView)e.Row.DataItem;

            DataTable dtNhanVien = DotDanhGiaController.GetAllNhanVienCapTBP_TP_PP(ConvertUtility.ToInt32(dropTrungTamSearch.SelectedValue));

            dropTruongPhong.DataSource = dtNhanVien;
            dropTruongPhong.DataBind();

            try
            {
                dropTruongPhong.SelectedValue = currData["IDNhanVienTruongPhong"].ToString();
            }
            catch (Exception)
            {
                dropTruongPhong.SelectedIndex = -1;
            }
        }
 protected void dropTrungTam_SelectedIndexChanged(object sender, EventArgs e)
 {
     dropNhanVien.Items.Clear();
     dropNhanVien.DataSource = DotDanhGiaController.GetAllNhanVienCapTBP_TP_PP(ConvertUtility.ToInt32(dropTrungTam.SelectedValue));
     dropNhanVien.DataBind();
 }