示例#1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromLoadoetallyresults(ref DataRow row, Loadoetallyresults entity)
 {
     row.SetField("addonamt1", entity.addonamt1);
     row.SetField("addonamt2", entity.addonamt2);
     row.SetField("addonamt3", entity.addonamt3);
     row.SetField("addonamt4", entity.addonamt4);
     row.SetField("adjcost", entity.adjcost);
     row.SetField("adjfactor", entity.adjfactor);
     row.SetField("bundleid", entity.bundleid);
     row.SetField("commcost", entity.commcost);
     row.SetField("compaddonamt", entity.compaddonamt);
     row.SetField("compdiscount", entity.compdiscount);
     row.SetField("compseqno", entity.compseqno);
     row.SetField("cono", entity.cono);
     row.SetField("conv", entity.conv);
     row.SetField("countryoforigin", entity.countryoforigin);
     row.SetField("custno", entity.custno);
     row.SetField("delayresrvfl", entity.delayresrvfl);
     row.SetField("dlength", entity.dlength);
     row.SetField("glcost", entity.glcost);
     row.SetField("glcostrcv", entity.glcostrcv);
     row.SetField("icspecrecno", entity.icspecrecno);
     row.SetField("invcost", entity.invcost);
     row.SetField("length", entity.length);
     row.SetField("lineno", entity.lineno);
     row.SetField("netamt", entity.netamt);
     row.SetField("netcostamt", entity.netcostamt);
     row.SetField("netcostedamt", entity.netcostedamt);
     row.SetField("netcostord", entity.netcostord);
     row.SetField("netord", entity.netord);
     row.SetField("oemixpct", entity.oemixpct);
     row.SetField("operinit", entity.operinit);
     row.SetField("orderno", entity.orderno);
     row.SetField("ordersuf", entity.ordersuf);
     row.SetField("ordertype", entity.ordertype);
     row.SetField("pdrecno", entity.pdrecno);
     row.SetField("pomixpct", entity.pomixpct);
     row.SetField("prevconv", entity.prevconv);
     row.SetField("prevprod", entity.prevprod);
     row.SetField("prevqtyord", entity.prevqtyord);
     row.SetField("prevqtyship", entity.prevqtyship);
     row.SetField("prevqtyshp", entity.prevqtyshp);
     row.SetField("prevunit", entity.prevunit);
     row.SetField("price", entity.price);
     row.SetField("pricefl", entity.pricefl);
     row.SetField("prodcost", entity.prodcost);
     row.SetField("qtybundle", entity.qtybundle);
     row.SetField("qtycosted", entity.qtycosted);
     row.SetField("qtyord", entity.qtyord);
     row.SetField("qtyprevbundle", entity.qtyprevbundle);
     row.SetField("qtyship", entity.qtyship);
     row.SetField("reqprod", entity.reqprod);
     row.SetField("seqno", entity.seqno);
     row.SetField("shipprod", entity.shipprod);
     row.SetField("shipto", entity.shipto);
     row.SetField("shpqtyoverfl", entity.shpqtyoverfl);
     row.SetField("statustype", entity.statustype);
     row.SetField("stkqtycosted", entity.stkqtycosted);
     row.SetField("stkqtyord", entity.stkqtyord);
     row.SetField("stkqtyship", entity.stkqtyship);
     row.SetField("tariffcd", entity.tariffcd);
     row.SetField("transdt", entity.transdt);
     row.SetField("transproc", entity.transproc);
     row.SetField("transtm", entity.transtm);
     row.SetField("transtype", entity.transtype);
     row.SetField("unit", entity.unit);
     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("user6", entity.user6);
     row.SetField("user7", entity.user7);
     row.SetField("user8", entity.user8);
     row.SetField("user9", entity.user9);
     row.SetField("whse", entity.whse);
     row.SetField("qtyavail", entity.qtyavail);
     row.SetField("notesfl", entity.notesfl);
     row.SetField("descrip1", entity.descrip1);
     row.SetField("descrip2", entity.descrip2);
     row.SetField("qtyonhand", entity.qtyonhand);
     row.SetField("qtyonorder", entity.qtyonorder);
     row.SetField("qtyloose", entity.qtyloose);
     row.SetField("qtybf", entity.qtybf);
     row.SetField("extend", entity.extend);
     row.SetField("extendship", entity.extendship);
     row.SetField("userfield", entity.userfield);
 }
示例#2
0
        public static Loadoetallyresults BuildLoadoetallyresultsFromRow(DataRow row)
        {
            Loadoetallyresults entity = new Loadoetallyresults();

            entity.addonamt1       = row.IsNull("addonamt1") ? decimal.Zero : row.Field <decimal>("addonamt1");
            entity.addonamt2       = row.IsNull("addonamt2") ? decimal.Zero : row.Field <decimal>("addonamt2");
            entity.addonamt3       = row.IsNull("addonamt3") ? decimal.Zero : row.Field <decimal>("addonamt3");
            entity.addonamt4       = row.IsNull("addonamt4") ? decimal.Zero : row.Field <decimal>("addonamt4");
            entity.adjcost         = row.IsNull("adjcost") ? decimal.Zero : row.Field <decimal>("adjcost");
            entity.adjfactor       = row.IsNull("adjfactor") ? decimal.Zero : row.Field <decimal>("adjfactor");
            entity.bundleid        = row.IsNull("bundleid") ? string.Empty : row.Field <string>("bundleid");
            entity.commcost        = row.IsNull("commcost") ? decimal.Zero : row.Field <decimal>("commcost");
            entity.compaddonamt    = row.IsNull("compaddonamt") ? decimal.Zero : row.Field <decimal>("compaddonamt");
            entity.compdiscount    = row.IsNull("compdiscount") ? decimal.Zero : row.Field <decimal>("compdiscount");
            entity.compseqno       = row.IsNull("compseqno") ? 0 : row.Field <int>("compseqno");
            entity.cono            = row.IsNull("cono") ? 0 : row.Field <int>("cono");
            entity.conv            = row.IsNull("conv") ? decimal.Zero : row.Field <decimal>("conv");
            entity.countryoforigin = row.IsNull("countryoforigin") ? string.Empty : row.Field <string>("countryoforigin");
            entity.custno          = row.IsNull("custno") ? decimal.Zero : row.Field <decimal>("custno");
            entity.delayresrvfl    = row.Field <bool>("delayresrvfl");
            entity.dlength         = row.IsNull("dlength") ? decimal.Zero : row.Field <decimal>("dlength");
            entity.glcost          = row.IsNull("glcost") ? decimal.Zero : row.Field <decimal>("glcost");
            entity.glcostrcv       = row.IsNull("glcostrcv") ? decimal.Zero : row.Field <decimal>("glcostrcv");
            entity.icspecrecno     = row.IsNull("icspecrecno") ? 0 : row.Field <int>("icspecrecno");
            entity.invcost         = row.IsNull("invcost") ? decimal.Zero : row.Field <decimal>("invcost");
            entity.length          = row.IsNull("length") ? 0 : row.Field <int>("length");
            entity.lineno          = row.IsNull("lineno") ? 0 : row.Field <int>("lineno");
            entity.netamt          = row.IsNull("netamt") ? decimal.Zero : row.Field <decimal>("netamt");
            entity.netcostamt      = row.IsNull("netcostamt") ? decimal.Zero : row.Field <decimal>("netcostamt");
            entity.netcostedamt    = row.IsNull("netcostedamt") ? decimal.Zero : row.Field <decimal>("netcostedamt");
            entity.netcostord      = row.IsNull("netcostord") ? decimal.Zero : row.Field <decimal>("netcostord");
            entity.netord          = row.IsNull("netord") ? decimal.Zero : row.Field <decimal>("netord");
            entity.oemixpct        = row.IsNull("oemixpct") ? 0 : row.Field <int>("oemixpct");
            entity.operinit        = row.IsNull("operinit") ? string.Empty : row.Field <string>("operinit");
            entity.orderno         = row.IsNull("orderno") ? 0 : row.Field <int>("orderno");
            entity.ordersuf        = row.IsNull("ordersuf") ? 0 : row.Field <int>("ordersuf");
            entity.ordertype       = row.IsNull("ordertype") ? string.Empty : row.Field <string>("ordertype");
            entity.pdrecno         = row.IsNull("pdrecno") ? 0 : row.Field <int>("pdrecno");
            entity.pomixpct        = row.IsNull("pomixpct") ? 0 : row.Field <int>("pomixpct");
            entity.prevconv        = row.IsNull("prevconv") ? decimal.Zero : row.Field <decimal>("prevconv");
            entity.prevprod        = row.IsNull("prevprod") ? string.Empty : row.Field <string>("prevprod");
            entity.prevqtyord      = row.IsNull("prevqtyord") ? decimal.Zero : row.Field <decimal>("prevqtyord");
            entity.prevqtyship     = row.IsNull("prevqtyship") ? decimal.Zero : row.Field <decimal>("prevqtyship");
            entity.prevqtyshp      = row.IsNull("prevqtyshp") ? decimal.Zero : row.Field <decimal>("prevqtyshp");
            entity.prevunit        = row.IsNull("prevunit") ? string.Empty : row.Field <string>("prevunit");
            entity.price           = row.IsNull("price") ? decimal.Zero : row.Field <decimal>("price");
            entity.pricefl         = row.Field <bool>("pricefl");
            entity.prodcost        = row.IsNull("prodcost") ? decimal.Zero : row.Field <decimal>("prodcost");
            entity.qtybundle       = row.IsNull("qtybundle") ? decimal.Zero : row.Field <decimal>("qtybundle");
            entity.qtycosted       = row.IsNull("qtycosted") ? decimal.Zero : row.Field <decimal>("qtycosted");
            entity.qtyord          = row.IsNull("qtyord") ? decimal.Zero : row.Field <decimal>("qtyord");
            entity.qtyprevbundle   = row.IsNull("qtyprevbundle") ? decimal.Zero : row.Field <decimal>("qtyprevbundle");
            entity.qtyship         = row.IsNull("qtyship") ? decimal.Zero : row.Field <decimal>("qtyship");
            entity.reqprod         = row.IsNull("reqprod") ? string.Empty : row.Field <string>("reqprod");
            entity.seqno           = row.IsNull("seqno") ? 0 : row.Field <int>("seqno");
            entity.shipprod        = row.IsNull("shipprod") ? string.Empty : row.Field <string>("shipprod");
            entity.shipto          = row.IsNull("shipto") ? string.Empty : row.Field <string>("shipto");
            entity.shpqtyoverfl    = row.Field <bool>("shpqtyoverfl");
            entity.statustype      = row.IsNull("statustype") ? string.Empty : row.Field <string>("statustype");
            entity.stkqtycosted    = row.IsNull("stkqtycosted") ? decimal.Zero : row.Field <decimal>("stkqtycosted");
            entity.stkqtyord       = row.IsNull("stkqtyord") ? decimal.Zero : row.Field <decimal>("stkqtyord");
            entity.stkqtyship      = row.IsNull("stkqtyship") ? decimal.Zero : row.Field <decimal>("stkqtyship");
            entity.tariffcd        = row.IsNull("tariffcd") ? string.Empty : row.Field <string>("tariffcd");
            entity.transdt         = row.Field <DateTime?>("transdt");
            entity.transproc       = row.IsNull("transproc") ? string.Empty : row.Field <string>("transproc");
            entity.transtm         = row.IsNull("transtm") ? string.Empty : row.Field <string>("transtm");
            entity.transtype       = row.IsNull("transtype") ? string.Empty : row.Field <string>("transtype");
            entity.unit            = row.IsNull("unit") ? string.Empty : row.Field <string>("unit");
            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.user6           = row.Field <decimal?>("user6");
            entity.user7           = row.Field <decimal?>("user7");
            entity.user8           = row.Field <DateTime?>("user8");
            entity.user9           = row.Field <DateTime?>("user9");
            entity.whse            = row.IsNull("whse") ? string.Empty : row.Field <string>("whse");
            entity.qtyavail        = row.IsNull("qtyavail") ? decimal.Zero : row.Field <decimal>("qtyavail");
            entity.notesfl         = row.IsNull("notesfl") ? string.Empty : row.Field <string>("notesfl");
            entity.descrip1        = row.IsNull("descrip1") ? string.Empty : row.Field <string>("descrip1");
            entity.descrip2        = row.IsNull("descrip2") ? string.Empty : row.Field <string>("descrip2");
            entity.qtyonhand       = row.IsNull("qtyonhand") ? decimal.Zero : row.Field <decimal>("qtyonhand");
            entity.qtyonorder      = row.IsNull("qtyonorder") ? decimal.Zero : row.Field <decimal>("qtyonorder");
            entity.qtyloose        = row.IsNull("qtyloose") ? decimal.Zero : row.Field <decimal>("qtyloose");
            entity.qtybf           = row.IsNull("qtybf") ? decimal.Zero : row.Field <decimal>("qtybf");
            entity.extend          = row.IsNull("extend") ? decimal.Zero : row.Field <decimal>("extend");
            entity.extendship      = row.IsNull("extendship") ? decimal.Zero : row.Field <decimal>("extendship");
            entity.userfield       = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }