Exemple #1
0
        public ActionResult WorkConf()
        {
            string sameUser              = User.Identity.GetUserId();
            var    result                = from row in db.Users where row.Id == sameUser select row;
            var    resultToUser          = result.FirstOrDefault();
            WeatherConnectionJob connect = new WeatherConnectionJob();

            connect.SendNotification(resultToUser);
            return(View(resultToUser));
        }
        public ActionResult SendSnowtification()
        {
            var     user    = UserManager.FindById(User.Identity.GetUserId());
            Message message = new Message();

            message.content   = "Snow expected, have you planned a shoveler.";
            message.recipient = user.PhoneNumber;
            WeatherConnectionJob wj = new WeatherConnectionJob();

            wj.SendSnowtification(user);
            return(View());
        }
Exemple #3
0
        public ActionResult HomeRate([Bind(Include = "Id,Address,FirstName,LastName,Rating,Email,EmailConfirmed,PasswordHash,SecurityStamp,PhoneNumber,PhoneNumberConfirmed,TwoFactorEnabled,LockoutEndDateUtc,LockoutEnabled,AccessFailedCount,UserName,Description,Price,Shovelee,Latitude,Longitude,PricePoint,Distance,HomeRating")] ApplicationUser applicationuser)
        {
            //find pickup pass in to view
            string sameUser     = User.Identity.GetUserId();
            var    result       = from row in db.Users where row.Id == sameUser select row;
            var    resultToUser = result.FirstOrDefault();
            var    secondResult = from row in db.Users where row.Id == resultToUser.OtherId select row;
            var    finalResult  = secondResult.FirstOrDefault();

            finalResult.HomeRating = finalResult.HomeRating + applicationuser.HomeRating;
            WeatherConnectionJob connect = new WeatherConnectionJob();

            connect.SendNot(resultToUser);
            if (ModelState.IsValid)
            {
                db.Entry(finalResult).State = EntityState.Modified;
                db.SaveChanges();
                return(RedirectToAction("UserHome", "ApplicationUsers"));
            }
            var stripePublishKey = ConfigurationManager.AppSettings[HelperClasses.APIKeys.StripePublishableKey];

            ViewBag.StripePublishKey = HelperClasses.APIKeys.StripePublishableKey;
            return(View());
        }