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

            foreach (var item in fieldValues)
            {
                _TypeRepo.Remove(Utils.CIntDef(item));
            }
            Response.Redirect("loai-hang.aspx");
        }
        private void LoadType()
        {
            try
            {
                var list = _TypeRepo.GetAll();

                HttpContext.Current.Session["listType"] = list;
                ASPxGridView1_Type.DataSource           = list;
                ASPxGridView1_Type.DataBind();
            }
            catch //(Exception)
            {
                //throw;
            }
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            bool isPermission = _UnitDataRepo.checkPermissionPage("loai-hang.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)
            {
                LoadInfo();
                LoadType();
            }
            else
            {
                ASPxGridView1_Type.DataSource = HttpContext.Current.Session["listType"];
                ASPxGridView1_Type.DataBind();
            }
        }