Example #1
0
 public ActionResult Index()
 {
     FormDataAdapter adapter = new FormDataAdapter();
     List<Form> Forms;
     try
     {
         Forms = adapter.GetForms(User);
         return View(Forms);
     }
     catch (Exception ex)
     {
         ViewBag.Error = "Error in Index: " + ex.Message;
         return View((object)null);
     }
 }
Example #2
0
 public void Load(int ID)
 {
     FormDataAdapter adapter = new FormDataAdapter();
     try
     {
         Form f = adapter.GetForm(ID);
         this.ID = f.ID;
         this.CreatedDate = f.CreatedDate;
         this.CreatedBy = f.CreatedBy;
         this.Template = f.Template;
         this.Sections = f.Template.Sections;
     }
     catch (Exception ex)
     {
         throw new Exception("Error trying to load form in Template.Load(). See inner exception for details.", ex);
     }
 }
Example #3
0
 public void Save()
 {
     FormDataAdapter adapter = new FormDataAdapter();
     adapter.SaveForm(this);
 }
Example #4
0
 //
 // GET: /Maintenance/
 public ActionResult Index()
 {
     FormDataAdapter adapter = new FormDataAdapter();
     List<Form> Forms = adapter.GetForms(TemplateID: 3, User:User);
     return View(Forms);
 }
Example #5
0
 // GET api/forms
 public List<Form> Get()
 {
     FormDataAdapter adapter = new FormDataAdapter();
     List<Form> Forms = adapter.GetForms(User);
     return Forms;
 }