Exemple #1
0
        public void RemoveExtraValue(CMSDataContext Db, string field)
        {
            var ev = OrganizationExtras.AsEnumerable().FirstOrDefault(ee => string.Compare(ee.Field, field, ignoreCase: true) == 0);

            if (ev != null)
            {
                Db.OrganizationExtras.DeleteOnSubmit(ev);
            }
        }
Exemple #2
0
        public OrganizationExtra GetExtraValue(string field)
        {
            var ev = OrganizationExtras.AsEnumerable().FirstOrDefault(ee => string.Compare(ee.Field, field, ignoreCase: true) == 0);

            if (ev == null)
            {
                ev = new OrganizationExtra()
                {
                    OrganizationId = OrganizationId,
                    Field          = field,
                };
                OrganizationExtras.Add(ev);
            }
            return(ev);
        }
Exemple #3
0
        public OrganizationExtra GetExtraValue(string field)
        {
            var ev = OrganizationExtras.AsEnumerable().FirstOrDefault(ee => ee.Field.Equal(field));

            if (ev == null)
            {
                ev = new OrganizationExtra()
                {
                    OrganizationId = OrganizationId,
                    Field          = field,
                };
                OrganizationExtras.Add(ev);
            }
            return(ev);
        }