How can I create a validation class to check if there is null values for the following code?
if(salon.HadProductKnowldgeEduDate.HasValue)
{
dpProductKnowledgeMonth1.Items.FindByValue(salon.HadProductKnowldgeEduDate.Value.Month.ToString()).Selected = true;
}
I have numerous amount of lines and don't want to put in if(salon. ???. HasValue) {} one hundred times.
Also for
if (distributor.Contact2FirstName != null)
{
txtFirstName2.Text = distributor.Contact2FirstName.ToString();
} ...
Go to the complete details ...