예제 #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromValinelistcriteria(ref DataRow row, Valinelistcriteria entity)
 {
     row.SetField("functionnm", entity.functionnm);
     row.SetField("vano", entity.vano);
     row.SetField("vasuf", entity.vasuf);
     row.SetField("seqno", entity.seqno);
     row.SetField("lineno", entity.lineno);
     row.SetField("valinerowid", entity.valinerowid.ToByteArray());
 }
예제 #2
0
        public static Valinelistcriteria BuildValinelistcriteriaFromRow(DataRow row)
        {
            Valinelistcriteria entity = new Valinelistcriteria();

            entity.functionnm  = row.IsNull("functionnm") ? string.Empty : row.Field <string>("functionnm");
            entity.vano        = row.IsNull("vano") ? 0 : row.Field <int>("vano");
            entity.vasuf       = row.IsNull("vasuf") ? 0 : row.Field <int>("vasuf");
            entity.seqno       = row.IsNull("seqno") ? 0 : row.Field <int>("seqno");
            entity.lineno      = row.IsNull("lineno") ? 0 : row.Field <int>("lineno");
            entity.valinerowid = row.Field <byte[]>("valinerowid").ToStringEncoded();
            return(entity);
        }