Exemplo n.º 1
0
 private void pnl_Curd_linkEdit_click(object sender, int intId)
 {
     crud_modal.Visibility = System.Windows.Visibility.Visible;
     cntrl.Curd.item_brand _item_brand = new cntrl.Curd.item_brand();
     item_brandViewSource.View.MoveCurrentTo(_entity.db.item_brand.Where(x => x.id_brand == intId).FirstOrDefault());
     _item_brand.item_brandViewSource = item_brandViewSource;
     _item_brand._entity = _entity;
     crud_modal.Children.Add(_item_brand);
 }
Exemplo n.º 2
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);
        }
Exemplo n.º 3
0
 private void AddBrand_PreviewMouseUp(object sender, MouseButtonEventArgs e)
 {
     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.operationMode  = cntrl.Class.clsCommon.Mode.Add;
     item_brand.isExternalCall = true;
     crud_modal.Children.Add(item_brand);
 }