Esempio n. 1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromSledgetproddetailresults(ref DataRow row, Sledgetproddetailresults entity)
 {
     row.SetField("sledrowid", entity.sledrowid.ToByteArray());
     row.SetField("prod", entity.prod);
     row.SetField("whse", entity.whse);
     row.SetField("statuscd", entity.statuscd);
     row.SetField("action", entity.action);
     row.SetField("statustype", entity.statustype);
     row.SetField("descrip1", entity.descrip1);
     row.SetField("descrip2", entity.descrip2);
     row.SetField("descrip3", entity.descrip3);
     row.SetField("vendno", entity.vendno);
     row.SetField("vendname", entity.vendname);
     row.SetField("slpbseqno", entity.slpbseqno);
     row.SetField("notesfl", entity.notesfl);
     row.SetField("lookupnm", entity.lookupnm);
     row.SetField("seqno", entity.seqno);
     row.SetField("baseprice", entity.baseprice);
     row.SetField("icscfl", entity.icscfl);
     row.SetField("listprice", entity.listprice);
     row.SetField("icspfl", entity.icspfl);
     row.SetField("stndcost", entity.stndcost);
     row.SetField("icswfl", entity.icswfl);
     row.SetField("replcost", entity.replcost);
     row.SetField("lastcostfor", entity.lastcostfor);
     row.SetField("prodline", entity.prodline);
     row.SetField("prodlinedesc", entity.prodlinedesc);
     row.SetField("unitstock", entity.unitstock);
     row.SetField("unitstnd", entity.unitstnd);
     row.SetField("prodcat", entity.prodcat);
     row.SetField("prodcatdesc", entity.prodcatdesc);
     row.SetField("termspct", entity.termspct);
     row.SetField("pricetype", entity.pricetype);
     row.SetField("pricetypedesc", entity.pricetypedesc);
     row.SetField("priceonty", entity.priceonty);
     row.SetField("slgroup", entity.slgroup);
     row.SetField("cubes", entity.cubes);
     row.SetField("weight", entity.weight);
     row.SetField("effectdt", entity.effectdt);
     row.SetField("costtext", entity.costtext);
     row.SetField("slspeccostty", entity.slspeccostty);
     row.SetField("slprccostper", entity.slprccostper);
     row.SetField("originty", entity.originty);
     row.SetField("slproduct", entity.slproduct);
     row.SetField("sldescrip1", entity.sldescrip1);
     row.SetField("sldescrip2", entity.sldescrip2);
     row.SetField("sldescrip3", entity.sldescrip3);
     row.SetField("slunit", entity.slunit);
     row.SetField("imptype", entity.imptype);
     row.SetField("slcat", entity.slcat);
     row.SetField("sloriginty", entity.sloriginty);
     row.SetField("sllinecd", entity.sllinecd);
     row.SetField("slvendcd", entity.slvendcd);
     row.SetField("sllist", entity.sllist);
     row.SetField("slcost", entity.slcost);
     row.SetField("slmsdsfl", entity.slmsdsfl);
     row.SetField("slmsdssheetno", entity.slmsdssheetno);
     row.SetField("slcsunperstk", entity.slcsunperstk);
     row.SetField("slexchgrate1", entity.slexchgrate1);
     row.SetField("slexchgrate2", entity.slexchgrate2);
     row.SetField("slcurrencyty", entity.slcurrencyty);
     row.SetField("sleditfl", entity.sleditfl);
     row.SetField("upcno", entity.upcno);
     row.SetField("slupdttype", entity.slupdttype);
     row.SetField("tsupdtdsc", entity.tsupdtdsc);
     row.SetField("slaltprod", entity.slaltprod);
     row.SetField("idwdatapos", entity.idwdatapos);
     row.SetField("userfield", entity.userfield);
     row.SetField("slprceffdt", entity.slprceffdt);
     row.SetField("slprcexpdt", entity.slprcexpdt);
     row.SetField("slunspsc", entity.slunspsc);
     row.SetField("pdscfl", entity.pdscfl);
     row.SetField("pdsvfl", entity.pdsvfl);
     row.SetField("slpricebrk1", entity.slpricebrk1);
     row.SetField("slpricebrk2", entity.slpricebrk2);
     row.SetField("slpricebrk3", entity.slpricebrk3);
     row.SetField("slpricebrk4", entity.slpricebrk4);
     row.SetField("slpricebrk5", entity.slpricebrk5);
     row.SetField("slpricebrk6", entity.slpricebrk6);
     row.SetField("slpricebrk7", entity.slpricebrk7);
     row.SetField("slpricebrk8", entity.slpricebrk8);
     row.SetField("slpricebrk9", entity.slpricebrk9);
     row.SetField("slcostbrk1", entity.slcostbrk1);
     row.SetField("slcostbrk2", entity.slcostbrk2);
     row.SetField("slcostbrk3", entity.slcostbrk3);
     row.SetField("slcostbrk4", entity.slcostbrk4);
     row.SetField("slcostbrk5", entity.slcostbrk5);
     row.SetField("slcostbrk6", entity.slcostbrk6);
     row.SetField("slcostbrk7", entity.slcostbrk7);
     row.SetField("slcostbrk8", entity.slcostbrk8);
     row.SetField("slcostbrk9", entity.slcostbrk9);
     row.SetField("slqtybrk1", entity.slqtybrk1);
     row.SetField("slqtybrk2", entity.slqtybrk2);
     row.SetField("slqtybrk3", entity.slqtybrk3);
     row.SetField("slqtybrk4", entity.slqtybrk4);
     row.SetField("slqtybrk5", entity.slqtybrk5);
     row.SetField("slqtybrk6", entity.slqtybrk6);
     row.SetField("slqtybrk7", entity.slqtybrk7);
     row.SetField("slqtybrk8", entity.slqtybrk8);
     row.SetField("slsupersede", entity.slsupersede);
     row.SetField("slxref1", entity.slxref1);
     row.SetField("slxref2", entity.slxref2);
     row.SetField("slxref3", entity.slxref3);
     row.SetField("slxref4", entity.slxref4);
     row.SetField("user1", entity.user1);
     row.SetField("user2", entity.user2);
     row.SetField("user3", entity.user3);
     row.SetField("user4", entity.user4);
     row.SetField("user5", entity.user5);
     row.SetField("rebatety", entity.rebatety);
     row.SetField("rebatetydesc", entity.rebatetydesc);
     row.SetField("rebsubty", entity.rebsubty);
     row.SetField("rebsubtydesc", entity.rebsubtydesc);
 }
Esempio n. 2
0
        public static Sledgetproddetailresults BuildSledgetproddetailresultsFromRow(DataRow row)
        {
            Sledgetproddetailresults entity = new Sledgetproddetailresults();

            entity.sledrowid     = row.Field <byte[]>("sledrowid").ToStringEncoded();
            entity.prod          = row.IsNull("prod") ? string.Empty : row.Field <string>("prod");
            entity.whse          = row.IsNull("whse") ? string.Empty : row.Field <string>("whse");
            entity.statuscd      = row.IsNull("statuscd") ? string.Empty : row.Field <string>("statuscd");
            entity.action        = row.IsNull("action") ? string.Empty : row.Field <string>("action");
            entity.statustype    = row.Field <bool>("statustype");
            entity.descrip1      = row.IsNull("descrip1") ? string.Empty : row.Field <string>("descrip1");
            entity.descrip2      = row.IsNull("descrip2") ? string.Empty : row.Field <string>("descrip2");
            entity.descrip3      = row.IsNull("descrip3") ? string.Empty : row.Field <string>("descrip3");
            entity.vendno        = row.IsNull("vendno") ? decimal.Zero : row.Field <decimal>("vendno");
            entity.vendname      = row.IsNull("vendname") ? string.Empty : row.Field <string>("vendname");
            entity.slpbseqno     = row.IsNull("slpbseqno") ? 0 : row.Field <int>("slpbseqno");
            entity.notesfl       = row.IsNull("notesfl") ? string.Empty : row.Field <string>("notesfl");
            entity.lookupnm      = row.IsNull("lookupnm") ? string.Empty : row.Field <string>("lookupnm");
            entity.seqno         = row.IsNull("seqno") ? 0 : row.Field <int>("seqno");
            entity.baseprice     = row.IsNull("baseprice") ? decimal.Zero : row.Field <decimal>("baseprice");
            entity.icscfl        = row.Field <bool>("icscfl");
            entity.listprice     = row.IsNull("listprice") ? decimal.Zero : row.Field <decimal>("listprice");
            entity.icspfl        = row.Field <bool>("icspfl");
            entity.stndcost      = row.IsNull("stndcost") ? decimal.Zero : row.Field <decimal>("stndcost");
            entity.icswfl        = row.Field <bool>("icswfl");
            entity.replcost      = row.IsNull("replcost") ? decimal.Zero : row.Field <decimal>("replcost");
            entity.lastcostfor   = row.IsNull("lastcostfor") ? decimal.Zero : row.Field <decimal>("lastcostfor");
            entity.prodline      = row.IsNull("prodline") ? string.Empty : row.Field <string>("prodline");
            entity.prodlinedesc  = row.IsNull("prodlinedesc") ? string.Empty : row.Field <string>("prodlinedesc");
            entity.unitstock     = row.IsNull("unitstock") ? string.Empty : row.Field <string>("unitstock");
            entity.unitstnd      = row.IsNull("unitstnd") ? string.Empty : row.Field <string>("unitstnd");
            entity.prodcat       = row.IsNull("prodcat") ? string.Empty : row.Field <string>("prodcat");
            entity.prodcatdesc   = row.IsNull("prodcatdesc") ? string.Empty : row.Field <string>("prodcatdesc");
            entity.termspct      = row.IsNull("termspct") ? decimal.Zero : row.Field <decimal>("termspct");
            entity.pricetype     = row.IsNull("pricetype") ? string.Empty : row.Field <string>("pricetype");
            entity.pricetypedesc = row.IsNull("pricetypedesc") ? string.Empty : row.Field <string>("pricetypedesc");
            entity.priceonty     = row.IsNull("priceonty") ? string.Empty : row.Field <string>("priceonty");
            entity.slgroup       = row.IsNull("slgroup") ? string.Empty : row.Field <string>("slgroup");
            entity.cubes         = row.IsNull("cubes") ? decimal.Zero : row.Field <decimal>("cubes");
            entity.weight        = row.IsNull("weight") ? decimal.Zero : row.Field <decimal>("weight");
            entity.effectdt      = row.Field <DateTime?>("effectdt");
            entity.costtext      = row.IsNull("costtext") ? string.Empty : row.Field <string>("costtext");
            entity.slspeccostty  = row.IsNull("slspeccostty") ? string.Empty : row.Field <string>("slspeccostty");
            entity.slprccostper  = row.IsNull("slprccostper") ? string.Empty : row.Field <string>("slprccostper");
            entity.originty      = row.IsNull("originty") ? string.Empty : row.Field <string>("originty");
            entity.slproduct     = row.IsNull("slproduct") ? string.Empty : row.Field <string>("slproduct");
            entity.sldescrip1    = row.IsNull("sldescrip1") ? string.Empty : row.Field <string>("sldescrip1");
            entity.sldescrip2    = row.IsNull("sldescrip2") ? string.Empty : row.Field <string>("sldescrip2");
            entity.sldescrip3    = row.IsNull("sldescrip3") ? string.Empty : row.Field <string>("sldescrip3");
            entity.slunit        = row.IsNull("slunit") ? string.Empty : row.Field <string>("slunit");
            entity.imptype       = row.IsNull("imptype") ? string.Empty : row.Field <string>("imptype");
            entity.slcat         = row.IsNull("slcat") ? string.Empty : row.Field <string>("slcat");
            entity.sloriginty    = row.IsNull("sloriginty") ? string.Empty : row.Field <string>("sloriginty");
            entity.sllinecd      = row.IsNull("sllinecd") ? string.Empty : row.Field <string>("sllinecd");
            entity.slvendcd      = row.IsNull("slvendcd") ? string.Empty : row.Field <string>("slvendcd");
            entity.sllist        = row.IsNull("sllist") ? decimal.Zero : row.Field <decimal>("sllist");
            entity.slcost        = row.IsNull("slcost") ? decimal.Zero : row.Field <decimal>("slcost");
            entity.slmsdsfl      = row.Field <bool>("slmsdsfl");
            entity.slmsdssheetno = row.IsNull("slmsdssheetno") ? string.Empty : row.Field <string>("slmsdssheetno");
            entity.slcsunperstk  = row.IsNull("slcsunperstk") ? decimal.Zero : row.Field <decimal>("slcsunperstk");
            entity.slexchgrate1  = row.IsNull("slexchgrate1") ? decimal.Zero : row.Field <decimal>("slexchgrate1");
            entity.slexchgrate2  = row.IsNull("slexchgrate2") ? decimal.Zero : row.Field <decimal>("slexchgrate2");
            entity.slcurrencyty  = row.IsNull("slcurrencyty") ? string.Empty : row.Field <string>("slcurrencyty");
            entity.sleditfl      = row.Field <bool>("sleditfl");
            entity.upcno         = row.IsNull("upcno") ? string.Empty : row.Field <string>("upcno");
            entity.slupdttype    = row.IsNull("slupdttype") ? string.Empty : row.Field <string>("slupdttype");
            entity.tsupdtdsc     = row.IsNull("tsupdtdsc") ? string.Empty : row.Field <string>("tsupdtdsc");
            entity.slaltprod     = row.IsNull("slaltprod") ? string.Empty : row.Field <string>("slaltprod");
            entity.idwdatapos    = row.IsNull("idwdatapos") ? string.Empty : row.Field <string>("idwdatapos");
            entity.userfield     = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            entity.slprceffdt    = row.Field <DateTime?>("slprceffdt");
            entity.slprcexpdt    = row.Field <DateTime?>("slprcexpdt");
            entity.slunspsc      = row.IsNull("slunspsc") ? string.Empty : row.Field <string>("slunspsc");
            entity.pdscfl        = row.Field <bool>("pdscfl");
            entity.pdsvfl        = row.Field <bool>("pdsvfl");
            entity.slpricebrk1   = row.IsNull("slpricebrk1") ? decimal.Zero : row.Field <decimal>("slpricebrk1");
            entity.slpricebrk2   = row.IsNull("slpricebrk2") ? decimal.Zero : row.Field <decimal>("slpricebrk2");
            entity.slpricebrk3   = row.IsNull("slpricebrk3") ? decimal.Zero : row.Field <decimal>("slpricebrk3");
            entity.slpricebrk4   = row.IsNull("slpricebrk4") ? decimal.Zero : row.Field <decimal>("slpricebrk4");
            entity.slpricebrk5   = row.IsNull("slpricebrk5") ? decimal.Zero : row.Field <decimal>("slpricebrk5");
            entity.slpricebrk6   = row.IsNull("slpricebrk6") ? decimal.Zero : row.Field <decimal>("slpricebrk6");
            entity.slpricebrk7   = row.IsNull("slpricebrk7") ? decimal.Zero : row.Field <decimal>("slpricebrk7");
            entity.slpricebrk8   = row.IsNull("slpricebrk8") ? decimal.Zero : row.Field <decimal>("slpricebrk8");
            entity.slpricebrk9   = row.IsNull("slpricebrk9") ? decimal.Zero : row.Field <decimal>("slpricebrk9");
            entity.slcostbrk1    = row.IsNull("slcostbrk1") ? decimal.Zero : row.Field <decimal>("slcostbrk1");
            entity.slcostbrk2    = row.IsNull("slcostbrk2") ? decimal.Zero : row.Field <decimal>("slcostbrk2");
            entity.slcostbrk3    = row.IsNull("slcostbrk3") ? decimal.Zero : row.Field <decimal>("slcostbrk3");
            entity.slcostbrk4    = row.IsNull("slcostbrk4") ? decimal.Zero : row.Field <decimal>("slcostbrk4");
            entity.slcostbrk5    = row.IsNull("slcostbrk5") ? decimal.Zero : row.Field <decimal>("slcostbrk5");
            entity.slcostbrk6    = row.IsNull("slcostbrk6") ? decimal.Zero : row.Field <decimal>("slcostbrk6");
            entity.slcostbrk7    = row.IsNull("slcostbrk7") ? decimal.Zero : row.Field <decimal>("slcostbrk7");
            entity.slcostbrk8    = row.IsNull("slcostbrk8") ? decimal.Zero : row.Field <decimal>("slcostbrk8");
            entity.slcostbrk9    = row.IsNull("slcostbrk9") ? decimal.Zero : row.Field <decimal>("slcostbrk9");
            entity.slqtybrk1     = row.IsNull("slqtybrk1") ? decimal.Zero : row.Field <decimal>("slqtybrk1");
            entity.slqtybrk2     = row.IsNull("slqtybrk2") ? decimal.Zero : row.Field <decimal>("slqtybrk2");
            entity.slqtybrk3     = row.IsNull("slqtybrk3") ? decimal.Zero : row.Field <decimal>("slqtybrk3");
            entity.slqtybrk4     = row.IsNull("slqtybrk4") ? decimal.Zero : row.Field <decimal>("slqtybrk4");
            entity.slqtybrk5     = row.IsNull("slqtybrk5") ? decimal.Zero : row.Field <decimal>("slqtybrk5");
            entity.slqtybrk6     = row.IsNull("slqtybrk6") ? decimal.Zero : row.Field <decimal>("slqtybrk6");
            entity.slqtybrk7     = row.IsNull("slqtybrk7") ? decimal.Zero : row.Field <decimal>("slqtybrk7");
            entity.slqtybrk8     = row.IsNull("slqtybrk8") ? decimal.Zero : row.Field <decimal>("slqtybrk8");
            entity.slsupersede   = row.IsNull("slsupersede") ? string.Empty : row.Field <string>("slsupersede");
            entity.slxref1       = row.IsNull("slxref1") ? string.Empty : row.Field <string>("slxref1");
            entity.slxref2       = row.IsNull("slxref2") ? string.Empty : row.Field <string>("slxref2");
            entity.slxref3       = row.IsNull("slxref3") ? string.Empty : row.Field <string>("slxref3");
            entity.slxref4       = row.IsNull("slxref4") ? string.Empty : row.Field <string>("slxref4");
            entity.user1         = row.IsNull("user1") ? string.Empty : row.Field <string>("user1");
            entity.user2         = row.IsNull("user2") ? string.Empty : row.Field <string>("user2");
            entity.user3         = row.IsNull("user3") ? string.Empty : row.Field <string>("user3");
            entity.user4         = row.IsNull("user4") ? string.Empty : row.Field <string>("user4");
            entity.user5         = row.IsNull("user5") ? string.Empty : row.Field <string>("user5");
            entity.rebatety      = row.IsNull("rebatety") ? string.Empty : row.Field <string>("rebatety");
            entity.rebatetydesc  = row.IsNull("rebatetydesc") ? string.Empty : row.Field <string>("rebatetydesc");
            entity.rebsubty      = row.IsNull("rebsubty") ? string.Empty : row.Field <string>("rebsubty");
            entity.rebsubtydesc  = row.IsNull("rebsubtydesc") ? string.Empty : row.Field <string>("rebsubtydesc");
            return(entity);
        }