Ejemplo n.º 1
0
        private void AddInformation(Form v)
        {
            IUserCoordinator uCoor;

            #region Precondizioni
            if (v == null)
            {
                throw new ArgumentNullException("v null");
            }
            uCoor = CoordinatorManager.Instance.CoordinatorOfType <IUserCoordinator>();
            if (uCoor == null)
            {
                throw new InvalidOperationException("coordinatore utenti non disponibile");
            }
            #endregion

            v.AddTagInformation(AUTHORIZATION_KEY, _authLevel);
            v.AddTagInformation("mode", ActionType.VIEW);
            v.AddLoginInformation(_loginInformation);
            v.AddTagInformation("fiscalCode", (from regUser in uCoor.RegisteredUsers
                                               where regUser is ICustomer &&
                                               regUser.Username == _loginInformation.Username
                                               select(regUser as ICustomer).FiscalCode).FirstOrDefault());
        }