public PaymentRuleValidator()
        {
            this.validators = new Dictionary <int, ITourRuleConstraintValidator>();

            GeneralTypeCollection types = DomainModel.TourCostConstraintTypes.GetAll();

            foreach (GeneralType type in types)
            {
                this.validators.Add(type.Id, GetValidator(type.Id));
            }
        }
Exemplo n.º 2
0
        private static void BuildCache()
        {
            classes = new CategoryClassCollection();
            categoriesRepo.LoadAll(classes);

            foreach (Entities.CategoryClass cat in classes)
            {
                foreach (Culture culture in DomainModel.Cultures.GetAll())
                {
                    GeneralTypeCollection types = Types.GetByName(cat.Name, culture);

                    CategorySub sub = new CategorySub();
                    sub.Language = culture;
                    sub.Types    = types;

                    cat.SubCategories.Add(sub);
                }
            }
        }
Exemplo n.º 3
0
        private void btnAddContact_Click(object sender, EventArgs e)
        {
            GeneralTypeCollection medias =
                DomainModel.ContactMediaTypes.GetAll();

            Contact contact = new Contact();

            if (medias != null && medias.Count > 0)
            {
                contact.Media = medias[0];
            }
            this.member.Contacts.Add(contact);

            try
            {
                int lastId = Math.Max(this.dgvContacts.Rows.Count - 1, 0);
                this.dgvContacts.Rows[lastId].Cells[0].Selected = true;
                this.dgvContacts.BeginEdit(true);
            }
            catch (Exception)
            {
            }
        }
Exemplo n.º 4
0
 private static void LoadAll(Culture culture)
 {
     cache = repo.GetByName("ServiceTypes", culture.Id);
 }
Exemplo n.º 5
0
 private static void LoadAll(Culture culture)
 {
     cache = repo.GetByName("TourType", culture.Id);
 }
Exemplo n.º 6
0
 private static void LoadAll(Culture culture)
 {
     _cache = _repo.GetByName("MailEventTypes", culture.Id);
 }
Exemplo n.º 7
0
 public CategorySub()
 {
     this.Types = new GeneralTypeCollection();
 }
 private static void LoadAll(Culture culture)
 {
     cache = repo.GetByName("TourCostRuleConstraintTypes", culture.Id);
 }
Exemplo n.º 9
0
 private static void LoadAll(Culture culture)
 {
     cache = repo.GetByName("TourMembershipTypes", culture.Id);
 }
Exemplo n.º 10
0
 private static void LoadAll(Culture culture)
 {
     cache = repo.GetByName("PersonTitleTypes", culture.Id);
 }
Exemplo n.º 11
0
 private static void LoadAll(Culture culture)
 {
     cache = repo.GetByName("ContactMediaTypes", culture.Id);
 }