//ValidateWithConfim (Email, Password) public void Validate(ModelStateDictionary modelState) { ValidationCheck.CheckErrors(this, modelState, true); //check start and end date if (DateStart.CompareTo(DateEnd) >= 0) { modelState.AddModelError("DateEnd", "End Date must be greater than Start Date."); } try { CategoriesList = new List <long>(); if (!String.IsNullOrEmpty(Categories)) { CategoriesList.AddRange(Array.ConvertAll(Categories.Split(','), new Converter <string, long>(StringToLong))); } } catch (Exception ex) { modelState.AddModelError("Categories", ex.Message); } if (CategoriesList == null || CategoriesList.Count == 0) { modelState.AddModelError("CategoriesList", "Choose category(s) before updating this event."); } }
public int CompareTo(SchedulingEntity other) { if (CompanyId == other.CompanyId) { return(DateStart.CompareTo(other.DateStart)); } else { return(CompanyId.CompareTo(other.CompanyId)); } }
public int CompareTo(CompanyCalenderEntity other) { if (CompanyId == other.CompanyId) { return(DateStart.CompareTo(other.DateStart)); } else { return(CompanyId.CompareTo(other.CompanyId)); } }