Ejemplo n.º 1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromOtettrackdetail(ref DataRow row, Otettrackdetail entity)
 {
     row.SetField("trackno", entity.trackno);
     row.SetField("vendno", entity.vendno);
     row.SetField("shipfmno", entity.shipfmno);
     row.SetField("whse", entity.whse);
     row.SetField("stagecd", entity.stagecd);
     row.SetField("vendname", entity.vendname);
     row.SetField("shipfm", entity.shipfm);
     row.SetField("vendoraddr1", entity.vendoraddr1);
     row.SetField("fromaddr1", entity.fromaddr1);
     row.SetField("vendoraddr2", entity.vendoraddr2);
     row.SetField("fromaddr2", entity.fromaddr2);
     row.SetField("vendoraddr3", entity.vendoraddr3);
     row.SetField("fromaddr3", entity.fromaddr3);
     row.SetField("fromcity", entity.fromcity);
     row.SetField("fromst", entity.fromst);
     row.SetField("fromzip", entity.fromzip);
     row.SetField("vendorcity", entity.vendorcity);
     row.SetField("vendorst", entity.vendorst);
     row.SetField("vendorzip", entity.vendorzip);
     row.SetField("fromphone", entity.fromphone);
     row.SetField("fromcountry", entity.fromcountry);
     row.SetField("vendphone", entity.vendphone);
     row.SetField("vendcountry", entity.vendcountry);
     row.SetField("contact", entity.contact);
     row.SetField("countryorg", entity.countryorg);
     row.SetField("countrydest", entity.countrydest);
     row.SetField("vessnm", entity.vessnm);
     row.SetField("portno", entity.portno);
     row.SetField("voyno", entity.voyno);
     row.SetField("portnm", entity.portnm);
     row.SetField("shipco", entity.shipco);
     row.SetField("shipid", entity.shipid);
     row.SetField("contno", entity.contno);
     row.SetField("contsize", entity.contsize);
     row.SetField("bofl", entity.bofl);
     row.SetField("lettofcr", entity.lettofcr);
     row.SetField("freeformaddrfl", entity.freeformaddrfl);
     row.SetField("currsymbol", entity.currsymbol);
     row.SetField("estprodstdt", entity.estprodstdt);
     row.SetField("revprodstdt", entity.revprodstdt);
     row.SetField("actprodstdt", entity.actprodstdt);
     row.SetField("prodstdtenabled", entity.prodstdtenabled);
     row.SetField("estcompdt", entity.estcompdt);
     row.SetField("revcompdt", entity.revcompdt);
     row.SetField("actcompdt", entity.actcompdt);
     row.SetField("compdtenabled", entity.compdtenabled);
     row.SetField("estdeptdt", entity.estdeptdt);
     row.SetField("revdeptdt", entity.revdeptdt);
     row.SetField("actdeptdt", entity.actdeptdt);
     row.SetField("deptdtenabled", entity.deptdtenabled);
     row.SetField("estdockarrdt", entity.estdockarrdt);
     row.SetField("revdockarrdt", entity.revdockarrdt);
     row.SetField("actdockarrdt", entity.actdockarrdt);
     row.SetField("dockarrdtenabled", entity.dockarrdtenabled);
     row.SetField("estdockreddt", entity.estdockreddt);
     row.SetField("revdockreddt", entity.revdockreddt);
     row.SetField("actdockreddt", entity.actdockreddt);
     row.SetField("dockreddtenabled", entity.dockreddtenabled);
     row.SetField("estdockdemudt", entity.estdockdemudt);
     row.SetField("revdemudt", entity.revdemudt);
     row.SetField("actdockdemudt", entity.actdockdemudt);
     row.SetField("dockdemudtenabled", entity.dockdemudtenabled);
     row.SetField("estatwhsedt", entity.estatwhsedt);
     row.SetField("revatwhsedt", entity.revatwhsedt);
     row.SetField("actatwhsedt", entity.actatwhsedt);
     row.SetField("atwhsedtenabled", entity.atwhsedtenabled);
     row.SetField("estlastfreedt", entity.estlastfreedt);
     row.SetField("revlastfreedt", entity.revlastfreedt);
     row.SetField("actlastfreedt", entity.actlastfreedt);
     row.SetField("lastfreedtenabled", entity.lastfreedtenabled);
     row.SetField("estwhseunldt", entity.estwhseunldt);
     row.SetField("revwhseunldt", entity.revwhseunldt);
     row.SetField("actwhseunldt", entity.actwhseunldt);
     row.SetField("whseunldtenabled", entity.whseunldtenabled);
     row.SetField("estemptydt", entity.estemptydt);
     row.SetField("revemptydt", entity.revemptydt);
     row.SetField("actemptydt", entity.actemptydt);
     row.SetField("emptydtenabled", entity.emptydtenabled);
     row.SetField("estretdt", entity.estretdt);
     row.SetField("revretdt", entity.revretdt);
     row.SetField("actretdt", entity.actretdt);
     row.SetField("retdtenabled", entity.retdtenabled);
     row.SetField("afterrcvstg", entity.afterrcvstg);
     row.SetField("totlineamt", entity.totlineamt);
     row.SetField("tottrackamt", entity.tottrackamt);
     row.SetField("totqtyord", entity.totqtyord);
     row.SetField("totcubes", entity.totcubes);
     row.SetField("totweight", entity.totweight);
     row.SetField("userfield", entity.userfield);
 }
Ejemplo n.º 2
0
        public static Otettrackdetail BuildOtettrackdetailFromRow(DataRow row)
        {
            Otettrackdetail entity = new Otettrackdetail();

            entity.trackno           = row.IsNull("trackno") ? 0 : row.Field <int>("trackno");
            entity.vendno            = row.IsNull("vendno") ? decimal.Zero : row.Field <decimal>("vendno");
            entity.shipfmno          = row.IsNull("shipfmno") ? 0 : row.Field <int>("shipfmno");
            entity.whse              = row.IsNull("whse") ? string.Empty : row.Field <string>("whse");
            entity.stagecd           = row.IsNull("stagecd") ? 0 : row.Field <int>("stagecd");
            entity.vendname          = row.IsNull("vendname") ? string.Empty : row.Field <string>("vendname");
            entity.shipfm            = row.IsNull("shipfm") ? string.Empty : row.Field <string>("shipfm");
            entity.vendoraddr1       = row.IsNull("vendoraddr1") ? string.Empty : row.Field <string>("vendoraddr1");
            entity.fromaddr1         = row.IsNull("fromaddr1") ? string.Empty : row.Field <string>("fromaddr1");
            entity.vendoraddr2       = row.IsNull("vendoraddr2") ? string.Empty : row.Field <string>("vendoraddr2");
            entity.fromaddr2         = row.IsNull("fromaddr2") ? string.Empty : row.Field <string>("fromaddr2");
            entity.vendoraddr3       = row.IsNull("vendoraddr3") ? string.Empty : row.Field <string>("vendoraddr3");
            entity.fromaddr3         = row.IsNull("fromaddr3") ? string.Empty : row.Field <string>("fromaddr3");
            entity.fromcity          = row.IsNull("fromcity") ? string.Empty : row.Field <string>("fromcity");
            entity.fromst            = row.IsNull("fromst") ? string.Empty : row.Field <string>("fromst");
            entity.fromzip           = row.IsNull("fromzip") ? string.Empty : row.Field <string>("fromzip");
            entity.vendorcity        = row.IsNull("vendorcity") ? string.Empty : row.Field <string>("vendorcity");
            entity.vendorst          = row.IsNull("vendorst") ? string.Empty : row.Field <string>("vendorst");
            entity.vendorzip         = row.IsNull("vendorzip") ? string.Empty : row.Field <string>("vendorzip");
            entity.fromphone         = row.IsNull("fromphone") ? string.Empty : row.Field <string>("fromphone");
            entity.fromcountry       = row.IsNull("fromcountry") ? string.Empty : row.Field <string>("fromcountry");
            entity.vendphone         = row.IsNull("vendphone") ? string.Empty : row.Field <string>("vendphone");
            entity.vendcountry       = row.IsNull("vendcountry") ? string.Empty : row.Field <string>("vendcountry");
            entity.contact           = row.IsNull("contact") ? string.Empty : row.Field <string>("contact");
            entity.countryorg        = row.IsNull("countryorg") ? string.Empty : row.Field <string>("countryorg");
            entity.countrydest       = row.IsNull("countrydest") ? string.Empty : row.Field <string>("countrydest");
            entity.vessnm            = row.IsNull("vessnm") ? string.Empty : row.Field <string>("vessnm");
            entity.portno            = row.IsNull("portno") ? 0 : row.Field <int>("portno");
            entity.voyno             = row.IsNull("voyno") ? string.Empty : row.Field <string>("voyno");
            entity.portnm            = row.IsNull("portnm") ? string.Empty : row.Field <string>("portnm");
            entity.shipco            = row.IsNull("shipco") ? string.Empty : row.Field <string>("shipco");
            entity.shipid            = row.IsNull("shipid") ? string.Empty : row.Field <string>("shipid");
            entity.contno            = row.IsNull("contno") ? string.Empty : row.Field <string>("contno");
            entity.contsize          = row.IsNull("contsize") ? 0 : row.Field <int>("contsize");
            entity.bofl              = row.IsNull("bofl") ? string.Empty : row.Field <string>("bofl");
            entity.lettofcr          = row.IsNull("lettofcr") ? string.Empty : row.Field <string>("lettofcr");
            entity.freeformaddrfl    = row.Field <bool>("freeformaddrfl");
            entity.currsymbol        = row.IsNull("currsymbol") ? string.Empty : row.Field <string>("currsymbol");
            entity.estprodstdt       = row.Field <DateTime?>("estprodstdt");
            entity.revprodstdt       = row.Field <DateTime?>("revprodstdt");
            entity.actprodstdt       = row.Field <DateTime?>("actprodstdt");
            entity.prodstdtenabled   = row.Field <bool>("prodstdtenabled");
            entity.estcompdt         = row.Field <DateTime?>("estcompdt");
            entity.revcompdt         = row.Field <DateTime?>("revcompdt");
            entity.actcompdt         = row.Field <DateTime?>("actcompdt");
            entity.compdtenabled     = row.Field <bool>("compdtenabled");
            entity.estdeptdt         = row.Field <DateTime?>("estdeptdt");
            entity.revdeptdt         = row.Field <DateTime?>("revdeptdt");
            entity.actdeptdt         = row.Field <DateTime?>("actdeptdt");
            entity.deptdtenabled     = row.Field <bool>("deptdtenabled");
            entity.estdockarrdt      = row.Field <DateTime?>("estdockarrdt");
            entity.revdockarrdt      = row.Field <DateTime?>("revdockarrdt");
            entity.actdockarrdt      = row.Field <DateTime?>("actdockarrdt");
            entity.dockarrdtenabled  = row.Field <bool>("dockarrdtenabled");
            entity.estdockreddt      = row.Field <DateTime?>("estdockreddt");
            entity.revdockreddt      = row.Field <DateTime?>("revdockreddt");
            entity.actdockreddt      = row.Field <DateTime?>("actdockreddt");
            entity.dockreddtenabled  = row.Field <bool>("dockreddtenabled");
            entity.estdockdemudt     = row.Field <DateTime?>("estdockdemudt");
            entity.revdemudt         = row.Field <DateTime?>("revdemudt");
            entity.actdockdemudt     = row.Field <DateTime?>("actdockdemudt");
            entity.dockdemudtenabled = row.Field <bool>("dockdemudtenabled");
            entity.estatwhsedt       = row.Field <DateTime?>("estatwhsedt");
            entity.revatwhsedt       = row.Field <DateTime?>("revatwhsedt");
            entity.actatwhsedt       = row.Field <DateTime?>("actatwhsedt");
            entity.atwhsedtenabled   = row.Field <bool>("atwhsedtenabled");
            entity.estlastfreedt     = row.Field <DateTime?>("estlastfreedt");
            entity.revlastfreedt     = row.Field <DateTime?>("revlastfreedt");
            entity.actlastfreedt     = row.Field <DateTime?>("actlastfreedt");
            entity.lastfreedtenabled = row.Field <bool>("lastfreedtenabled");
            entity.estwhseunldt      = row.Field <DateTime?>("estwhseunldt");
            entity.revwhseunldt      = row.Field <DateTime?>("revwhseunldt");
            entity.actwhseunldt      = row.Field <DateTime?>("actwhseunldt");
            entity.whseunldtenabled  = row.Field <bool>("whseunldtenabled");
            entity.estemptydt        = row.Field <DateTime?>("estemptydt");
            entity.revemptydt        = row.Field <DateTime?>("revemptydt");
            entity.actemptydt        = row.Field <DateTime?>("actemptydt");
            entity.emptydtenabled    = row.Field <bool>("emptydtenabled");
            entity.estretdt          = row.Field <DateTime?>("estretdt");
            entity.revretdt          = row.Field <DateTime?>("revretdt");
            entity.actretdt          = row.Field <DateTime?>("actretdt");
            entity.retdtenabled      = row.Field <bool>("retdtenabled");
            entity.afterrcvstg       = row.Field <bool>("afterrcvstg");
            entity.totlineamt        = row.IsNull("totlineamt") ? decimal.Zero : row.Field <decimal>("totlineamt");
            entity.tottrackamt       = row.IsNull("tottrackamt") ? decimal.Zero : row.Field <decimal>("tottrackamt");
            entity.totqtyord         = row.IsNull("totqtyord") ? decimal.Zero : row.Field <decimal>("totqtyord");
            entity.totcubes          = row.IsNull("totcubes") ? decimal.Zero : row.Field <decimal>("totcubes");
            entity.totweight         = row.IsNull("totweight") ? decimal.Zero : row.Field <decimal>("totweight");
            entity.userfield         = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }