Example #1
0
 private void NavToEditPurchaseOrder(WpfPurchaseOrder wpfPurchaseOrder, WpfUser currentUser)
 {
     _addEditPurchaseOrderListViewModel.EditMode = true;
     _addEditPurchaseOrderListViewModel.SetCurrentUser(currentUser);
     _addEditPurchaseOrderListViewModel.SetPurchaseOrder(wpfPurchaseOrder);
     CurrentViewModel = _addEditPurchaseOrderListViewModel;
 }
Example #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);
        }
Example #3
0
 private void NavToEditWorkCycleView(WpfWorkCycle workCycle, WpfUser currentUser)
 {
     _addEditWorkingCycleViewModel.EditMode = true;
     _addEditWorkingCycleViewModel.SetCurrentUser(currentUser);
     _addEditWorkingCycleViewModel.SetWorkingCycle(workCycle);
     CurrentViewModel = _addEditWorkingCycleViewModel;
 }
Example #4
0
 public void NavToAddWorkCycleView(WpfWorkCycle workCycle, WpfUser currentUser)
 {
     _addEditWorkingCycleViewModel.EditMode = false;
     _addEditWorkingCycleViewModel.SetCurrentUser(currentUser);
     _addEditWorkingCycleViewModel.SetWorkingCycle(workCycle);
     CurrentViewModel = _addEditWorkingCycleViewModel;
 }
Example #5
0
 public void SetCurrentUser(WpfUser currentUser)
 {
     CurrentUser = currentUser;
 }
Example #6
0
 /// <summary>
 /// Sets Current User
 /// </summary>
 /// <param name="user">Current User</param>
 public void SetCurrentUser(WpfUser user)
 {
     CurrentUser = user;
 }
Example #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);
 }
Example #8
0
 private void NavToProcurePurchaseOrderView(WpfUser currentUser)
 {
     _procurePurchaseOrderViewModel.SetCurrentUser(currentUser);
     CurrentViewModel = _procurePurchaseOrderViewModel;
 }
Example #9
0
 private void NavToInventorySettingView(WpfUser currentUser)
 {
     _inventorySettingViewModel.SetCurrentUser(currentUser);
     CurrentViewModel = _inventorySettingViewModel;
 }
Example #10
0
 private void NavToLocationListView(WpfUser currentUser)
 {
     _locationListViewModel.SetCurrentUser(currentUser);
     CurrentViewModel = _locationListViewModel;
 }
Example #11
0
 private void NavToRawMaterialCategoryListView(WpfUser currentUser)
 {
     _rawMaterialCategoryListViewModel.SetCurrentUser(currentUser);
     CurrentViewModel = _rawMaterialCategoryListViewModel;
 }
Example #12
0
 private void NavToSupplierListView(WpfUser currentUser)
 {
     _supplierListViewModel.SetCurrentUser(currentUser);
     CurrentViewModel = _supplierListViewModel;
 }
Example #13
0
 private void NavToHomeDashboard(WpfUser currentUser)
 {
     _homeDashboardViewModel.SetCurrentUser(currentUser);
     CurrentViewModel = _homeDashboardViewModel;
 }
Example #14
0
 private void NavToPurchaseOrdersListView(WpfUser currentUser)
 {
     _purchaseOrderListViewModel.SetCurrentUser(currentUser);
     CurrentViewModel = _purchaseOrderListViewModel;
 }
Example #15
0
 private void NavToManageWorkCycles(WpfUser currentUser)
 {
     _workCycleListViewModel.SetCurrentUser(currentUser);
     CurrentViewModel = _workCycleListViewModel;
 }
Example #16
0
 private void NavigateToInventoryDashboard(WpfUser currentUser)
 {
     _inventoryDashboardViewModel.SetCurrentUser(currentUser);
     CurrentViewModel = _inventoryDashboardViewModel;
 }
Example #17
0
 private void NavToLoginView(WpfUser currentUser)
 {
     _loginViewModel.CurrentUser = currentUser;
     CurrentViewModel            = _loginViewModel;
 }