Exemplo n.º 1
0
 static public DdTimeReportExt GetTimeReportInfo(int timeReportREF)
 {
   DaTimeReport da = new DaTimeReport(DataStore.DbConnection);
   if (da.GetById(timeReportREF))
     return new DdTimeReportExt(da.GetBuffer());
   else
     return null;
 }
Exemplo n.º 2
0
 static public bool AddTimeReport(ref DdTimeReportExt item, RevisionInfo revisionInfo)
 {
   DaTimeReport da = new DaTimeReport(DataStore.DbConnection);
   da.Clear();
   da.CalendarREF = item.CalendarREF;
   da.Description = item.Description;
   da.EffectiveDate = item.EffectiveDate;
   da.Hours = item.Hours;
   da.Modified = item.Modified;
   da.ModifiedBy = item.ModifiedBy;
   da.PersonREF = item.PersonREF;
   da.TaskChargeCodeREF = item.TaskChargeCodeREF;
   bool ok = da.Insert();
   if (ok) AddChangeLog(da.TableName, da.Id, da.Timestamp, revisionInfo); //add
   if (ok) item = new DdTimeReportExt(da.GetBuffer());
   return ok;
 }
Exemplo n.º 3
0
 static public bool SaveTimeReport(ref DdTimeReportExt item, RevisionInfo revisionInfo)
 {
   DaTimeReport da = new DaTimeReport(DataStore.DbConnection);
   if (!da.GetById(item.Id)) return false;
   da.CalendarREF = item.CalendarREF;
   da.Description = item.Description;
   da.EffectiveDate = item.EffectiveDate;
   da.Hours = item.Hours;
   da.PersonREF = item.PersonREF;
   da.TaskChargeCodeREF = item.TaskChargeCodeREF;
   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 DdTimeReportExt(da.GetBuffer());
   }
   return ok;
 }