Beispiel #1
0
        public void AddReminder(ReminderModel reminder, int emailID, DateTime nextRemindingDate)
        {
            try
            {
                var sqlCom = _db.GetWriteCommand(@"INSERT INTO reminder 
                                              (Day, Month, Name, EmailID, TimeZoneOffset, 
                                                CreationDate, NextRemindingDate, ReminderID)
                                      VALUES (?Day, ?Month, ?Name, ?EmailID,?TimeZoneOffset,
                                              ?CreationDate, ?NextRemindingDate,?ID);");
                sqlCom.Parameters.AddWithValue("?Day", reminder.Day);
                sqlCom.Parameters.AddWithValue("?Month", reminder.Month);
                sqlCom.Parameters.AddWithValue("?Name", reminder.Name);
                sqlCom.Parameters.AddWithValue("?EmailID", emailID);
                sqlCom.Parameters.AddWithValue("?TimeZoneOffset", reminder.TimeZoneOffset);
                sqlCom.Parameters.AddWithValue("?CreationDate", DateTime.Now);
                sqlCom.Parameters.AddWithValue("?NextRemindingDate", nextRemindingDate);
                sqlCom.Parameters.AddWithValue("?ID", Guid.NewGuid());

                sqlCom.ExecuteNonQuery();
            }
            finally
            {
                _db.CloseConnections();
            }
        }
Beispiel #2
0
        public ActionResult CreateReminder(ReminderModel model)
        {
            if (ModelState.IsValid)
            {
                model.Email = model.Email.ToLowerInvariant();

                E_ReminderCreationStatus reminderCreationStatus = TryCreateReminder(model);


                switch (reminderCreationStatus)
                {
                case E_ReminderCreationStatus.successfull:
                    ViewData["EmailVerified"] = true;
                    return(View("Success"));

                case E_ReminderCreationStatus.successVerifyEmail:
                    ViewData["EmailVerified"] = false;
                    return(View("Success"));

                case E_ReminderCreationStatus.wrongPassword:
                    ModelState.AddModelError("Password", "Wrong password");
                    break;
                }
            }

            //We are to far now, some error must exist, return creation view to user again
            ViewData["DaySelectList"]   = GetDaySelectList();
            ViewData["MonthSelectList"] = Months;
            //ViewData["DaysBeforeSelect"] = GetDaysBeforeReminderSelectList();

            return(View("Index", model));
        }
Beispiel #3
0
        /// <summary>This fills the Reminders list by reading all the reminder files</summary>
        private void PopulateRemindersList()
        {
            SDate now = SDate.Now();

            foreach (string absoulutePath in Directory.GetFiles(Path.Combine(Utilities.Globals.Helper.DirectoryPath, "data", Utilities.Globals.SaveFolderName)))
            {
                string relativePath = Utilities.Extras.MakeRelativePath(absoulutePath);

                // make sure the file is a Json. Fix for Vortex generated files causing issues.
                if (!relativePath.ToLower().EndsWith(".json"))
                {
                    continue;
                }

                ReminderModel Reminder = Utilities.Globals.Helper.Data.ReadJsonFile <ReminderModel>(relativePath);
                //Json-x-ly Notes: Threw this check in since now there are entries that are spent, but still awaiting cleanup. Implies to the user that the Reminder is gone.
                // -- Changing the "Reminder.Time < Game1.timeOfDay" to "Reminder.Time <= Game1.timeOfDay" determines if the entry is left in the list for the actual moment in time it's triggered.
                // If Reminder is today or earlier and Reminders Time is earlier then now, omit the entry.
                if (Reminder.DaysSinceStart <= now.DaysSinceStart && Reminder.Time < Game1.timeOfDay)
                {
                    continue;
                }

                Reminders.Add(Reminder);
            }
        }
Beispiel #4
0
        public ReminderModel AddReminder(ulong guildId, ulong userId, ulong channelId, string message, TimeSpan span)
        {
            using (var session = Store.OpenSession())
            {
                var query = session.Query <ReminderModel>().ToList();
                int count;
                if (query.Any())
                {
                    count = int.Parse(query.Max(x => x.Id)) + 1;
                }
                else
                {
                    count = 1;
                }

                var newReminder = new ReminderModel(userId, guildId, message, channelId, span)
                {
                    Id = $"Reminder-{count}"
                };

                session.Store(newReminder);
                session.SaveChanges();

                ReminderModels.Add(newReminder);
                return(newReminder);
            }
        }
 private void btnEdit_Click(object sender, EventArgs e)
 {
     try
     {
         newClassTbl = new ClassTbl
         {
             ClassName      = tbMatkul.Text,
             MeetingLink    = tbMeeting.Text,
             AttendanceLink = tbPresensi.Text,
             DriveLink      = tbDrive.Text,
             Day            = cbHari.Text,
             Hour           = cbHour.Text,
             Min            = cbMin.Text,
         };
         using (var db = new ReminderModel())
         {
             db.ClassTbls.AddOrUpdate(newClassTbl);
             db.SaveChanges();
             populate();
         }
         MessageBox.Show("Done");
     }catch (Exception ezpz)
     {
         MessageBox.Show(ezpz.Message);
     }
 }
        public async Task AddReminderAsync(ReminderModel reminder)
        {
            // TODO: Replace text with app resources
            LocalNotificationService.Schedule("Pumping Session Reminder", "Tap here to begin your pumping session!", reminder.Id.ToString(), reminder.Time.Value);

            await _connection.InsertAsync(reminder);
        }
        private void btnSearch_Click(object sender, EventArgs e)
        {
            tbMatkul.Text   = "";
            tbMeeting.Text  = "";
            tbPresensi.Text = "";
            tbDrive.Text    = "";
            cbHari.Text     = "";
            cbHour.Text     = "";
            cbMin.Text      = "";

            using (var db = new ReminderModel())
            {
                var query = from classReminder in db.ClassTbls where classReminder.ClassName == tbSearch.Text select classReminder;
                foreach (var item in query)
                {
                    tbMatkul.Text   = item.ClassName;
                    tbMeeting.Text  = item.MeetingLink;
                    tbPresensi.Text = item.AttendanceLink;
                    tbDrive.Text    = item.DriveLink;
                    cbHari.Text     = item.Day;
                    cbHour.Text     = item.Hour;
                    cbMin.Text      = item.Min;
                }
            }
        }
Beispiel #8
0
        public async Task <NoteResponse> SetReminder(ReminderModel reminder, int noteID, string userID)
        {
            try
            {
                var note = this.authenticationContext.Note.Where(s => s.UserID == userID && s.NoteID == noteID).FirstOrDefault();
                if (note != null)
                {
                    note.Reminder     = reminder.Reminder;
                    note.ModifiedDate = DateTime.Now;
                    this.authenticationContext.Note.Update(note);
                    await this.authenticationContext.SaveChangesAsync();

                    NoteResponse data = this.GetNoteResponse(userID, note);
                    return(data);
                }
                else
                {
                    return(null);
                }
            }
            catch (Exception e)
            {
                throw new Exception(e.Message);
            }
        }
Beispiel #9
0
        public List <ReminderModel> GetAll()
        {
            try
            {
                var reminders          = _repository.GetAll().OrderBy(r => r.Title).ToList();
                var remindersViewModel = new List <ReminderModel>();

                reminders.ForEach(r =>
                {
                    var reminder = new ReminderModel
                    {
                        ID          = r.ID,
                        Title       = r.Title,
                        Description = r.Description,
                        LimitDate   = r.LimitDate,
                        IsDone      = r.IsDone
                    };
                    remindersViewModel.Add(reminder);
                });

                return(remindersViewModel);
            }
            catch (Exception ex)
            {
                return(null);
            }
        }
Beispiel #10
0
        public void Start(ReminderModel reminderModel)
        {
            var context = Application.Context;

            var alarmIntent = new Intent(context, typeof(ReminderReceiver));

            alarmIntent.PutViewModelParameters(
                new NotificationParameters()
            {
                Phone = reminderModel.Phone,
                Name  = reminderModel.Name
            });

            var pendingIntent = PendingIntent.GetBroadcast(context, reminderModel.Id.GetHashCode(), alarmIntent, PendingIntentFlags.CancelCurrent);

            var manager        = (AlarmManager)context.GetSystemService(Context.AlarmService);
            var intervalMillis = 86400000;

            var cal = Calendar.Instance;

            cal.TimeInMillis = Java.Lang.JavaSystem.CurrentTimeMillis();
            cal.Set(CalendarField.HourOfDay, reminderModel.Time.Hour);
            cal.Set(CalendarField.Minute, reminderModel.Time.Minute);
            cal.Set(CalendarField.Second, 0);

            manager.SetInexactRepeating(AlarmType.RtcWakeup, cal.TimeInMillis, intervalMillis, pendingIntent);

            _dialogService.ShowNotification(string.Format(Strings.ReminderSetFormatWithOneParam, reminderModel.Name));
        }
 private void AddData()
 {
     if (tbMatkul.Text != "" && tbMeeting.Text != "" && tbPresensi.Text != "" && tbDrive.Text != "" && cbHari.Text != "" && cbHour.Text != "" && cbMin.Text != "")
     {
         using (var db = new ReminderModel())
         {
             newClassTbl = new ClassTbl
             {
                 ClassName      = tbMatkul.Text,
                 MeetingLink    = tbMeeting.Text,
                 AttendanceLink = tbPresensi.Text,
                 DriveLink      = tbDrive.Text,
                 Day            = cbHari.Text,
                 Hour           = cbHour.Text,
                 Min            = cbMin.Text,
             };
             db.ClassTbls.Add(newClassTbl);
             db.SaveChanges();
             populate();
             MessageBox.Show("Class Ditambahkan");
         }
     }
     else
     {
         MessageBox.Show("Semua data harus diisi!");
     }
 }
 public MemoReminderRingViewModel(ReminderModel reminder)
 {
     //_alarmTimeRing = Convert.ToDateTime(reminder.Time).ToString("HH") + ":" + Convert.ToDateTime(reminder.Time).ToString("mm");
     //AlarmTime = _alarmTimeRing;
     //Content = reminder.ContentText;
     TimeTick();
 }
 public void EditData()
 {
     using (var db = new ReminderModel())
     {
         var result = db.ClassTbls.SingleOrDefault(k => k.ClassName == tbMatkul.Text);
         if (result != null)
         {
             if (tbMatkul.Text != "" && tbMeeting.Text != "" && tbPresensi.Text != "" && tbDrive.Text != "" && cbHari.Text != "" && cbHour.Text != "" && cbMin.Text != "")
             {
                 result.MeetingLink    = tbMatkul.Text;
                 result.AttendanceLink = tbPresensi.Text;
                 result.DriveLink      = tbDrive.Text;
                 result.Day            = cbHari.Text;
                 result.Hour           = cbHour.Text;
                 result.Min            = cbMin.Text;
                 db.SaveChanges();
                 MessageBox.Show("Class berhasil diperbaharui");
             }
             else
             {
                 MessageBox.Show("Semua data harus diisi");
             }
         }
     }
 }
Beispiel #14
0
        public async Task <IActionResult> SetReminder(ReminderModel reminder, int noteID)
        {
            try
            {
                var userID = HttpContext.User.Claims.First(c => c.Type == "UserID").Value;
                var data   = await this.noteBL.SetReminder(reminder, noteID, userID);

                bool success = false;
                var  message = string.Empty;
                if (data != null)
                {
                    success = true;
                    message = "Reminder Set";
                    return(this.Ok(new { success, message, data }));
                }
                else
                {
                    success = false;
                    message = "Reminder is not set";
                    return(this.BadRequest(new { success, message }));
                }
            }
            catch (Exception e)
            {
                throw new Exception(e.Message);
            }
        }
        public ActionResult AddMyReminder(ReminderModel model)
        {
            int    result = 0;
            string strMsg = "";

            if (ModelState.IsValid)
            {
                result = myReminderHelper.AddMyReminder(model);
                if (result == -1)
                {
                    strMsg = "Reminder already exists to this User with given subject & dates";
                }
                else if (result == 1)
                {
                    strMsg = "Reminder created successfully.";
                }
                else
                {
                    strMsg = "Reminder creation failed.";
                }
            }
            else
            {
                strMsg = "Please select Start Time - Hour & Minute.";
            }
            return(Json(new { result = result, Msg = strMsg }));
        }
Beispiel #16
0
        public async Task <MessageReport> ReminderToClient(ReminderModel model)
        {
            var result = new MessageReport(false, "error");

            switch (model.RecordType)
            {
            case "project":
                return(await ReminderProject(model.RecordId, model.Decription));

            case "task":
                return(await ReminderTask(model.RecordId, model.Decription));

            default:
                break;
            }

            //Cập nhật trong log
            var mo = await GetLogById(model.RecordId);

            if (mo != null)
            {
                mo.isDone = true;

                await UpdateLog(mo);
            }

            return(await Task.FromResult(result));
        }
Beispiel #17
0
        private E_ReminderCreationStatus TryCreateReminder(ReminderModel model)
        {
            string passwordHash = Security.GetSHA1Hash(model.Password);
            E_ReminderCreationStatus resultStatus = E_ReminderCreationStatus.error;


            E_VerificationStatus verificationStatus = ReminderRepository.GetVerificationStatus(model.Email, passwordHash);
            int      mailID = 0;
            DateTime nextReminder;

            switch (verificationStatus)
            {
            case E_VerificationStatus.emailUnknown:
                Guid verificationCode = Guid.NewGuid();
                int  emailID          = ReminderRepository.InsertUnverifiedEmail(model.Email, passwordHash, verificationCode);
                MessageService.SendVerificationEmail(model.Email, verificationCode);
                nextReminder = GetNextRemindingDate(model, DateTime.Now);
                ReminderRepository.AddReminder(model, emailID, nextReminder);

                resultStatus = E_ReminderCreationStatus.successVerifyEmail;

                Logger.LogInfo(
                    string.Format("unkown address remindii for:'{0}', Name: {1}"
                                  , model.Email, model.Name));
                break;

            case E_VerificationStatus.emailNotYetVerified:
                mailID       = ReminderRepository.GetEmailID(model.Email);
                nextReminder = GetNextRemindingDate(model, DateTime.Now);
                ReminderRepository.AddReminder(model, mailID, nextReminder);
                resultStatus = E_ReminderCreationStatus.successVerifyEmail;

                Logger.LogInfo(
                    string.Format("not verified remindii for:'{0}', Name: {1}"
                                  , model.Email, model.Name));
                break;

            case E_VerificationStatus.successfull:
                mailID       = ReminderRepository.GetEmailID(model.Email);
                nextReminder = GetNextRemindingDate(model, DateTime.Now);
                ReminderRepository.AddReminder(model, mailID, nextReminder);
                resultStatus = E_ReminderCreationStatus.successfull;
                Logger.LogInfo(
                    string.Format("verified remindii for:'{0}', Name: {1}"
                                  , model.Email, model.Name));
                break;

            case E_VerificationStatus.wrongPassword:
                resultStatus = E_ReminderCreationStatus.wrongPassword;
                Logger.LogInfo("Wrong password for email: " + model.Email);
                break;
            }

            if (resultStatus == E_ReminderCreationStatus.error)
            {
                throw new ApplicationException("Fehler");
            }
            return(resultStatus);
        }
Beispiel #18
0
        public async void DeleteReminder(ReminderModel item)
        {
            var response = await CoreMethods.DisplayAlert(Resources.AppResources.Delete, Resources.AppResources.DeleteConfirm, Resources.AppResources.Ok, Resources.AppResources.NotNow);

            if (response)
            {
                RemindersItemSource.Remove(item);
            }
        }
Beispiel #19
0
        /// <summary>
        /// 编辑提醒
        /// </summary>
        /// <param name="model"></param>
        private void EditReminder(ReminderModel model)
        {
            _temp          = model;
            _lastUIElement = _mainBorder.Child;
            DoubleAnimation dLoginFadeOut = new DoubleAnimation(1, 0, new Duration(TimeSpan.FromSeconds(0.2)));

            dLoginFadeOut.Completed += DLoginFadeIn_Completed;
            _mainBorder.Child.BeginAnimation(UIElement.OpacityProperty, dLoginFadeOut);
        }
Beispiel #20
0
 /// <summary>
 /// 存储提醒
 /// </summary>
 /// <param name="elememt"></param>
 private void SaveData(Grid elememt)
 {
     try
     {
         if (TitleContent.Equals("添加提醒"))//添加提醒
         {
             ReminderModel model = new ReminderModel();
             GuiD       = Guid.NewGuid().ToString().Replace("-", "");
             model.GuiD = GuiD;
             if (_years != null)
             {
                 ReminderTime = string.Format("{0:yyyy/M/d H:mm}", Convert.ToDateTime(_years.Currentitem + "/" + _months.Currentitem + "/" + _days.Currentitem
                                                                                      + " " + _format.Currentitem + " " + _hours.Currentitem + ":" + _minutes.Currentitem));
             }
             else
             {
                 ReminderTime = string.Format("{0:yyyy/M/d H:mm}", Convert.ToDateTime(years + "/" + months + "/" + days + " " + format + " " + hours + ":" + minutes));
             }
             model.ReminderTime = ReminderTime;
             model.Content      = Content;
             model.Contact      = Contact;
             model.Record       = Record;
             model.RecordPath   = RecordPath;
             model.Ring         = Ring;
             DataManager.Instance.InsertTables(model);
             ReminderManager.Instance.Reminders.Add(model);
             BackToMainView("Cancel");
         }
         else if (TitleContent.Equals("详细信息"))//修改提醒
         {
             int index = ReminderManager.Instance.Reminders.IndexOf(ReminderManager.Instance.Reminders.Where(temp => temp.GuiD == _lastReminder.GuiD).First());
             if (_years != null)
             {
                 ReminderTime = string.Format("{0:yyyy/M/d H:mm}", Convert.ToDateTime(_years.Currentitem + "/" + _months.Currentitem + "/" + _days.Currentitem
                                                                                      + " " + _format.Currentitem + " " + _hours.Currentitem + ":" + _minutes.Currentitem));
             }
             else
             {
                 ReminderTime = string.Format("{0:yyyy/M/d H:mm}", Convert.ToDateTime(years + "/" + months + "/" + days + " " + format + " " + hours + ":" + minutes));
             }
             _lastReminder.ReminderTime = ReminderTime;
             _lastReminder.Content      = Content;
             _lastReminder.Contact      = Contact;
             _lastReminder.Record       = Record;
             _lastReminder.RecordPath   = RecordPath;
             _lastReminder.Ring         = Ring;
             DataManager.Instance.UpdateTables(_lastReminder);
             ReminderManager.Instance.Reminders[index] = _lastReminder;
             BackToMainView("Cancel");
         }
     }
     catch (Exception e)
     {
         LogWriter.Instance.Error(e);
     }
 }
Beispiel #21
0
 public void FetchData(ReminderModel model)
 {
     try
     {
         if (string.IsNullOrEmpty(model.Contact))
         {
             GuiD         = model.GuiD;
             ReminderTime = Convert.ToDateTime(model.ReminderTime).ToString();
             ReminderTime = ReminderTime.Substring(0, ReminderTime.Length - 3);
             Content      = model.Content;
             Contact      = model.Contact;
             Record       = model.Record;
             RecordPath   = model.RecordPath;
             Ring         = model.Ring;
             if (!string.IsNullOrEmpty(Contact))
             {
                 Label = Contact + "," + ReminderTime;
             }
             else
             {
                 Label = ReminderTime;
             }
             if (!string.IsNullOrEmpty(Content) && Content.Length > 13)
             {
                 LabelContent = Content.Substring(0, 13) + "...";
             }
             else
             {
                 LabelContent = Content;
             }
         }
         else
         {
             GuiD         = model.GuiD;
             ReminderTime = model.ReminderTime;
             Content      = model.Content;
             Contact      = model.Contact;
             Record       = model.Record;
             RecordPath   = model.RecordPath;
             Ring         = model.Ring;
             Label        = Contact + "," + ReminderTime;
             if (!string.IsNullOrEmpty(Content) && Content.Length > 13)
             {
                 LabelContent = Content.Substring(0, 13) + "...";
             }
             else
             {
                 LabelContent = Content;
             }
         }
     }
     catch (Exception e)
     {
         LogWriter.Instance.Error(e);
     }
 }
        public static void AppendSameDayReminder(CustomBasicList <ReminderModel> reminders, SameDayModel day)
        {
            ReminderModel reminder = new ReminderModel()
            {
                NextDate = day.ReminderDate,
                Message  = day.Title
            };

            reminders.Add(reminder);
        }
Beispiel #23
0
        public ActionResult SetOneYearReminder(ReminderModel model)
        {
            if (!ModelState.IsValid)
            {
                return(View(model));
            }

            model.Save();
            return(RedirectToAction("Index", "Home"));
        }
Beispiel #24
0
        public IActionResult GetByKey(string key)
        {
            ReminderModel model = new ReminderModel
            {
                Name          = "Test2",
                RemindingTime = DateTime.Now
            };

            return(new ObjectResult(model));
        }
Beispiel #25
0
 public static ReminderTableEntity ToTableEntity(this ReminderModel reminder)
 {
     return(new ReminderTableEntity()
     {
         PartitionKey = PartitionKey,
         RowKey = reminder.Hour,
         // CreatedTime = reminder.CreatedTime,
         Message = reminder.Message
     });
 }
 private void btnDelete_Click(object sender, EventArgs e)
 {
     using (var db = new ReminderModel())
     {
         db.ClassTbls.RemoveRange(db.ClassTbls.Where(item => item.ClassName == tbMatkul.Text));
         db.SaveChanges();
         Clear();
         populate();
     }
 }
Beispiel #27
0
        public static bool ValidateReminder(ReminderModel reminder)
        {
            bool bValid = false;

            if (reminder != null)
            {
                bValid = reminder.IsValid();
            }
            return(bValid);
        }
Beispiel #28
0
        private async void UpdateReminderInDB()
        {
            // Id of the current reminder that the user clicked on
            string reminderId = updaedReminderID.ToString();
            // Set up new HttpClientHandler and its credentials so we can perform the web request
            HttpClientHandler clientHandler = new HttpClientHandler();

            clientHandler.ServerCertificateCustomValidationCallback = (sender, cert, chain, sslPolicyErrors) => { return(true); };

            // Create new httpClient using our client handler created above
            HttpClient httpClient = new HttpClient(clientHandler);

            String apiUrl           = "https://habitathomeownerbuddy.azurewebsites.net/api/MaintenanceReminderAPI/" + reminderId;
            String backgroundApiUrl = "https://habitathomeownerbuddy.azurewebsites.net/api/BackgroundAPI/" + reminderId;

            // Create new URI with the API url so we can perform the web request
            var uri = new Uri(string.Format(apiUrl, string.Empty));
            var uriBackgroundApi = new Uri(string.Format(backgroundApiUrl, string.Empty));

            ReminderModel reminder = new ReminderModel();

            reminder.lastCompleted = completionDate;

            // JSON for marking complete api call
            string JSONresult = JsonConvert.SerializeObject(reminder);

            Console.WriteLine(JSONresult);
            var content = new StringContent(JSONresult, Encoding.UTF8, "application/json");

            // JSON for marking complete api call
            string JSONresultBackground = JsonConvert.SerializeObject(reminderId);

            Console.WriteLine(JSONresultBackground);
            var contentBackgroundApi = new StringContent(JSONresultBackground, Encoding.UTF8, "application/json");

            // Get web request response and store it
            var response = await httpClient.PutAsync(uri, content);

            // Check if the web request was successful
            if (response.IsSuccessStatusCode)
            {
                Preferences.Set("completed", "done");
                Preferences.Set("LastCompleted", completionDate);
                this.Navigation.RemovePage(this.Navigation.NavigationStack[this.Navigation.NavigationStack.Count - 2]);
                await Navigation.PushAsync(new MaintenanceReminder());

                Navigation.RemovePage(this);
                CrossToastPopUp.Current.ShowToastSuccess("Task Completed!");
            }
            else
            {
                // This prints to the Visual Studio Output window
                Debug.WriteLine("Response not successful");
            }
        }
Beispiel #29
0
        public void Cancel(ReminderModel reminderModel)
        {
            var context = Application.Context;

            var alarmIntent   = new Intent(context, typeof(ReminderReceiver));
            var pendingIntent = PendingIntent.GetBroadcast(context, reminderModel.Id.GetHashCode(), alarmIntent, 0);

            var manager = (AlarmManager)context.GetSystemService(Context.AlarmService);

            manager.Cancel(pendingIntent);
        }
Beispiel #30
0
 /// <summary>
 /// Converts to the data contract.
 /// </summary>
 /// <param name="paymentReminder">The payment reminder.</param>
 /// <returns></returns>
 public static PaymentReminderContract ToDataContract(this ReminderModel paymentReminder)
 {
     return(new PaymentReminderContract()
     {
         DayOfMonth = paymentReminder.DayOfMonth,
         PaymentReminderId = !string.IsNullOrWhiteSpace(paymentReminder.ID)? int.Parse(paymentReminder.ID):0,
         MemberId = paymentReminder.MemberId,
         NumberOfLoans = paymentReminder.NumberOfLoans,
         ServicerName = paymentReminder.ServicerName
     });
 }