Beispiel #1
0
 private void NavToEditPurchaseOrder(WpfPurchaseOrder wpfPurchaseOrder, WpfUser currentUser)
 {
     _addEditPurchaseOrderListViewModel.EditMode = true;
     _addEditPurchaseOrderListViewModel.SetCurrentUser(currentUser);
     _addEditPurchaseOrderListViewModel.SetPurchaseOrder(wpfPurchaseOrder);
     CurrentViewModel = _addEditPurchaseOrderListViewModel;
 }
Beispiel #2
0
        public static List <WpfUser> GetWpfUser()
        {
            var query = new DQueryDom(new JoinAlias(typeof(WpfUser)));

            query.Columns.Add(DQSelectColumn.Field("ID"));
            query.Columns.Add(DQSelectColumn.Field("Name"));
            query.Columns.Add(DQSelectColumn.Field("Stopped"));
            query.Columns.Add(DQSelectColumn.Field("Password"));
            query.Columns.Add(DQSelectColumn.Field("RoleSchema"));

            var list = new List <WpfUser>();

            using (var context = new TransactionContext())
            {
                using (var reader = context.Session.ExecuteReader(query))
                {
                    while (reader.Read())
                    {
                        var entity = new WpfUser();
                        entity.ID         = (long)reader[0];
                        entity.Name       = (string)reader[1];
                        entity.Stopped    = (bool)reader[2];
                        entity.Password   = (byte[])reader[3];
                        entity.RoleSchema = (string)reader[4];
                        list.Add(entity);
                    }
                }
            }
            return(list);
        }
Beispiel #3
0
 private void NavToEditWorkCycleView(WpfWorkCycle workCycle, WpfUser currentUser)
 {
     _addEditWorkingCycleViewModel.EditMode = true;
     _addEditWorkingCycleViewModel.SetCurrentUser(currentUser);
     _addEditWorkingCycleViewModel.SetWorkingCycle(workCycle);
     CurrentViewModel = _addEditWorkingCycleViewModel;
 }
Beispiel #4
0
 public void NavToAddWorkCycleView(WpfWorkCycle workCycle, WpfUser currentUser)
 {
     _addEditWorkingCycleViewModel.EditMode = false;
     _addEditWorkingCycleViewModel.SetCurrentUser(currentUser);
     _addEditWorkingCycleViewModel.SetWorkingCycle(workCycle);
     CurrentViewModel = _addEditWorkingCycleViewModel;
 }
Beispiel #5
0
 public void SetCurrentUser(WpfUser currentUser)
 {
     CurrentUser = currentUser;
 }
Beispiel #6
0
 /// <summary>
 /// Sets Current User
 /// </summary>
 /// <param name="user">Current User</param>
 public void SetCurrentUser(WpfUser user)
 {
     CurrentUser = user;
 }
Beispiel #7
0
 /// <summary>
 /// Sets Current User in the system.
 /// </summary>
 /// <param name="user"></param>
 public void SetCurrentUser(WpfUser user)
 {
     CurrentUser               = user;
     LogoutCommand             = new RelayCommand(OnLogout);
     InventoryDashboardCommand = new RelayCommand(OnInventoryMgtClick);
 }
Beispiel #8
0
 private void NavToProcurePurchaseOrderView(WpfUser currentUser)
 {
     _procurePurchaseOrderViewModel.SetCurrentUser(currentUser);
     CurrentViewModel = _procurePurchaseOrderViewModel;
 }
Beispiel #9
0
 private void NavToInventorySettingView(WpfUser currentUser)
 {
     _inventorySettingViewModel.SetCurrentUser(currentUser);
     CurrentViewModel = _inventorySettingViewModel;
 }
Beispiel #10
0
 private void NavToLocationListView(WpfUser currentUser)
 {
     _locationListViewModel.SetCurrentUser(currentUser);
     CurrentViewModel = _locationListViewModel;
 }
Beispiel #11
0
 private void NavToRawMaterialCategoryListView(WpfUser currentUser)
 {
     _rawMaterialCategoryListViewModel.SetCurrentUser(currentUser);
     CurrentViewModel = _rawMaterialCategoryListViewModel;
 }
Beispiel #12
0
 private void NavToSupplierListView(WpfUser currentUser)
 {
     _supplierListViewModel.SetCurrentUser(currentUser);
     CurrentViewModel = _supplierListViewModel;
 }
Beispiel #13
0
 private void NavToHomeDashboard(WpfUser currentUser)
 {
     _homeDashboardViewModel.SetCurrentUser(currentUser);
     CurrentViewModel = _homeDashboardViewModel;
 }
Beispiel #14
0
 private void NavToPurchaseOrdersListView(WpfUser currentUser)
 {
     _purchaseOrderListViewModel.SetCurrentUser(currentUser);
     CurrentViewModel = _purchaseOrderListViewModel;
 }
Beispiel #15
0
 private void NavToManageWorkCycles(WpfUser currentUser)
 {
     _workCycleListViewModel.SetCurrentUser(currentUser);
     CurrentViewModel = _workCycleListViewModel;
 }
Beispiel #16
0
 private void NavigateToInventoryDashboard(WpfUser currentUser)
 {
     _inventoryDashboardViewModel.SetCurrentUser(currentUser);
     CurrentViewModel = _inventoryDashboardViewModel;
 }
Beispiel #17
0
 private void NavToLoginView(WpfUser currentUser)
 {
     _loginViewModel.CurrentUser = currentUser;
     CurrentViewModel            = _loginViewModel;
 }