예제 #1
0
 static public DdRequestStatusExt GetRequestStatuInfo(int requestStatuREF)
 {
   DaRequestStatus da = new DaRequestStatus(DataStore.DbConnection);
   if (da.GetById(requestStatuREF))
     return new DdRequestStatusExt(da.GetBuffer());
   else
     return null;
 }
예제 #2
0
 static public bool AddRequestStatu(ref DdRequestStatusExt item, RevisionInfo revisionInfo)
 {
   DaRequestStatus da = new DaRequestStatus(DataStore.DbConnection);
   da.Clear();
   da.ChangeRequestREF = item.ChangeRequestREF;
   da.Comment = item.Comment;
   da.EffectiveDate = item.EffectiveDate;
   da.Hours = item.Hours;
   da.Modified = item.Modified;
   da.ModifiedBy = item.ModifiedBy;
   da.PersonREF = item.PersonREF;
   da.StatusID = item.StatusID;
   bool ok = da.Insert();
   if (ok) AddChangeLog(da.TableName, da.Id, da.Timestamp, revisionInfo); //add
   if (ok) item = new DdRequestStatusExt(da.GetBuffer());
   return ok;
 }
예제 #3
0
 static public bool SaveRequestStatu(ref DdRequestStatusExt item, RevisionInfo revisionInfo)
 {
   DaRequestStatus da = new DaRequestStatus(DataStore.DbConnection);
   if (!da.GetById(item.Id)) return false;
   da.ChangeRequestREF = item.ChangeRequestREF;
   da.Comment = item.Comment;
   da.EffectiveDate = item.EffectiveDate;
   da.Hours = item.Hours;
   da.PersonREF = item.PersonREF;
   da.StatusID = item.StatusID;
   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 DdRequestStatusExt(da.GetBuffer());
   }
   return ok;
 }