コード例 #1
0
        public MainMaintenanceViewModel(IAddressServiceAgent serviceAgent)
        {
            this._serviceAgent = serviceAgent;
            BuildDropDowns();

            SetAsEmptySelection();

            AddressList = new BindingList <Address>();
            //disable new row feature...
            AddressList.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;
        }
コード例 #2
0
        public MainSearchViewModel(IAddressServiceAgent serviceAgent)
        {
            this._serviceAgent = serviceAgent;

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