Beispiel #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromOtvessellookupresults(ref DataRow row, Otvessellookupresults entity)
 {
     row.SetField("vesselno", entity.vesselno);
     row.SetField("vessnm", entity.vessnm);
     row.SetField("stagecd", entity.stagecd);
     row.SetField("shipco", entity.shipco);
     row.SetField("rowid-otevh", entity.rowidOtevh.ToByteArray());
     row.SetField("userfield", entity.userfield);
 }
Beispiel #2
0
        public static Otvessellookupresults BuildOtvessellookupresultsFromRow(DataRow row)
        {
            Otvessellookupresults entity = new Otvessellookupresults();

            entity.vesselno   = row.IsNull("vesselno") ? 0 : row.Field <int>("vesselno");
            entity.vessnm     = row.IsNull("vessnm") ? string.Empty : row.Field <string>("vessnm");
            entity.stagecd    = row.IsNull("stagecd") ? 0 : row.Field <int>("stagecd");
            entity.shipco     = row.IsNull("shipco") ? string.Empty : row.Field <string>("shipco");
            entity.rowidOtevh = row.Field <byte[]>("rowid-otevh").ToStringEncoded();
            entity.userfield  = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }