Ejemplo n.º 1
0
        public async static Task UserWithdrawFromCourse(int id, int senderId,
                                                        string receiverEmails = "", string userName = "", string link = "")
        {
            var notifyModel = new NotificationModel
            {
                Id                    = id,
                Type                  = typeof(Course),
                NotificationType      = NotificationType.Notify_Admin_Participant_Withdraw,
                NotificationCategory  = NotificationCategory.Learning,
                StartNotificationDate = DateTime.Now,
                ParameterListToSend   = new ParameterListToSend
                {
                    CourseTitle = "",
                    LearnerName = userName,
                    Link        = link,
                },
                ReceiverType    = ReceiverType.UserIds,
                IsNeedRemainder = false,
                Emails          = receiverEmails,
                SenderId        = senderId,
            };
            await EmaiHelper.SendNotification(notifyModel);

            notifyModel.NotificationType         = NotificationType.Notify_Self_Withdraw_From_Course;
            notifyModel.SenderId                 = senderId;
            notifyModel.IsNeedRemainder          = false;
            notifyModel.ParameterListToSend.Link = FEPHelperMethod.GetBaseURL() + $"/eLearning/Courses/{id}";

            await EmaiHelper.SendNotification(notifyModel);
        }
Ejemplo n.º 2
0
        public async static Task SubmitCourseForVerication(int id, int senderId,
                                                           string receiverEmails = "", string author = "", string title = "", string link = "")
        {
            var notifyModel = new NotificationModel
            {
                Id                    = id,
                Type                  = typeof(Course),
                NotificationType      = NotificationType.Verify_Courses_Creation,
                NotificationCategory  = NotificationCategory.Learning,
                StartNotificationDate = DateTime.Now,
                ParameterListToSend   = new ParameterListToSend
                {
                    CourseAuthor   = author,
                    CourseTitle    = title,
                    CourseApproval = "Course Verification",
                    Link           = link,
                },
                ReceiverType    = ReceiverType.UserIds,
                SenderId        = senderId,
                Emails          = receiverEmails,
                IsNeedRemainder = true,
            };

            await EmaiHelper.SendNotification(notifyModel);

            notifyModel.NotificationType         = NotificationType.Verify_Courses_Creation_Self;
            notifyModel.SenderId                 = senderId;
            notifyModel.IsNeedRemainder          = false;
            notifyModel.ParameterListToSend.Link = FEPHelperMethod.GetBaseURL() + $"/eLearning/Courses/{id}";

            await EmaiHelper.SendNotification(notifyModel);
        }
Ejemplo n.º 3
0
        public async static Task SendEnrollmentInvitationByListOfEmails(NotificationType notifyType, int id, int senderId,
                                                                        string receiverEmails = "", string author = "", string title = "", string link = "")
        {
            var notifyModel = new NotificationModel
            {
                Id                    = id,
                Type                  = typeof(Course),
                NotificationType      = notifyType,
                NotificationCategory  = NotificationCategory.Learning,
                StartNotificationDate = DateTime.Now,
                ParameterListToSend   = new ParameterListToSend
                {
                    CourseAuthor   = author,
                    CourseTitle    = title,
                    CourseApproval = "Course Invitation",
                    Link           = link,
                },
                ReceiverType    = ReceiverType.Emails,
                SenderId        = senderId,
                Emails          = receiverEmails,
                IsNeedRemainder = false,
            };

            await EmaiHelper.SendNotification(notifyModel);
        }