Exemplo n.º 1
0
    static public bool DeletePerson(DdPersonExt item, RevisionInfo revisionInfo)
    {
      DaPerson da = new DaPerson(DataStore.DbConnection);
      bool ok = da.DeleteById(item.Id);
      if (ok) AddChangeLog(da.TableName, item.Id, item.Timestamp, revisionInfo); //delete
	  return ok;
    }
Exemplo n.º 2
0
 static public bool AddPerson(ref DdPersonExt item, RevisionInfo revisionInfo)
 {
   DaPerson da = new DaPerson(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.PersonID = item.PersonID;
   da.Title = item.Title;
   bool ok = da.Insert();
   if (ok) AddChangeLog(da.TableName, da.Id, da.Timestamp, revisionInfo); //add
   if (ok) item = new DdPersonExt(da.GetBuffer());
   return ok;
 }
Exemplo n.º 3
0
 static public bool SavePerson(ref DdPersonExt item, RevisionInfo revisionInfo)
 {
   DaPerson da = new DaPerson(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.PersonID = item.PersonID;
   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 DdPersonExt(da.GetBuffer());
   }
   return ok;
 }
Exemplo n.º 4
0
 override protected void ClearForm()
 {
   dd = new DdPersonExt();
   FillForm();
 }