コード例 #1
0
        public HttpResponseMessage changePin([FromBody] LoginModel loginm)
        {
            var result = objAuthorization.checkOldPin(loginm);

            if (result == true)
            {
                objloginDL.updatePin(loginm);

                resp = Request.CreateResponse <ResponseModel>(
                    HttpStatusCode.OK,
                    new ResponseModel()
                {
                    message = "pin changed Successfully", statuscode = Convert.ToInt16(HttpStatusCode.OK)
                }
                    );
                return(resp);
            }

            else
            {
                resp = Request.CreateResponse <ResponseModel>(
                    HttpStatusCode.OK,
                    new ResponseModel()
                {
                    message = "incorrect pin", statuscode = Convert.ToInt16(HttpStatusCode.OK)
                }
                    );
                return(resp);
            }
        }