Example #1
0
    static public bool DeleteStep(DdStepExt item, RevisionInfo revisionInfo)
    {
      DaStep da = new DaStep(DataStore.DbConnection);
      bool ok = da.DeleteById(item.Id);
      if (ok) AddChangeLog(da.TableName, item.Id, item.Timestamp, revisionInfo); //delete
	  return ok;
    }
Example #2
0
 static public bool AddStep(ref DdStepExt item, RevisionInfo revisionInfo)
 {
   DaStep da = new DaStep(DataStore.DbConnection);
   da.Clear();
   da.Description = item.Description;
   da.DueDate = item.DueDate;
   da.EstHours = item.EstHours;
   da.Modified = item.Modified;
   da.ModifiedBy = item.ModifiedBy;
   da.StepID = item.StepID;
   da.TaskREF = item.TaskREF;
   da.Title = item.Title;
   bool ok = da.Insert();
   if (ok) AddChangeLog(da.TableName, da.Id, da.Timestamp, revisionInfo); //add
   if (ok) item = new DdStepExt(da.GetBuffer());
   return ok;
 }
Example #3
0
 static public bool SaveStep(ref DdStepExt item, RevisionInfo revisionInfo)
 {
   DaStep da = new DaStep(DataStore.DbConnection);
   if (!da.GetById(item.Id)) return false;
   da.Description = item.Description;
   da.DueDate = item.DueDate;
   da.EstHours = item.EstHours;
   da.StepID = item.StepID;
   da.TaskREF = item.TaskREF;
   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 DdStepExt(da.GetBuffer());
   }
   return ok;
 }