Click here to Skip to main content
15,891,423 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi am a fresher, am working on some website, i have got some problem please any one help me,

when a expiry date of a particular task assigned is reached it should notify them by automatically sending emails..

i know the logic but donno how to satrt with the code, can any one help me out there.

The Class will help to fire a event based on time or ticks
When ever there is event fired
check the DB for expired certificates
which has not been notified
in the DB you can add Notification Count
IsNotifiedEmail
IsNotifiedSMS
NotificationCountEmail
NotificationCountSMS
Posted
Comments
Prasad Avunoori 10-Jun-14 1:35am    
Hi Nivedita,

Which database you are using? You may send mails from back end.
Just schedule a job which checks the database table at regular intervals and sends mail.
Nivedita.H.D 11-Jun-14 1:35am    
Am using SQL server, how to set that in database please tell me.. this is my code in the controller please tell me..

public ActionResult ExpiryNotification()
{

DateTime date = DateTime.Now.AddDays(7);
//DateTime dat1e = DateTime.Today;
IEnumerable<certificatesassociation> Associaton = db.CertificatesAssociations.Include("Certificats").Where(s => s.ExpiryDate <= date && s.ExpiryDate >= DateTime.Today);
return View(Associaton);
}

1 solution

Here is a sample code from the jQuery site itself

C#
var times = chunks.length;
$(document).everyTime(1000, function(i) {
  processChunk(i);
}, times);



Here the processChunk function will be called every 1000 (1 sec) no of times as metioned in times variable. If times is 0 (zero) then the processChunk function will be called every 1000 indefinitly.

Thanks,
-RG
 
Share this answer
 
Comments
Nivedita.H.D 11-Jun-14 1:37am    
hi thank you for the code.


public ActionResult ExpiryNotification()
{

DateTime date = DateTime.Now.AddDays(7);
//DateTime dat1e = DateTime.Today;
IEnumerable<certificatesassociation> Associaton = db.CertificatesAssociations.Include("Certificats").Where(s => s.ExpiryDate <= date && s.ExpiryDate >= DateTime.Today);
return View(Associaton);
}
this is my code in the controller please tel me next should i do..

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900