private void btnInsertConfiguration_Click(object sender, EventArgs e) { Configuration temp = new Configuration("", "", ""); frmConfigurationDetails frm = new frmConfigurationDetails(ref temp, true); Utils.ShowForm(this, frm, dgvAvailableConfigurations, () => { availableConfigurations = getAvailableConfigurations(component.Configurations, Configuration.Select()); }); }
private void btnViewConfiguration_Click(object sender, EventArgs e) { if (dgvAvailableConfigurations.SelectedRows.Count == 1) { DataGridViewRow dr = dgvAvailableConfigurations.SelectedRows[0]; var q = from config in availableConfigurations where config.PK_ConfigurationID == dr.Cells["PK_ConfigurationID"].Value.ToString() select config; List <Configuration> queryResult = q.ToList(); Configuration temp = queryResult.Count == 1 ? queryResult[0] : new Configuration(); frmConfigurationDetails frm = new frmConfigurationDetails(ref temp); Utils.ShowForm(this, frm, dgvAvailableConfigurations, () => { //availableConfigurations = getAvailableConfigurations(component.Configurations, Configuration.Select()); }); } }