Esempio n. 1
0
        private void btnNew_Click(object sender, RoutedEventArgs e)
        {
            crud_modal.Visibility = System.Windows.Visibility.Visible;
            cntrl.Curd.item_brand _item_brand = new cntrl.Curd.item_brand();
            item_brand            item_brand  = new item_brand();

            _entity.db.item_brand.Add(item_brand);
            item_brandViewSource.View.MoveCurrentToLast();
            _item_brand.item_brandViewSource = item_brandViewSource;
            _item_brand._entity = _entity;
            crud_modal.Children.Add(_item_brand);
        }
Esempio n. 2
0
        private void EditBrand_PreviewMouseUp(object sender, MouseButtonEventArgs e)
        {
            item_brand _item_brand = cbxItemBrand.SelectedItem as item_brand;

            if (_item_brand != null)
            {
                crud_modal.Visibility = Visibility.Visible;
                cntrl.Curd.item_brand item_brand = new cntrl.Curd.item_brand();
                item_brand.item_brandViewSource = item_brandViewSource;
                item_brand.MainViewSource       = itemViewSource;
                item_brand.curObject            = itemViewSource.View.CurrentItem;
                //item_brand._entity = dbContext;
                item_brand.item_brandobject = _item_brand;
                item_brand.operationMode    = cntrl.Class.clsCommon.Mode.Edit;
                item_brand.isExternalCall   = true;
                crud_modal.Children.Add(item_brand);
            }
        }