예제 #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromOtevvesselheader(ref DataRow row, Otevvesselheader entity)
 {
     row.SetField("vesselno", entity.vesselno);
     row.SetField("vessnm", entity.vessnm);
     row.SetField("voyageno", entity.voyageno);
     row.SetField("shipid", entity.shipid);
     row.SetField("shipco", entity.shipco);
     row.SetField("countryorgcd", entity.countryorgcd);
     row.SetField("countrydestcd", entity.countrydestcd);
     row.SetField("actdeptdt", entity.actdeptdt);
     row.SetField("actarrdt", entity.actarrdt);
     row.SetField("actunldt", entity.actunldt);
     row.SetField("estdeptdt", entity.estdeptdt);
     row.SetField("estarrdt", entity.estarrdt);
     row.SetField("estunldt", entity.estunldt);
     row.SetField("revdeptdt", entity.revdeptdt);
     row.SetField("revarrdt", entity.revarrdt);
     row.SetField("revunldt", entity.revunldt);
     row.SetField("rowid-otevh", entity.rowidOtevh.ToByteArray());
     row.SetField("userfield", entity.userfield);
 }
예제 #2
0
        public static Otevvesselheader BuildOtevvesselheaderFromRow(DataRow row)
        {
            Otevvesselheader entity = new Otevvesselheader();

            entity.vesselno      = row.IsNull("vesselno") ? 0 : row.Field <int>("vesselno");
            entity.vessnm        = row.IsNull("vessnm") ? string.Empty : row.Field <string>("vessnm");
            entity.voyageno      = row.IsNull("voyageno") ? string.Empty : row.Field <string>("voyageno");
            entity.shipid        = row.IsNull("shipid") ? string.Empty : row.Field <string>("shipid");
            entity.shipco        = row.IsNull("shipco") ? string.Empty : row.Field <string>("shipco");
            entity.countryorgcd  = row.IsNull("countryorgcd") ? string.Empty : row.Field <string>("countryorgcd");
            entity.countrydestcd = row.IsNull("countrydestcd") ? string.Empty : row.Field <string>("countrydestcd");
            entity.actdeptdt     = row.Field <DateTime?>("actdeptdt");
            entity.actarrdt      = row.Field <DateTime?>("actarrdt");
            entity.actunldt      = row.Field <DateTime?>("actunldt");
            entity.estdeptdt     = row.Field <DateTime?>("estdeptdt");
            entity.estarrdt      = row.Field <DateTime?>("estarrdt");
            entity.estunldt      = row.Field <DateTime?>("estunldt");
            entity.revdeptdt     = row.Field <DateTime?>("revdeptdt");
            entity.revarrdt      = row.Field <DateTime?>("revarrdt");
            entity.revunldt      = row.Field <DateTime?>("revunldt");
            entity.rowidOtevh    = row.Field <byte[]>("rowid-otevh").ToStringEncoded();
            entity.userfield     = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }