Ejemplo n.º 1
0
        public MainMaintenanceViewModel(ICompanyServiceAgent serviceAgent)
        {
            this._serviceAgent = serviceAgent;

            CompanyTypeList = GetCompanyTypes();
            CompanyCodeList = GetCompanyCodes();
            SetAsEmptySelection();

            CompanyList = new BindingList <Company>();
            //disable new row feature...
            CompanyList.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;
        }
Ejemplo n.º 2
0
        public CodeSearchViewModel(ICompanyServiceAgent serviceAgent)
        {
            this._serviceAgent = serviceAgent;

            SearchObject = new CompanyCode();
            ResultList   = new BindingList <CompanyCode>();
            SelectedList = new BindingList <CompanyCode>();
            //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;
                //we will do forms authentication once the log in returns a valid System User...
            }
        }
Ejemplo n.º 3
0
        public MainSearchViewModel(ICompanyServiceAgent serviceAgent)
        {
            this._serviceAgent = serviceAgent;
            CompanyTypeList    = GetCompanyTypes();
            CompanyCodeList    = GetCompanyCodes();

            SearchObject = new Company();
            ResultList   = new BindingList <Company>();
            SelectedList = new BindingList <Company>();
            //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;
            }
        }
Ejemplo n.º 4
0
 public CompaniesController(ICompanyServiceAgent companyServiceAgent)
 {
     _companyServiceAgent = companyServiceAgent;
 }