예제 #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromOtittrackcriteria(ref DataRow row, Otittrackcriteria entity)
 {
     row.SetField("trackno", entity.trackno);
     row.SetField("vendno", entity.vendno);
     row.SetField("prod", entity.prod);
     row.SetField("whse", entity.whse);
     row.SetField("shipfmno", entity.shipfmno);
     row.SetField("pono", entity.pono);
     row.SetField("posuf", entity.posuf);
     row.SetField("producfm", entity.producfm);
     row.SetField("producto", entity.producto);
     row.SetField("complfm", entity.complfm);
     row.SetField("complto", entity.complto);
     row.SetField("shipfm", entity.shipfm);
     row.SetField("shipto", entity.shipto);
     row.SetField("arrfm", entity.arrfm);
     row.SetField("arrto", entity.arrto);
     row.SetField("rdfm", entity.rdfm);
     row.SetField("rdto", entity.rdto);
     row.SetField("demufm", entity.demufm);
     row.SetField("demuto", entity.demuto);
     row.SetField("atwhsefm", entity.atwhsefm);
     row.SetField("atwhseto", entity.atwhseto);
     row.SetField("contno", entity.contno);
     row.SetField("voyageno", entity.voyageno);
     row.SetField("bolno", entity.bolno);
     row.SetField("shipco", entity.shipco);
     row.SetField("vessnm", entity.vessnm);
     row.SetField("countryorg", entity.countryorg);
     row.SetField("countrydest", entity.countrydest);
     row.SetField("statuscd", entity.statuscd);
     row.SetField("stagecd", entity.stagecd);
     row.SetField("detailtype", entity.detailtype);
     row.SetField("userfield", entity.userfield);
 }
예제 #2
0
        public static Otittrackcriteria BuildOtittrackcriteriaFromRow(DataRow row)
        {
            Otittrackcriteria entity = new Otittrackcriteria();

            entity.trackno     = row.IsNull("trackno") ? 0 : row.Field <int>("trackno");
            entity.vendno      = row.IsNull("vendno") ? decimal.Zero : row.Field <decimal>("vendno");
            entity.prod        = row.IsNull("prod") ? string.Empty : row.Field <string>("prod");
            entity.whse        = row.IsNull("whse") ? string.Empty : row.Field <string>("whse");
            entity.shipfmno    = row.IsNull("shipfmno") ? 0 : row.Field <int>("shipfmno");
            entity.pono        = row.IsNull("pono") ? 0 : row.Field <int>("pono");
            entity.posuf       = row.IsNull("posuf") ? 0 : row.Field <int>("posuf");
            entity.producfm    = row.Field <DateTime?>("producfm");
            entity.producto    = row.Field <DateTime?>("producto");
            entity.complfm     = row.Field <DateTime?>("complfm");
            entity.complto     = row.Field <DateTime?>("complto");
            entity.shipfm      = row.Field <DateTime?>("shipfm");
            entity.shipto      = row.Field <DateTime?>("shipto");
            entity.arrfm       = row.Field <DateTime?>("arrfm");
            entity.arrto       = row.Field <DateTime?>("arrto");
            entity.rdfm        = row.Field <DateTime?>("rdfm");
            entity.rdto        = row.Field <DateTime?>("rdto");
            entity.demufm      = row.Field <DateTime?>("demufm");
            entity.demuto      = row.Field <DateTime?>("demuto");
            entity.atwhsefm    = row.Field <DateTime?>("atwhsefm");
            entity.atwhseto    = row.Field <DateTime?>("atwhseto");
            entity.contno      = row.IsNull("contno") ? string.Empty : row.Field <string>("contno");
            entity.voyageno    = row.IsNull("voyageno") ? string.Empty : row.Field <string>("voyageno");
            entity.bolno       = row.IsNull("bolno") ? string.Empty : row.Field <string>("bolno");
            entity.shipco      = row.IsNull("shipco") ? string.Empty : row.Field <string>("shipco");
            entity.vessnm      = row.IsNull("vessnm") ? string.Empty : row.Field <string>("vessnm");
            entity.countryorg  = row.IsNull("countryorg") ? string.Empty : row.Field <string>("countryorg");
            entity.countrydest = row.IsNull("countrydest") ? string.Empty : row.Field <string>("countrydest");
            entity.statuscd    = row.IsNull("statuscd") ? string.Empty : row.Field <string>("statuscd");
            entity.stagecd     = row.IsNull("stagecd") ? string.Empty : row.Field <string>("stagecd");
            entity.detailtype  = row.IsNull("detailtype") ? string.Empty : row.Field <string>("detailtype");
            entity.userfield   = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }