protected void lbtnDelete_Click(object sender, EventArgs e)
        {
            List <object> fieldValues = ASPxGridView1_ProductDetail.GetSelectedFieldValues(new string[] { "ID" });

            foreach (var item in fieldValues)
            {
                _ProductDetailRepo.Remove(Utils.CIntDef(item));
            }
            Response.Redirect("danh-sach-san-pham-chi-tiet.aspx");
        }
        private void LoadProductDetail()
        {
            try
            {
                var list = _ProductDetailRepo.GetListByProductIdAndContainsAll(Utils.CIntDef(ddlProduct.SelectedValue), txtKeyword.Value);

                HttpContext.Current.Session["listProductDetail"] = list;
                ASPxGridView1_ProductDetail.DataSource           = list;
                ASPxGridView1_ProductDetail.DataBind();
            }
            catch //(Exception)
            {
                //throw;
            }
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            bool isPermission = _UnitDataRepo.checkPermissionPage("danh-sach-san-pham-chi-tiet.aspx", Utils.CIntDef(Session["groupId"]), Utils.CIntDef(Session["groupType"]));

            if (!isPermission)
            {
                Response.Write("<script>alert('Bạn không có quyền truy cập vào trang này');location.href='trang-chu.aspx';</script>");
            }
            id = Utils.CIntDef(Request.QueryString["id"]);
            if (!IsPostBack)
            {
                LoadProduct();
                LoadProductDetail();
            }
            else
            {
                ASPxGridView1_ProductDetail.DataSource = HttpContext.Current.Session["listProductDetail"];
                ASPxGridView1_ProductDetail.DataBind();
            }
        }