Exemple #1
0
        protected void SetCheckBoxLicense(string Assoc_code)
        {
            BLL.DataCenterBiz biz = new BLL.DataCenterBiz();
            var res = biz.GetLicenseType("");

            chkLicense.DataSource     = res.DataResponse;
            chkLicense.DataTextField  = "Name";
            chkLicense.DataValueField = "Id";
            chkLicense.DataBind();

            var sel = biz.GetAssociationLicense(Assoc_code);

            if (sel.DataResponse != null)
            {
                var data = sel.DataResponse;
                foreach (ListItem ck in chkLicense.Items)
                {
                    var qry = data.FirstOrDefault(s => s.LICENSE_TYPE_CODE == ck.Value && s.ACTIVE == "Y");
                    if (qry != null)
                    {
                        ck.Selected = true;
                    }
                }
            }

            //ValidTypeCheckBox();
        }