예제 #1
0
        public async Task CreateRegistrationNotificationAsync(string UserId)
        {
            Notification NN = new Notification();

            //ApplicationUser user = new ApplicationUser(); ;

            //using (LoginApplicationDbContext db = new LoginApplicationDbContext())
            //{
            //    user = (from p in db.Users
            //            where p.Id == UserId
            //            select p).FirstOrDefault();
            //}

            NN.NotificationSubjectId = (int)NotificationSubjectConstants.UserRegistered;
            NN.CreatedBy             = "System";
            NN.CreatedDate           = DateTime.Now;
            NN.ExpiryDate            = DateTime.Now.AddDays(7);
            NN.IsActive     = true;
            NN.ModifiedBy   = "System";
            NN.ModifiedDate = DateTime.Now;
            //NN.NotificationText = "New user " + user.UserName + " registered";
            NN.NotificationText = "New user registered";

            NotificationSave ns = new NotificationSave();
            await ns.SaveNotificationAsync(NN, "madhan");
        }
예제 #2
0
 public async Task CreateTaskNotificationAsync(Notification NN, string User)
 {
     NotificationSave ns = new NotificationSave();
     await ns.SaveNotificationAsync(NN, User);
 }