コード例 #1
0
 private void pnl_item_tag_linkEdit_Click(object sender, int idContactTag)
 {
     crud_modal.Visibility = Visibility.Visible;
     cntrl.Curd.ContactTag _ContactTag = new cntrl.Curd.ContactTag();
     contact_tagViewSource.View.MoveCurrentTo(entity.db.contact_tag.Where(x => x.id_tag == idContactTag).FirstOrDefault());
     _ContactTag.contact_tagViewSource = contact_tagViewSource;
     _ContactTag.entity = entity;
     crud_modal.Children.Add(_ContactTag);
 }
コード例 #2
0
        private void btnNew_Click(object sender, RoutedEventArgs e)
        {
            crud_modal.Visibility = Visibility.Visible;
            cntrl.Curd.ContactTag _ContactTag = new cntrl.Curd.ContactTag();
            contact_tag           contact_tag = new contact_tag();

            entity.db.contact_tag.Add(contact_tag);
            contact_tagViewSource.View.MoveCurrentToLast();
            _ContactTag.contact_tagViewSource = contact_tagViewSource;
            _ContactTag.entity = entity;
            crud_modal.Children.Add(_ContactTag);
        }