Axapta Code solutions Education and Entertainments Earn Money its Real Experience of knowledge Imortant Weblink collections Fun and Entertainment God thoughts Get Ways to Invest your money Products overview and details
Validation for future date in c sharp dot net lanugage
you can write this code in validation class which you may have in common class file.
public static bool IsNotFuturedt(DateTimePicker datpic)
{
if (datpic.Value.Date > DateTime.Now.Date)
{
MessageBox.Show("Please enter date less than today ");
datpic.Value = DateTime.Now;
datpic.Focus();
return false;
}
else
{
return true;
}
}
Validation for future date in c sharp dot net lanugage
you can write this code in validation class which you may have in common class file.
public static bool IsNotFuturedt(DateTimePicker datpic)
{
if (datpic.Value.Date > DateTime.Now.Date)
{
MessageBox.Show("Please enter date less than today ");
datpic.Value = DateTime.Now;
datpic.Focus();
return false;
}
else
{
return true;
}
}
0 comments:
Post a Comment