partial void DeleteConsistencyRule(ConsistencyRule instance);
partial void UpdateConsistencyRule(ConsistencyRule instance);
private void detach_ConsistencyRules(ConsistencyRule entity) { this.SendPropertyChanging(); entity.Asset = null; }
partial void InsertConsistencyRule(ConsistencyRule instance);
private void saveConsistencyRules() { foreach (DataGridViewRow row in dataGrid_consistencyRules.Rows) { if (row.IsNewRow) continue; ConsistencyRule rule = new ConsistencyRule(); rule.mValue = (String)row.Cells[0].Value; rule.sValue = (String)row.Cells[2].Value; rule.condition = (String)row.Cells[1].Value; rule.importance = ConsistencyRule.getImportance((String)row.Cells[3].Value); asset.ConsistencyRules.Add(rule); } DivanDataContext.Instance.SubmitChanges(); }