Exemple #1
0
        public HttpResponseMessage CheckPasswordUrl()
        {
            string           JSONRequest = Request.Content.ReadAsStringAsync().Result;
            CheckPasswordUrl request;

            try
            {
                request = JsonConvert.DeserializeObject <CheckPasswordUrl>(JSONRequest, ALISSettings.ALISDateFormatJSONSettings);
            }
            catch
            {
                return(ALISErrorFactory.CreateError("G001", Request));
            }

            ReaderRemote re = new ReaderRemote(RegisterConnectionString);

            try
            {
                re.PasGetURL(request.Url);
            }
            catch (Exception ex)
            {
                return(ALISErrorFactory.CreateError(ex.Message, Request));
            }
            return(ALISResponseFactory.CreateResponse(Request));
        }
Exemple #2
0
        public HttpResponseMessage SetPasswordRemoteReader()
        {
            string JSONRequest = Request.Content.ReadAsStringAsync().Result;
            SetPasswordRemoteReader request;

            try
            {
                request = JsonConvert.DeserializeObject <SetPasswordRemoteReader>(JSONRequest, ALISSettings.ALISDateFormatJSONSettings);
            }
            catch
            {
                return(ALISErrorFactory.CreateError("G001", Request));
            }

            ReaderRemote re = new ReaderRemote(RegisterConnectionString);

            try
            {
                re.PasSaveBaseAndDelTemp(request.Url, request.Password);
            }
            catch (Exception ex)
            {
                return(ALISErrorFactory.CreateError(ex.Message, Request));
            }
            return(ALISResponseFactory.CreateResponse(Request));
        }