Exemplo n.º 1
0
 //Записывает себя в ReportParams, reportId - id родительской записи
 public void ToRecordset(IRecordSet rec, int reportId, bool addnew = false)
 {
     if (addnew)
     {
         rec.AddNew();
     }
     rec.Put("ReportId", reportId);
     rec.Put("ParamId", ParamId);
     rec.Put("Project", Project);
     rec.Put("Code", Code);
     rec.Put("DataType", DataType.ToRussian());
     rec.Put("SuperProcessType", SuperProcess.ToRussian());
     rec.Put("CalcParamType", CalcParamType.ToRussian());
     rec.Put("IsSingle", Queries.ContainsKey(IntervalType.Single));
     rec.Put("IsBase", Queries.ContainsKey(IntervalType.Base));
     rec.Put("IsHour", Queries.ContainsKey(IntervalType.Hour));
     rec.Put("IsDay", Queries.ContainsKey(IntervalType.Day));
     rec.Put("IsCombined", Queries.ContainsKey(IntervalType.Combined));
     rec.Put("IsAbsolute", Queries.ContainsKey(IntervalType.Absolute));
     rec.Put("IsAbsoluteDay", Queries.ContainsKey(IntervalType.AbsoluteDay));
     rec.Put("IsAbsoluteCombined", Queries.ContainsKey(IntervalType.AbsoluteCombined));
     rec.Put("IsAbsoluteListBase", Queries.ContainsKey(IntervalType.AbsoluteListBase));
     rec.Put("IsAbsoluteListHour", Queries.ContainsKey(IntervalType.AbsoluteListHour));
     rec.Put("IsAbsoluteListDay", Queries.ContainsKey(IntervalType.AbsoluteListDay));
     rec.Put("IsMoments", Queries.ContainsKey(IntervalType.Moments));
     if (addnew)
     {
         rec.Update();
     }
 }