static public DdChangeRequestExt GetChangeRequestInfo(int changeRequestREF) { DaChangeRequest da = new DaChangeRequest(DataStore.DbConnection); if (da.GetById(changeRequestREF)) return new DdChangeRequestExt(da.GetBuffer()); else return null; }
static public bool AddChangeRequest(ref DdChangeRequestExt item, RevisionInfo revisionInfo) { DaChangeRequest da = new DaChangeRequest(DataStore.DbConnection); da.Clear(); da.ApplicationREF = item.ApplicationREF; da.Comment = item.Comment; da.Modified = item.Modified; da.ModifiedBy = item.ModifiedBy; da.RequestID = item.RequestID; da.Title = item.Title; bool ok = da.Insert(); if (ok) AddChangeLog(da.TableName, da.Id, da.Timestamp, revisionInfo); //add if (ok) item = new DdChangeRequestExt(da.GetBuffer()); return ok; }
static public bool SaveChangeRequest(ref DdChangeRequestExt item, RevisionInfo revisionInfo) { DaChangeRequest da = new DaChangeRequest(DataStore.DbConnection); if (!da.GetById(item.Id)) return false; da.ApplicationREF = item.ApplicationREF; da.Comment = item.Comment; da.RequestID = item.RequestID; 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 DdChangeRequestExt(da.GetBuffer()); } return ok; }