static public bool DeleteTaskHeadingRole(DdTaskHeadingRoleExt item, RevisionInfo revisionInfo) { DaTaskHeadingRole da = new DaTaskHeadingRole(DataStore.DbConnection); bool ok = da.DeleteById(item.Id); if (ok) AddChangeLog(da.TableName, item.Id, item.Timestamp, revisionInfo); //delete return ok; }
static public bool AddTaskHeadingRole(ref DdTaskHeadingRoleExt item, RevisionInfo revisionInfo) { DaTaskHeadingRole da = new DaTaskHeadingRole(DataStore.DbConnection); da.Clear(); da.Modified = item.Modified; da.ModifiedBy = item.ModifiedBy; da.PersonREF = item.PersonREF; da.TaskHeadingREF = item.TaskHeadingREF; da.TaskRoleREF = item.TaskRoleREF; bool ok = da.Insert(); if (ok) AddChangeLog(da.TableName, da.Id, da.Timestamp, revisionInfo); //add if (ok) item = new DdTaskHeadingRoleExt(da.GetBuffer()); return ok; }
static public bool SaveTaskHeadingRole(ref DdTaskHeadingRoleExt item, RevisionInfo revisionInfo) { DaTaskHeadingRole da = new DaTaskHeadingRole(DataStore.DbConnection); if (!da.GetById(item.Id)) return false; da.PersonREF = item.PersonREF; da.TaskHeadingREF = item.TaskHeadingREF; da.TaskRoleREF = item.TaskRoleREF; 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 DdTaskHeadingRoleExt(da.GetBuffer()); } return ok; }