Exemplo n.º 1
0
        private void Load()
        {
            context = new dbWithoutBorderContext();
            context.TManufacture.Load();

            dgdManufacture.ItemsSource = context.TManufacture.Local.ToBindingList();
        }
Exemplo n.º 2
0
        private void Load()
        {
            context = new dbWithoutBorderContext();
            context.TTypeDevice.Load();

            dgdTypeDevice.ItemsSource = context.TTypeDevice.Local.ToBindingList();
        }
Exemplo n.º 3
0
 public wAddUser(ref dbWithoutBorderContext context, ref ObservableCollection <TUsers> ocUsers, int index)
 {
     InitializeComponent();
     this.context = context;
     this.ocUsers = ocUsers;
     this.index   = index;
 }
Exemplo n.º 4
0
        private void Load()
        {
            context = new dbWithoutBorderContext();

            switch (worker.IdRole)
            {
            //admin
            case 1:
            {
                var itemsRole = context.TRole.Where(r => r.Id != 1).ToList();
                cmbRole.ItemsSource = itemsRole;

                dgdUsers.ItemsSource = context?.TUsers.Include(u => u.IdRoleNavigation).Include(u => u.TSpec).Where(w => w.IdRole != 1).ToList();

                break;
            }

            //manager
            case 2:
            {
                cmbRole.Visibility = Visibility.Hidden;
                ckbRole.Visibility = Visibility.Hidden;

                lRole.Visibility = Visibility.Hidden;

                dgdUsers.ItemsSource = context?.TUsers.Include(u => u.IdRoleNavigation).Include(u => u.TSpec).Where(w => w.IdRole != 2).Where(w => w.IdRole != 1).ToList();
                break;
            }
            }
        }
Exemplo n.º 5
0
        private void Load()
        {
            context = new dbWithoutBorderContext();
            context.TBonus.Load();

            dgdBonus.ItemsSource = context.TBonus.Local.ToBindingList();
        }
Exemplo n.º 6
0
 public wAddUpdateManufacture(dbWithoutBorderContext context, bool f)
 {
     InitializeComponent();
     this.context = context;
     this.f       = f;
 }
Exemplo n.º 7
0
 public wAddContract(bool f, ref dbWithoutBorderContext context)
 {
     InitializeComponent();
     this.context = context;
     this.f       = f;
 }
Exemplo n.º 8
0
 public wAddContract(ref dbWithoutBorderContext context)
 {
     InitializeComponent();
     this.context = context;
     f            = true;
 }
Exemplo n.º 9
0
 private void Load()
 {
     using (dbWithoutBorderContext context = new dbWithoutBorderContext())
     {
     }
 }
Exemplo n.º 10
0
 public wAddUpdateTypeDevice(dbWithoutBorderContext context, bool f)
 {
     InitializeComponent();
     this.context = context;
     this.f       = f;
 }
Exemplo n.º 11
0
 private void Load()
 {
     context = new dbWithoutBorderContext();
     context.TContract.Include(b => b.IdUserNavigation).Include(x => x.IdTarifNavigation).Include(x => x.IdOperatorNavigation).Include(x => x.IdDeviceNavigation).Include(x => x.IdBonusNavigation).Load();
     dgdContract.ItemsSource = context.TContract.Local.ToBindingList();
 }