Exemple #1
0
 /// <summary>
 /// 取得欄位值後轉型成float。
 /// </summary>
 /// <param name="row">資料列。</param>
 /// <param name="fieldName">欄位名稱。</param>
 /// <param name="dataRowVersion">資料列版本。</param>
 public static float ValueAsFloat(this DataRow row, string fieldName, DataRowVersion dataRowVersion)
 {
     if (BaseFunc.IsNotNull(row) && DataFunc.HasField(row, fieldName))
     {
         return(BaseFunc.CFloat(row[fieldName, dataRowVersion]));
     }
     return(0);
 }