Exemplo n.º 1
0
        public HttpResponseMessage Put(Password NewPas)
        {
            HttpResponseMessage response = null;
            Organisation        org      = new Organisation();

            org = OrganisationDA.CheckCredentials(NewPas.Login, NewPas.OldPassword);
            if (org != null)
            {
                OrganisationDA.ChangePassword(NewPas);
                response = Request.CreateResponse(HttpStatusCode.OK);
            }
            else
            {
                response = new HttpResponseMessage(HttpStatusCode.NotFound);
            }
            return(response);
        }