Hello friends,
Do you have any idea how to validate my software for 15 days without using Database.. i want to give software for demo perpuse... if any idea then please suggest me....
thanks i Advance
Loading
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Kunal VaishyaRank #990 · 2K reputationPosted Apr 18, 2012, 10:37 PM EDT
try this Logic first time when you start software store date in registry . whenever you start check it find difference current date and registry date greater than 15 give them registration message
Naeem KhanRank #2,072 · 698 reputationPosted Apr 18, 2012, 10:48 PM EDT
Kunal VaishyaRank #990 · 2K reputationPosted Apr 19, 2012, 12:43 AM EDT
try this
http://www.c-sharpcorner.com/UploadFile/sushmita_kumari/RegistryKeys102082006061720AM/RegistryKeys1.aspx
still any confusion then let me know
Sam HobbsRank #107 · 20.5K reputationPosted Apr 19, 2012, 5:15 PM EDT
Also, you say "without using Database". For what? Do you mean you want to show how your program works using some data but you do not want the data to be read from a database or written to a database?
Kunal VaishyaRank #990 · 2K reputationPosted Apr 19, 2012, 6:27 PM EDT
its also restrict of date change itvery use full
let me know
private DateTime RegDate;
private DateTime todayDate;
private void CheckLicenceAgreement()
{
try
{
//If Not Exist The Add Date Firet Time
if (Convert.ToString(Application.UserAppDataRegistry.GetValue("RegDate")) == "")
{
RegDate = DateTime.Now;
RegDate = RegDate.AddDays(15);
Application.UserAppDataRegistry.SetValue("RegDate", RegDate.ToString("yyyyMMdd"));
Application.UserAppDataRegistry.SetValue("ApplicationStart", "1");
}
else
{
//Check It
Int32 Regdt;
Int32 todt;
Regdt = Convert.ToInt32(Application.UserAppDataRegistry.GetValue("RegDate"));
todt = Convert.ToInt32(System.DateTime.Now.ToString("yyyyMMdd"));
if ((todt > Regdt) || (Convert.ToString(Application.UserAppDataRegistry.GetValue("ApplicationStart")))=="0")
{
Application.UserAppDataRegistry.SetValue("ApplicationStart", "0");
Application.Exit();
}
}
}
catch (Exception ex)
{
Application.Exit();
}
}