public void DocCreate(string name, string type) { DocModel doc = SerialisationService.GetDoc(name, type); if (doc == null) { DocModel NewDoc = new DocModel(name, type); SerialisationService.SerialiseDoc(NewDoc); } else { throw new Exception("Document : " + name + "-" + type + " already exists - not created."); } }
public void UpdateDoc(DocModel doc) { SerialisationService.SerialiseDoc(doc); HtmlWriter.MakeHtml(doc); }