protected void Step3FinishButton_Click(object sender, EventArgs e) { // if resource does not exist then "finish" operation would not be performed. if (!this._isResExist) { return; } Hashtable resourceIdList = new Hashtable(); foreach (GridViewRow row in this.GridView1.Rows) { CheckBox checkbox = row.Cells[0].Controls[1] as CheckBox; Guid resourceId = new Guid(((HiddenField)(row.Cells[0].Controls[3])).Value); if (checkbox != null) { resourceIdList.Add(resourceId, checkbox.Checked ? Resources.Resources.BibtexImportScopeExternal : Resources.Resources.BibtexImportScopeInternal); } } try { using (ResourceDataAccess resourceDAL = new ResourceDataAccess()) { resourceDAL.UpdateImportedResourceScope(resourceIdList); } DisplayResources(GridView1, null, false); this.LabelMessage.Text = Resources.Resources.BibtexImportUpdateSuccessful; this.LabelMessage.Visible = true; this.Wizard1.Visible = false; } catch (ZentityException ex) { this.LabelMessage.Visible = false; this.DisplayCannotImportMessage(Resources.Resources.BibtexImportUpdateError + ex.Message); return; } }