Пример #1
0
        public bool VerifyPin(VerifyPinWebModel model)
        {
            var  db       = new ApplicationDbContext();
            bool verified = new UserProfileLogic(db).VerifyPin(model.AthleteID, model.Pin);

            return(verified);
        }
Пример #2
0
        public async Task <bool?> VerifyPin(int athleteID, string pin)
        {
            string url = WebApiUrl + "People/VerifyPin";

            try
            {
                VerifyPinWebModel model = new VerifyPinWebModel()
                {
                    AthleteID = athleteID,
                    Pin       = pin,
                };
                string json = await this.sendPostRequestAndReceiveResponse(url, model, true);

                bool modelResponse = JsonConvert.DeserializeObject <bool>(json);
                return(modelResponse);
            }
            catch (Exception exc)
            {
                LastExceptionUrl = url;
                LastException    = exc;
                return(null);
            }
        }