Beispiel #1
0
        public List <Item> GetItemsXML(string ModifiedDate)
        {
            if (!CheckBasicAuthentication())
            {
                //Autenticazione non riuscita
                throw new WebFaultException(HttpStatusCode.Unauthorized);
            }

            DALItems DAL = new DALItems();

            return(DAL.GetItems(ModifiedDate));
        }
Beispiel #2
0
        public List <Item> GetItemsJSON(string ModifiedDate)
        {
            if (!CheckBasicAuthentication())
            {
                //Autenticazione non riuscita
                //throw new HttpException(401, "Unauthorized access"); //No HttpException perchè viene convertita in errore 400
                throw new WebFaultException(HttpStatusCode.Unauthorized);
            }

            DALItems DAL = new DALItems();

            return(DAL.GetItems(ModifiedDate));
        }