private void DeleteContent() { var selectedIds = ViewList.Where(r => r.IsSelected).Select(r => r.Id).ToList(); var filesToDelete = ViewList.Where(r => r.IsSelected).Select(r => r.Name).ToList(); var requestObj = new StringAuthenticateObject { StringAuth = "OK", StringValue = string.Join(",", selectedIds) }; using (var sc = new POCServiceClient("NetTcpBinding_IPOCService")) { var requestData = EncryptionHelper.EncryptString(JsonConvert.SerializeObject(requestObj), KeyEncryption); sc.DeleteContent(requestData); } ServiceManager.DeleteSoftwareFile(filesToDelete); ApplicationContext.SoftwareList.RemoveAll(r => selectedIds.Contains(r.Id)); ApplicationContext.UpdateSourceSoftwareList.RemoveAll(r => selectedIds.Contains(r.SoftwareId)); BuidPage(); }