Exemplo n.º 1
0
 public MainMaintenanceViewModel(IMenuItemServiceAgent serviceAgent)
 {
     this._serviceAgent = serviceAgent;
     //make sure of session authentication...
     if (XERP.Client.ClientSessionSingleton.Instance.SessionIsAuthentic)//make sure user has rights to UI...
     {
         DoFormsAuthentication();
     }
     else
     {//User is not authenticated...
         RegisterToReceiveMessages <bool>(MessageTokens.StartUpLogInToken.ToString(), OnStartUpLogIn);
         FormIsEnabled = false;
     }
     InitializeViewModel();
 }
Exemplo n.º 2
0
        public TypeSearchViewModel(IMenuItemServiceAgent serviceAgent)
        {
            this._serviceAgent = serviceAgent;

            SearchObject = new MenuItemType();
            ResultList   = new BindingList <MenuItemType>();
            SelectedList = new BindingList <MenuItemType>();
            //make sure of session authentication...
            if (XERP.Client.ClientSessionSingleton.Instance.SessionIsAuthentic)//make sure user has rights to UI...
            {
                DoFormsAuthentication();
            }
            else
            {//User is not authenticated...
                RegisterToReceiveMessages <bool>(MessageTokens.StartUpLogInToken.ToString(), OnStartUpLogIn);
                FormIsEnabled = false;
            }
        }
Exemplo n.º 3
0
        public TypeMaintenanceViewModel(IMenuItemServiceAgent serviceAgent)
        {
            this._serviceAgent = serviceAgent;

            SetAsEmptySelection();

            MenuItemTypeList = new BindingList <MenuItemType>();
            //disable new row feature...
            MenuItemTypeList.AllowNew = false;

            //make sure of session authentication...
            if (XERP.Client.ClientSessionSingleton.Instance.SessionIsAuthentic)//make sure user has rights to UI...
            {
                DoFormsAuthentication();
            }
            else
            {//User is not authenticated...
                RegisterToReceiveMessages <bool>(MessageTokens.StartUpLogInToken.ToString(), OnStartUpLogIn);
                FormIsEnabled = false;
            }

            AllowNew      = true;
            AllowRowPaste = true;
        }