Esempio n. 1
0
        protected void RemoveButton_OnClick(object sender, EventArgs e)
        {
            List <long> policies = new List <long>();

            foreach (RepeaterItem item in RptPoliciesListing.Items)
            {
                //to get the dropdown of each line
                CheckBox chkAmentyList = (CheckBox)item.FindControl("ChkRemove");
                if (chkAmentyList.Checked)
                {
                    HiddenField hidId = (HiddenField)item.FindControl("HidId");
                    policies.Add(long.Parse(hidId.Value));
                }
            }
            _hotelRepository.DeletePolicies(policies);

            _hotelRepository.ResetCache();

            BindPolicies(true);
        }