Example #1
0
 public bool InsertRegistration(RegistrationEntity entity)
 {
     if (entity.DOB >= DateTime.Now)
     {
         throw new Exception("DOB invalid");
     }
     if (entity.DOJ >= DateTime.Now)
     {
         throw new Exception("Cannot register an employee who has not joined");
     }
     if (entity.Salary >= 10000 && entity.Salary <= 75000)
     {
     }
     else
     {
         throw new Exception("Salary range between 10000 and 75000 ");
     }
     return(dal.InsertRegistration(entity));
 }