From db9d9d9b5936c3ed14ead78ece1da4ff21fbfa8d Mon Sep 17 00:00:00 2001 From: Jsj Date: Thu, 24 Apr 2008 14:41:50 +0000 Subject: [PATCH] --- .../Extension/AnnotationExt.cs | 55 +++++++++++++++++++ 1 file changed, 55 insertions(+) diff --git a/PROMS/VEPROMS.CSLA.Library/Extension/AnnotationExt.cs b/PROMS/VEPROMS.CSLA.Library/Extension/AnnotationExt.cs index 8b1fd74b..3c83d82e 100644 --- a/PROMS/VEPROMS.CSLA.Library/Extension/AnnotationExt.cs +++ b/PROMS/VEPROMS.CSLA.Library/Extension/AnnotationExt.cs @@ -18,12 +18,67 @@ namespace VEPROMS.CSLA.Library { return _Name; } + + + public static IList AllTypes() + { + List tlst = new List(); + foreach (AnnotationType at in _AllByPrimaryKey.Values) + { + tlst.Add(at); + } + return tlst; + } + public static Dictionary AllByName() + { + return _AllByName; + } } + public partial class AnnotationTypeInfo { + public static List AllList() + { + //return _AllList; + return AnnotationTypeInfo._AllList; + } + public override string ToString() { return _Name; } + } + + public partial class Annotation + { + /// + /// Change the annotation type and update the Annotation record + /// + /// + public void Update(int anotypeid) + { + if (_TypeID != anotypeid) + { + _TypeID = anotypeid; + MarkDirty(); // force the record update + Save(); + //Update(); // commit record to database + } + } + public void CommitChanges() + { + MarkDirty(); // force the record update + Save(true); + //Update(); + } + } + + //public partial class AnnotationTypeAnnotations + //{ + // public static int GetAnnotationID() + // { + // return AnnotationTypeAnnotat + // } + //} }