Beispiel #1
0
 private bool StatusValidation(object target, Dothan.Validation.RuleArgs e)
 {
     if (_status == 0)
     {
         e.Description = "Please Select Member Status";
         return(false);
     }
     else
     {
         return(true);
     }
 }
Beispiel #2
0
 private bool BirthDayRule(object target, Dothan.Validation.RuleArgs e)
 {
     if (_birthday > DateTime.Today)
     {
         e.Description = "Birth date can't be after Today";
         return(false);
     }
     else
     {
         return(true);
     }
 }
Beispiel #3
0
        private bool NoDuplicates(object target, Dothan.Validation.RuleArgs e)
        {
            CellRoles parent = (CellRoles)this.Parent;

            foreach (CellRole item in parent)
            {
                if (item.Name == _name && !ReferenceEquals(item, this))
                {
                    e.Description = "Role Name must be unique";
                    return(false);
                }
            }
            return(true);
        }
Beispiel #4
0
        private bool NoDuplicates(object target, Dothan.Validation.RuleArgs e)
        {
            Familys parent = (Familys)this.Parent;

            if (parent != null)
            {
                foreach (Family item in parent)
                {
                    if (item.Code == _memberid && !ReferenceEquals(item, this))
                    {
                        e.Description = "Id must be unique";
                        return(false);
                    }
                }
            }

            return(true);
        }
Beispiel #5
0
 private bool StartDateOverToday(object target, Dothan.Validation.RuleArgs e)
 {
     if (!_enddate.IsEmpty)
     {
         if (_startdate > _enddate)
         {
             e.Description = Dothan.Library.Properties.Resources.Date_start_end_rule;
             return(false);
         }
         else
         {
             return(true);
         }
     }
     else
     {
         return(true);
     }
 }