private void button10_Click(object sender, EventArgs e) { if ((zjkBindingSource.Current as zjk) == null) { MessageBox.Show("请先增加组件,然后增加组件项目。"); return; } DictForm zcForm = new DictForm("装材", 2); using (zcForm) { zcForm.ShowDialog(); if (zcForm.selectCode != "") { zjk_item zcItem = new zjk_item { item_code = zcForm.selectCode, item_name = zcForm.selectName, item_type = 3, zjk = (zjkBindingSource.Current as zjk) }; (zjkBindingSource.Current as zjk).zjk_items.Add(zcItem); RefreshItems(); } } }
partial void Deletezjk_item(zjk_item instance);
partial void Updatezjk_item(zjk_item instance);
partial void Insertzjk_item(zjk_item instance);
private void detach_zjk_items(zjk_item entity) { this.SendPropertyChanging(); entity.zjk = null; }
private void attach_zjk_items(zjk_item entity) { this.SendPropertyChanging(); entity.zjk = this; }