Example #1
0
    public Viewer(DataModel.Viewer data) : this() {
      Data = data;
      Id = data.Id;
      Title = data.Name;

      LoadFolders(true);
      LoadFolders(false);
    }
Example #2
0
    public Viewer CreateViewer(string name) {
      var dmViewer = new DataModel.Viewer {
        Id = ACore.Db.GetNextIdFor<DataModel.Viewer>(),
        Name = name
      };

      ACore.Db.InsertOnSubmit(dmViewer);
      ACore.Db.SubmitChanges();

      var vmViewer = new Viewer(dmViewer);
      SetInPalce(vmViewer, true);
      return vmViewer;
    }