コード例 #1
0
    static public bool DeleteTaskRole(DdTaskRoleExt item, RevisionInfo revisionInfo)
    {
      DaTaskRole da = new DaTaskRole(DataStore.DbConnection);
      bool ok = da.DeleteById(item.Id);
      if (ok) AddChangeLog(da.TableName, item.Id, item.Timestamp, revisionInfo); //delete
	  return ok;
    }
コード例 #2
0
 static public bool AddTaskRole(ref DdTaskRoleExt item, RevisionInfo revisionInfo)
 {
   DaTaskRole da = new DaTaskRole(DataStore.DbConnection);
   da.Clear();
   da.Description = item.Description;
   da.Modified = item.Modified;
   da.ModifiedBy = item.ModifiedBy;
   da.OnlyOne = item.OnlyOne;
   da.ProjectLevel = item.ProjectLevel;
   da.TaskRoleID = item.TaskRoleID;
   da.Title = item.Title;
   bool ok = da.Insert();
   if (ok) AddChangeLog(da.TableName, da.Id, da.Timestamp, revisionInfo); //add
   if (ok) item = new DdTaskRoleExt(da.GetBuffer());
   return ok;
 }
コード例 #3
0
 static public bool SaveTaskRole(ref DdTaskRoleExt item, RevisionInfo revisionInfo)
 {
   DaTaskRole da = new DaTaskRole(DataStore.DbConnection);
   if (!da.GetById(item.Id)) return false;
   da.Description = item.Description;
   da.OnlyOne = item.OnlyOne;
   da.ProjectLevel = item.ProjectLevel;
   da.TaskRoleID = item.TaskRoleID;
   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 DdTaskRoleExt(da.GetBuffer());
   }
   return ok;
 }