Пример #1
0
        protected void InitQuery(vStoreEmailTemplateQuery query)
        {
            query.OnLoadDelegate = this.OnQueryLoaded;

            if (!query.es2.HasConnection)
            {
                query.es2.Connection = ((IEntityCollection)this).Connection;
            }
        }
Пример #2
0
        public List <vStoreEmailTemplate> GetAllEmailTemplates()
        {
            vStoreEmailTemplateQuery q = new vStoreEmailTemplateQuery();

            q.Where(q.StoreId == this.Id);
            q.OrderBy(q.NameKey.Ascending);

            vStoreEmailTemplateCollection collection = new vStoreEmailTemplateCollection();

            collection.Load(q);

            return(collection.ToList());
        }
Пример #3
0
        public vStoreEmailTemplate GetStoreEmailTemplate(EmailTemplateNames templateName)
        {
            vStoreEmailTemplateQuery q = new vStoreEmailTemplateQuery();

            q.es.Top = 1;
            q.Where(q.StoreId == this.Id, q.NameKey == templateName.ToString());

            vStoreEmailTemplate template = new vStoreEmailTemplate();

            if (template.Load(q))
            {
                return(template);
            }
            return(null);
        }
Пример #4
0
 public bool Load(vStoreEmailTemplateQuery query)
 {
     this.query = query;
     InitQuery(this.query);
     return(Query.Load());
 }