Esempio n. 1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromOtittrackresults2(ref DataRow row, Otittrackresults2 entity)
 {
     row.SetField("trackno", entity.trackno);
     row.SetField("notesfl", entity.notesfl);
     row.SetField("stagecd", entity.stagecd);
     row.SetField("tracklineno", entity.tracklineno);
     row.SetField("otcomment", entity.otcomment);
     row.SetField("prod", entity.prod);
     row.SetField("pono", entity.pono);
     row.SetField("posuf", entity.posuf);
     row.SetField("lineno", entity.lineno);
     row.SetField("comment", entity.comment);
     row.SetField("povendno", entity.povendno);
     row.SetField("povendnotes", entity.povendnotes);
     row.SetField("vessnm", entity.vessnm);
     row.SetField("prodstdt", entity.prodstdt);
     row.SetField("prodcompdt", entity.prodcompdt);
     row.SetField("deptdt", entity.deptdt);
     row.SetField("dockarrdt", entity.dockarrdt);
     row.SetField("dockreddt", entity.dockreddt);
     row.SetField("dockdemurdt", entity.dockdemurdt);
     row.SetField("atwhsedt", entity.atwhsedt);
     row.SetField("lastfreedt", entity.lastfreedt);
     row.SetField("whseunldt", entity.whseunldt);
     row.SetField("empdt", entity.empdt);
     row.SetField("retdt", entity.retdt);
     row.SetField("vendno", entity.vendno);
     row.SetField("vendnotes", entity.vendnotes);
     row.SetField("userfield", entity.userfield);
 }
Esempio n. 2
0
        public static Otittrackresults2 BuildOtittrackresults2FromRow(DataRow row)
        {
            Otittrackresults2 entity = new Otittrackresults2();

            entity.trackno     = row.IsNull("trackno") ? 0 : row.Field <int>("trackno");
            entity.notesfl     = row.IsNull("notesfl") ? string.Empty : row.Field <string>("notesfl");
            entity.stagecd     = row.IsNull("stagecd") ? 0 : row.Field <int>("stagecd");
            entity.tracklineno = row.IsNull("tracklineno") ? 0 : row.Field <int>("tracklineno");
            entity.otcomment   = row.IsNull("otcomment") ? string.Empty : row.Field <string>("otcomment");
            entity.prod        = row.IsNull("prod") ? string.Empty : row.Field <string>("prod");
            entity.pono        = row.IsNull("pono") ? 0 : row.Field <int>("pono");
            entity.posuf       = row.IsNull("posuf") ? 0 : row.Field <int>("posuf");
            entity.lineno      = row.IsNull("lineno") ? 0 : row.Field <int>("lineno");
            entity.comment     = row.IsNull("comment") ? string.Empty : row.Field <string>("comment");
            entity.povendno    = row.IsNull("povendno") ? decimal.Zero : row.Field <decimal>("povendno");
            entity.povendnotes = row.IsNull("povendnotes") ? string.Empty : row.Field <string>("povendnotes");
            entity.vessnm      = row.IsNull("vessnm") ? string.Empty : row.Field <string>("vessnm");
            entity.prodstdt    = row.Field <DateTime?>("prodstdt");
            entity.prodcompdt  = row.Field <DateTime?>("prodcompdt");
            entity.deptdt      = row.Field <DateTime?>("deptdt");
            entity.dockarrdt   = row.Field <DateTime?>("dockarrdt");
            entity.dockreddt   = row.Field <DateTime?>("dockreddt");
            entity.dockdemurdt = row.Field <DateTime?>("dockdemurdt");
            entity.atwhsedt    = row.Field <DateTime?>("atwhsedt");
            entity.lastfreedt  = row.Field <DateTime?>("lastfreedt");
            entity.whseunldt   = row.Field <DateTime?>("whseunldt");
            entity.empdt       = row.Field <DateTime?>("empdt");
            entity.retdt       = row.Field <DateTime?>("retdt");
            entity.vendno      = row.IsNull("vendno") ? decimal.Zero : row.Field <decimal>("vendno");
            entity.vendnotes   = row.IsNull("vendnotes") ? string.Empty : row.Field <string>("vendnotes");
            entity.userfield   = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }