public static PFBNSNRuleEntity[] DataTableToEntitys(DataTable dt)
 {
     if (dt == null)
         return null;
     var results = new PFBNSNRuleEntity[dt.Rows.Count];
     for (int i = 0; i < dt.Rows.Count; i++)
     {
         results[i] = DataRowToEntity(dt.Rows[i]);
     }
     return results;
 }
 public static PFBNSNRuleEntity DataRowToEntity(DataRow row)
 {
     if (row == null)
         return null;
     var result = new PFBNSNRuleEntity()
     {
         BNEndPos = (int)(row["BNEndPos"]),
         BNStartPos = (int)(row["BNStartPos"]),
         TotalLen = (int)(row["TotalLen"]),
         IsSNOrFBN = (bool)(row["IsSNOrFBN"]),
     };
     return result;
 }