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

            DALShipmentAddresses DAL = new DALShipmentAddresses();

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

            DALShipmentAddresses DAL = new DALShipmentAddresses();

            return(DAL.GetShipmentAddresses());
        }