예제 #1
0
 protected override void fillParametersFromRow(DataRow row)
 {
     this.Id   = row["id"].ToString();
     this.Name = row["name"].ToString();
     for (int res = 0; res < ResistanceList.Length; res++)
     {
         for (int volt = 0; volt < ResistanceList[res].Length; volt++)
         {
             if (ResistanceList[res][volt] >= 0)
             {
                 ResistanceList[res][volt] = ServiceFunctions.convertToFloat(row[String.Format("res{0}_volt{1}", res, volt)]);
             }
         }
     }
 }
 protected override void fillFromDataRow(DataRow dataRow)
 {
     this.rangeCoeffs = new float[] {
         ServiceFunctions.convertToFloat(dataRow["zero_range_coeff"]),
         ServiceFunctions.convertToFloat(dataRow["first_range_coeff"]),
         ServiceFunctions.convertToFloat(dataRow["second_range_coeff"]),
         ServiceFunctions.convertToFloat(dataRow["third_range_coeff"]),
         ServiceFunctions.convertToFloat(dataRow["third_range_additional_coeff"])
     };
     this.voltageCoeffs = new float[]
     {
         ServiceFunctions.convertToFloat(dataRow["one_hundred_volts_coeff"]),
         ServiceFunctions.convertToFloat(dataRow["five_hundred_volts_coeff"]),
         ServiceFunctions.convertToFloat(dataRow["thousand_volts_coeff"])
     };
     this.checkSumFromDB = (uint)dataRow["coeffs_check_sum"];
 }