private void LokDataMenuSetting_EditItemClicked(object sender, EditItemClickEventArg e) { var context = e.DataConext as DataMenuSettingDTO; if (lokRelationship.SelectedItem != null) { var relationship = lokRelationship.SelectedItem as RelationshipDTO; frmDataMenuSetting frm = new frmDataMenuSetting(relationship.EntityID2, lokDataMenuSetting.SelectedItem == null ? 0 : (int)lokDataMenuSetting.SelectedValue); MyProjectManager.GetMyProjectManager.ShowDialog(frm, "تنظیمات منو"); frm.DataUpdated += (sender1, e1) => Frm_TailSelected(sender1, e1, sender as MyStaticLookup); } }
private void lokDataMenuSetting_EditItemClicked(object sender, MyCommonWPFControls.EditItemClickEventArg e) { var lookup = (sender as MyStaticLookup); frmDataMenuSetting view; if (lookup.SelectedItem == null) { view = new frmDataMenuSetting(EntityID, 0); } else { view = new frmDataMenuSetting(EntityID, (int)lookup.SelectedValue); } view.DataUpdated += (sender1, e1) => View_EntityListViewUpdated(sender1, e1, lookup); MyProjectManager.GetMyProjectManager.ShowDialog(view, "تنظیمات نامه"); }
private void ColDataGridRelTargetDataMenuSetting_EditItemClicked(object sender, EditItemClickEventArg e) { if (e.DataConext is DataMenuDataViewRelationshipDTO) { var context = e.DataConext as DataMenuDataViewRelationshipDTO; if (context.RelationshipTailID != 0) { var tail = bizEntityRelationshipTail.GetEntityRelationshipTail(MyProjectManager.GetMyProjectManager.GetRequester(), context.RelationshipTailID); frmDataMenuSetting frm = new frmDataMenuSetting(tail.TargetEntityID, context.TargetDataMenuSettingID); MyProjectManager.GetMyProjectManager.ShowDialog(frm, "رابطه های مرتبط"); frm.DataUpdated += (sender1, e1) => Frm_TailSelected(sender1, e1, sender as MyStaticLookup, context); } } else if (e.DataConext is DataMenuGridViewRelationshipDTO) { var context = e.DataConext as DataMenuGridViewRelationshipDTO; var tail = bizEntityRelationshipTail.GetEntityRelationshipTail(MyProjectManager.GetMyProjectManager.GetRequester(), context.RelationshipTailID); frmDataMenuSetting frm = new frmDataMenuSetting(tail.TargetEntityID, context.TargetDataMenuSettingID); MyProjectManager.GetMyProjectManager.ShowDialog(frm, "رابطه های مرتبط"); frm.DataUpdated += (sender1, e1) => Frm_TailSelected(sender1, e1, sender as MyStaticLookup, context); } }