public MainSearchViewModel(IUdListServiceAgent serviceAgent) { this._serviceAgent = serviceAgent; SearchObject = new UdList(); ResultList = new BindingList <UdList>(); SelectedList = new BindingList <UdList>(); //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; //we will do forms authentication once the log in returns a valid System User... } }
public MainMaintenanceViewModel(IUdListServiceAgent serviceAgent) { this._serviceAgent = serviceAgent; SetAsEmptySelection(); UdListList = new BindingList <UdList>(); //disable new row feature... UdListList.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; }