protected void InitQuery(vStoreEmailTemplateQuery query) { query.OnLoadDelegate = this.OnQueryLoaded; if (!query.es2.HasConnection) { query.es2.Connection = ((IEntityCollection)this).Connection; } }
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()); }
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); }
public bool Load(vStoreEmailTemplateQuery query) { this.query = query; InitQuery(this.query); return(Query.Load()); }