Beispiel #1
0
        public IHttpActionResult UpdateClientInformation(DAL.Models.ClientInformation model)
        {
            try
            {
                var service = new DAL.Services.ClientInformationService();

                service.UpdateClientInformation(model);

                return(Ok("Success"));
            }
            catch (Exception ex)
            {
                return(BadRequest(ex.ToString()));
            }
        }
Beispiel #2
0
        public IHttpActionResult AddClientInformation(DAL.Models.ClientInformation model)
        {
            try
            {
                var service = new DAL.Services.ClientInformationService();

                var clientInformationID = service.AddClientInformation(model);

                return(Ok(clientInformationID));
            }
            catch (Exception ex)
            {
                return(BadRequest(ex.ToString()));
            }
        }
Beispiel #3
0
        public IHttpActionResult GetClientInformation(DAL.Models.ClientInformation model)
        {
            try
            {
                var service = new DAL.Services.ClientInformationService();

                var clientInformation = service.GetClientInformation(model.ClientInformationID);

                if (clientInformation == null)
                {
                    return(NotFound());
                }

                return(Ok(clientInformation));
            }
            catch (Exception ex)
            {
                return(BadRequest(ex.ToString()));
            }
        }