Ejemplo n.º 1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromIcipfetchprodresults(ref DataRow row, Icipfetchprodresults entity)
 {
     row.SetField("descrip1", entity.descrip1);
     row.SetField("cstatus", entity.cstatus);
     row.SetField("upc", entity.upc);
     row.SetField("reservety", entity.reservety);
     row.SetField("enterdt", entity.enterdt);
     row.SetField("reservedays", entity.reservedays);
     row.SetField("acquiredt", entity.acquiredt);
     row.SetField("whsestatus", entity.whsestatus);
     row.SetField("length", entity.length);
     row.SetField("priceonty", entity.priceonty);
     row.SetField("unitstock", entity.unitstock);
     row.SetField("weight", entity.weight);
     row.SetField("width", entity.width);
     row.SetField("termsdiscfl", entity.termsdiscfl);
     row.SetField("termspct", entity.termspct);
     row.SetField("unitsell", entity.unitsell);
     row.SetField("cubes", entity.cubes);
     row.SetField("height", entity.height);
     row.SetField("sellmult", entity.sellmult);
     row.SetField("unitcnt", entity.unitcnt);
     row.SetField("prodcat", entity.prodcat);
     row.SetField("prodcatdescrip", entity.prodcatdescrip);
     row.SetField("rentprodcat", entity.rentprodcat);
     row.SetField("rentprodcatdesc", entity.rentprodcatdesc);
     row.SetField("rentalwhse", entity.rentalwhse);
     row.SetField("dt852out", entity.dt852out);
     row.SetField("issuesytd", entity.issuesytd);
     row.SetField("lifo", entity.lifo);
     row.SetField("lifodesc", entity.lifodesc);
     row.SetField("lastinvdt", entity.lastinvdt);
     row.SetField("receiptsytd", entity.receiptsytd);
     row.SetField("slgroup", entity.slgroup);
     row.SetField("sldesc", entity.sldesc);
     row.SetField("lastrcptdt", entity.lastrcptdt);
     row.SetField("pbseqno", entity.pbseqno);
     row.SetField("lastpowtdt", entity.lastpowtdt);
     row.SetField("msdsfl", entity.msdsfl);
     row.SetField("msdssheetno", entity.msdssheetno);
     row.SetField("lastpricechgdt", entity.lastpricechgdt);
     row.SetField("returnsinytd", entity.returnsinytd);
     row.SetField("msdschgdt", entity.msdschgdt);
     row.SetField("lastcountdt", entity.lastcountdt);
     row.SetField("returnsoutytd", entity.returnsoutytd);
     row.SetField("descrip3", entity.descrip3);
     row.SetField("btnserlothidden", entity.btnserlothidden);
     row.SetField("btnserlotlbl", entity.btnserlotlbl);
     row.SetField("btnfifohidden", entity.btnfifohidden);
     row.SetField("btnbalanceshidden", entity.btnbalanceshidden);
     row.SetField("btnrentalhidden", entity.btnrentalhidden);
     row.SetField("cataloghidden", entity.cataloghidden);
     row.SetField("allowusageupdate", entity.allowusageupdate);
     row.SetField("ncnr", entity.ncnr);
     row.SetField("eccnclasscd", entity.eccnclasscd);
     row.SetField("countryoforigin", entity.countryoforigin);
     row.SetField("tariffcd", entity.tariffcd);
     row.SetField("brandcode", entity.brandcode);
     row.SetField("mfgprod", entity.mfgprod);
     row.SetField("vendprod", entity.vendprod);
     row.SetField("altprodprccd", entity.altprodprccd);
     row.SetField("altprodgrp", entity.altprodgrp);
     row.SetField("unspsc", entity.unspsc);
     row.SetField("userfield", entity.userfield);
 }
Ejemplo n.º 2
0
        public static Icipfetchprodresults BuildIcipfetchprodresultsFromRow(DataRow row)
        {
            Icipfetchprodresults entity = new Icipfetchprodresults();

            entity.descrip1          = row.IsNull("descrip1") ? string.Empty : row.Field <string>("descrip1");
            entity.cstatus           = row.IsNull("cstatus") ? string.Empty : row.Field <string>("cstatus");
            entity.upc               = row.IsNull("upc") ? string.Empty : row.Field <string>("upc");
            entity.reservety         = row.IsNull("reservety") ? string.Empty : row.Field <string>("reservety");
            entity.enterdt           = row.Field <DateTime?>("enterdt");
            entity.reservedays       = row.IsNull("reservedays") ? 0 : row.Field <int>("reservedays");
            entity.acquiredt         = row.Field <DateTime?>("acquiredt");
            entity.whsestatus        = row.IsNull("whsestatus") ? string.Empty : row.Field <string>("whsestatus");
            entity.length            = row.IsNull("length") ? decimal.Zero : row.Field <decimal>("length");
            entity.priceonty         = row.IsNull("priceonty") ? string.Empty : row.Field <string>("priceonty");
            entity.unitstock         = row.IsNull("unitstock") ? string.Empty : row.Field <string>("unitstock");
            entity.weight            = row.IsNull("weight") ? decimal.Zero : row.Field <decimal>("weight");
            entity.width             = row.IsNull("width") ? decimal.Zero : row.Field <decimal>("width");
            entity.termsdiscfl       = row.IsNull("termsdiscfl") ? string.Empty : row.Field <string>("termsdiscfl");
            entity.termspct          = row.IsNull("termspct") ? decimal.Zero : row.Field <decimal>("termspct");
            entity.unitsell          = row.IsNull("unitsell") ? string.Empty : row.Field <string>("unitsell");
            entity.cubes             = row.IsNull("cubes") ? decimal.Zero : row.Field <decimal>("cubes");
            entity.height            = row.IsNull("height") ? decimal.Zero : row.Field <decimal>("height");
            entity.sellmult          = row.IsNull("sellmult") ? 0 : row.Field <int>("sellmult");
            entity.unitcnt           = row.IsNull("unitcnt") ? string.Empty : row.Field <string>("unitcnt");
            entity.prodcat           = row.IsNull("prodcat") ? string.Empty : row.Field <string>("prodcat");
            entity.prodcatdescrip    = row.IsNull("prodcatdescrip") ? string.Empty : row.Field <string>("prodcatdescrip");
            entity.rentprodcat       = row.IsNull("rentprodcat") ? string.Empty : row.Field <string>("rentprodcat");
            entity.rentprodcatdesc   = row.IsNull("rentprodcatdesc") ? string.Empty : row.Field <string>("rentprodcatdesc");
            entity.rentalwhse        = row.Field <bool>("rentalwhse");
            entity.dt852out          = row.Field <DateTime?>("dt852out");
            entity.issuesytd         = row.IsNull("issuesytd") ? decimal.Zero : row.Field <decimal>("issuesytd");
            entity.lifo              = row.IsNull("lifo") ? string.Empty : row.Field <string>("lifo");
            entity.lifodesc          = row.IsNull("lifodesc") ? string.Empty : row.Field <string>("lifodesc");
            entity.lastinvdt         = row.Field <DateTime?>("lastinvdt");
            entity.receiptsytd       = row.IsNull("receiptsytd") ? decimal.Zero : row.Field <decimal>("receiptsytd");
            entity.slgroup           = row.IsNull("slgroup") ? string.Empty : row.Field <string>("slgroup");
            entity.sldesc            = row.IsNull("sldesc") ? string.Empty : row.Field <string>("sldesc");
            entity.lastrcptdt        = row.Field <DateTime?>("lastrcptdt");
            entity.pbseqno           = row.IsNull("pbseqno") ? 0 : row.Field <int>("pbseqno");
            entity.lastpowtdt        = row.Field <DateTime?>("lastpowtdt");
            entity.msdsfl            = row.IsNull("msdsfl") ? string.Empty : row.Field <string>("msdsfl");
            entity.msdssheetno       = row.IsNull("msdssheetno") ? string.Empty : row.Field <string>("msdssheetno");
            entity.lastpricechgdt    = row.Field <DateTime?>("lastpricechgdt");
            entity.returnsinytd      = row.IsNull("returnsinytd") ? decimal.Zero : row.Field <decimal>("returnsinytd");
            entity.msdschgdt         = row.Field <DateTime?>("msdschgdt");
            entity.lastcountdt       = row.Field <DateTime?>("lastcountdt");
            entity.returnsoutytd     = row.IsNull("returnsoutytd") ? decimal.Zero : row.Field <decimal>("returnsoutytd");
            entity.descrip3          = row.IsNull("descrip3") ? string.Empty : row.Field <string>("descrip3");
            entity.btnserlothidden   = row.Field <bool>("btnserlothidden");
            entity.btnserlotlbl      = row.IsNull("btnserlotlbl") ? string.Empty : row.Field <string>("btnserlotlbl");
            entity.btnfifohidden     = row.Field <bool>("btnfifohidden");
            entity.btnbalanceshidden = row.Field <bool>("btnbalanceshidden");
            entity.btnrentalhidden   = row.Field <bool>("btnrentalhidden");
            entity.cataloghidden     = row.Field <bool>("cataloghidden");
            entity.allowusageupdate  = row.Field <bool>("allowusageupdate");
            entity.ncnr              = row.IsNull("ncnr") ? string.Empty : row.Field <string>("ncnr");
            entity.eccnclasscd       = row.IsNull("eccnclasscd") ? string.Empty : row.Field <string>("eccnclasscd");
            entity.countryoforigin   = row.IsNull("countryoforigin") ? string.Empty : row.Field <string>("countryoforigin");
            entity.tariffcd          = row.IsNull("tariffcd") ? string.Empty : row.Field <string>("tariffcd");
            entity.brandcode         = row.IsNull("brandcode") ? string.Empty : row.Field <string>("brandcode");
            entity.mfgprod           = row.IsNull("mfgprod") ? string.Empty : row.Field <string>("mfgprod");
            entity.vendprod          = row.IsNull("vendprod") ? string.Empty : row.Field <string>("vendprod");
            entity.altprodprccd      = row.IsNull("altprodprccd") ? string.Empty : row.Field <string>("altprodprccd");
            entity.altprodgrp        = row.IsNull("altprodgrp") ? string.Empty : row.Field <string>("altprodgrp");
            entity.unspsc            = row.IsNull("unspsc") ? string.Empty : row.Field <string>("unspsc");
            entity.userfield         = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }