static public DdUserExt GetUserInfo(int personREF)
 {
   DaUser da = new DaUser(DataStore.DbConnection);
   if (da.GetById(personREF))
     return new DdUserExt(da.GetBuffer());
   else
     return null;
 }
 static public bool AddUser(ref DdUserExt item, RevisionInfo revisionInfo)
 {
   DaUser da = new DaUser(DataStore.DbConnection);
   da.Clear();
   da.Comment = item.Comment;
   da.Credentials = item.Credentials;
   da.FullName = item.FullName;
   da.Inactive = item.Inactive;
   da.Modified = item.Modified;
   da.ModifiedBy = item.ModifiedBy;
   da.UserID = item.UserID;
   da.Title = item.Title;
   bool ok = da.Insert();
   if (ok) AddChangeLog(da.TableName, da.Id, da.Timestamp, revisionInfo); //add
   if (ok) item = new DdUserExt(da.GetBuffer());
   return ok;
 }
 static public bool SaveUser(ref DdUserExt item, RevisionInfo revisionInfo)
 {
   DaUser da = new DaUser(DataStore.DbConnection);
   if (!da.GetById(item.Id)) return false;
   da.Comment = item.Comment;
   da.Credentials = item.Credentials;
   da.FullName = item.FullName;
   da.Inactive = item.Inactive;
   da.UserID = item.UserID;
   da.Title = item.Title;
   bool ok = true;
   if (da._IsModified)
   {
     da.Modified = DateTime.Now;
     da.ModifiedBy = Environment.UserName;
     ok = da.Save();
     if (ok) AddChangeLog(da.TableName, da.Id, da.Timestamp, revisionInfo);
     if (ok) item = new DdUserExt(da.GetBuffer());
   }
   return ok;
 }