Exemplo n.º 1
0
 public void New(int TemplateID)
 {
     TemplateDataAdapter adapter = new TemplateDataAdapter();
     try
     {
         this.Template = adapter.GetTemplate(TemplateID);
     }
     catch (Exception ex)
     {
         throw new Exception("Error trying to load teamplate in Template.New(). See inner exception for details.", ex);
     }
     try
     {
         this.Sections = Template.Sections;
     }
     catch (Exception ex)
     {
         throw new Exception("Error trying to load form in Template.New(). See inner exception for details.", ex);
     }
 }
Exemplo n.º 2
0
 public void Load(int ID, bool Recursive = true)
 {
     this.ID = ID;
     //getFormStructure(comm);
     TemplateDataAdapter adapter = new TemplateDataAdapter();
     Template newTemp = adapter.GetTemplate(ID, Recursive);
     this.ID = newTemp.ID;
     this.Description = newTemp.Description;
     this.CreatedDate = newTemp.CreatedDate;
     this.Name = newTemp.Name;
     this.Sections = newTemp.Sections;
 }
Exemplo n.º 3
0
 public void Save()
 {
     //TODO: validation before attempting to save
     try
     {
         TemplateDataAdapter adapter = new TemplateDataAdapter();
         adapter.SaveTemplate(this);
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }