Exemplo n.º 1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromUpdtoelinedsplttresults(ref DataRow row, Updtoelinedsplttresults entity)
 {
     row.SetField("lineitemtype", entity.lineitemtype);
     row.SetField("sortlineno", entity.sortlineno);
     row.SetField("dspllineno", entity.dspllineno);
     row.SetField("actllineno", entity.actllineno);
     row.SetField("shipprod", entity.shipprod);
     row.SetField("proddesc", entity.proddesc);
     row.SetField("commentfl", entity.commentfl);
     row.SetField("specnstype", entity.specnstype);
     row.SetField("specnstypedspl", entity.specnstypedspl);
     row.SetField("notesfl", entity.notesfl);
     row.SetField("unit", entity.unit);
     row.SetField("unitconv", entity.unitconv);
     row.SetField("prodcost", entity.prodcost);
     row.SetField("disctype", entity.disctype);
     row.SetField("discamt", entity.discamt);
     row.SetField("discamtdspl", entity.discamtdspl);
     row.SetField("discpct", entity.discpct);
     row.SetField("bono", entity.bono);
     row.SetField("bonodspl", entity.bonodspl);
     row.SetField("botype", entity.botype);
     row.SetField("linedodspl", entity.linedodspl);
     row.SetField("rushfl", entity.rushfl);
     row.SetField("rushdspl", entity.rushdspl);
     row.SetField("qtyord", entity.qtyord);
     row.SetField("qtyship", entity.qtyship);
     row.SetField("qtyorddspl", entity.qtyorddspl);
     row.SetField("qtyshipdspl", entity.qtyshipdspl);
     row.SetField("returnfl", entity.returnfl);
     row.SetField("reqprod", entity.reqprod);
     row.SetField("price", entity.price);
     row.SetField("pricedspl", entity.pricedspl);
     row.SetField("qtybreakty", entity.qtybreakty);
     row.SetField("pdrecno", entity.pdrecno);
     row.SetField("hardpricefl", entity.hardpricefl);
     row.SetField("netord", entity.netord);
     row.SetField("netamt", entity.netamt);
     row.SetField("netamtdspl", entity.netamtdspl);
     row.SetField("netpricedspl", entity.netpricedspl);
     row.SetField("enterdt", entity.enterdt);
     row.SetField("jitpickfl", entity.jitpickfl);
     row.SetField("jitpickdspl", entity.jitpickdspl);
     row.SetField("reqshipdt", entity.reqshipdt);
     row.SetField("promisedt", entity.promisedt);
     row.SetField("kitfl", entity.kitfl);
     row.SetField("tallyfl", entity.tallyfl);
     row.SetField("corertnty", entity.corertnty);
     row.SetField("origcore", entity.origcore);
     row.SetField("extrasortasc", entity.extrasortasc);
     row.SetField("extrasortdsc", entity.extrasortdsc);
     row.SetField("ordertype", entity.ordertype);
     row.SetField("ordertypedspl", entity.ordertypedspl);
     row.SetField("qtyreturn", entity.qtyreturn);
     row.SetField("qtyreturndspl", entity.qtyreturndspl);
     row.SetField("orderaltno", entity.orderaltno);
     row.SetField("netavail", entity.netavail);
     row.SetField("priceoverfl", entity.priceoverfl);
     row.SetField("priceclty", entity.priceclty);
     row.SetField("pricecd", entity.pricecd);
     row.SetField("ptlkitbofl", entity.ptlkitbofl);
     row.SetField("kitsplitamt", entity.kitsplitamt);
     row.SetField("bonoptl", entity.bonoptl);
     row.SetField("priceorigcd", entity.priceorigcd);
     row.SetField("margin", entity.margin);
     row.SetField("margindspl", entity.margindspl);
     row.SetField("margpct", entity.margpct);
     row.SetField("margpctdspl", entity.margpctdspl);
     row.SetField("cube", entity.cube);
     row.SetField("weight", entity.weight);
     row.SetField("csunperstk", entity.csunperstk);
     row.SetField("specconv", entity.specconv);
     row.SetField("prccostper", entity.prccostper);
     row.SetField("speccostty", entity.speccostty);
     row.SetField("icspecrecno", entity.icspecrecno);
     row.SetField("speccostdspl", entity.speccostdspl);
     row.SetField("edierr", entity.edierr);
     row.SetField("ediexc", entity.ediexc);
     row.SetField("edilineno", entity.edilineno);
     row.SetField("custprod", entity.custprod);
     row.SetField("origlineno", entity.origlineno);
     row.SetField("chgtolineno", entity.chgtolineno);
     row.SetField("lostbusty", entity.lostbusty);
     row.SetField("chgqtyfl", entity.chgqtyfl);
     row.SetField("extcomfl", entity.extcomfl);
     row.SetField("inventoryty", entity.inventoryty);
     row.SetField("invtydspl", entity.invtydspl);
     row.SetField("ncnr", entity.ncnr);
     row.SetField("eccnclasscd", entity.eccnclasscd);
     row.SetField("countryoforigin", entity.countryoforigin);
     row.SetField("tariffcd", entity.tariffcd);
     row.SetField("upcid", entity.upcid);
 }
Exemplo n.º 2
0
        public static Updtoelinedsplttresults BuildUpdtoelinedsplttresultsFromRow(DataRow row)
        {
            Updtoelinedsplttresults entity = new Updtoelinedsplttresults();

            entity.lineitemtype    = row.IsNull("lineitemtype") ? string.Empty : row.Field <string>("lineitemtype");
            entity.sortlineno      = row.IsNull("sortlineno") ? 0 : row.Field <int>("sortlineno");
            entity.dspllineno      = row.IsNull("dspllineno") ? string.Empty : row.Field <string>("dspllineno");
            entity.actllineno      = row.IsNull("actllineno") ? 0 : row.Field <int>("actllineno");
            entity.shipprod        = row.IsNull("shipprod") ? string.Empty : row.Field <string>("shipprod");
            entity.proddesc        = row.IsNull("proddesc") ? string.Empty : row.Field <string>("proddesc");
            entity.commentfl       = row.Field <bool>("commentfl");
            entity.specnstype      = row.IsNull("specnstype") ? string.Empty : row.Field <string>("specnstype");
            entity.specnstypedspl  = row.IsNull("specnstypedspl") ? string.Empty : row.Field <string>("specnstypedspl");
            entity.notesfl         = row.IsNull("notesfl") ? string.Empty : row.Field <string>("notesfl");
            entity.unit            = row.IsNull("unit") ? string.Empty : row.Field <string>("unit");
            entity.unitconv        = row.IsNull("unitconv") ? decimal.Zero : row.Field <decimal>("unitconv");
            entity.prodcost        = row.IsNull("prodcost") ? decimal.Zero : row.Field <decimal>("prodcost");
            entity.disctype        = row.Field <bool>("disctype");
            entity.discamt         = row.IsNull("discamt") ? decimal.Zero : row.Field <decimal>("discamt");
            entity.discamtdspl     = row.IsNull("discamtdspl") ? string.Empty : row.Field <string>("discamtdspl");
            entity.discpct         = row.IsNull("discpct") ? decimal.Zero : row.Field <decimal>("discpct");
            entity.bono            = row.IsNull("bono") ? 0 : row.Field <int>("bono");
            entity.bonodspl        = row.IsNull("bonodspl") ? string.Empty : row.Field <string>("bonodspl");
            entity.botype          = row.IsNull("botype") ? string.Empty : row.Field <string>("botype");
            entity.linedodspl      = row.IsNull("linedodspl") ? string.Empty : row.Field <string>("linedodspl");
            entity.rushfl          = row.Field <bool>("rushfl");
            entity.rushdspl        = row.IsNull("rushdspl") ? string.Empty : row.Field <string>("rushdspl");
            entity.qtyord          = row.IsNull("qtyord") ? decimal.Zero : row.Field <decimal>("qtyord");
            entity.qtyship         = row.IsNull("qtyship") ? decimal.Zero : row.Field <decimal>("qtyship");
            entity.qtyorddspl      = row.IsNull("qtyorddspl") ? decimal.Zero : row.Field <decimal>("qtyorddspl");
            entity.qtyshipdspl     = row.IsNull("qtyshipdspl") ? decimal.Zero : row.Field <decimal>("qtyshipdspl");
            entity.returnfl        = row.Field <bool>("returnfl");
            entity.reqprod         = row.IsNull("reqprod") ? string.Empty : row.Field <string>("reqprod");
            entity.price           = row.IsNull("price") ? decimal.Zero : row.Field <decimal>("price");
            entity.pricedspl       = row.IsNull("pricedspl") ? string.Empty : row.Field <string>("pricedspl");
            entity.qtybreakty      = row.IsNull("qtybreakty") ? string.Empty : row.Field <string>("qtybreakty");
            entity.pdrecno         = row.IsNull("pdrecno") ? 0 : row.Field <int>("pdrecno");
            entity.hardpricefl     = row.Field <bool>("hardpricefl");
            entity.netord          = row.IsNull("netord") ? decimal.Zero : row.Field <decimal>("netord");
            entity.netamt          = row.IsNull("netamt") ? decimal.Zero : row.Field <decimal>("netamt");
            entity.netamtdspl      = row.IsNull("netamtdspl") ? string.Empty : row.Field <string>("netamtdspl");
            entity.netpricedspl    = row.IsNull("netpricedspl") ? string.Empty : row.Field <string>("netpricedspl");
            entity.enterdt         = row.Field <DateTime?>("enterdt");
            entity.jitpickfl       = row.Field <bool>("jitpickfl");
            entity.jitpickdspl     = row.IsNull("jitpickdspl") ? string.Empty : row.Field <string>("jitpickdspl");
            entity.reqshipdt       = row.Field <DateTime?>("reqshipdt");
            entity.promisedt       = row.Field <DateTime?>("promisedt");
            entity.kitfl           = row.Field <bool>("kitfl");
            entity.tallyfl         = row.Field <bool>("tallyfl");
            entity.corertnty       = row.IsNull("corertnty") ? string.Empty : row.Field <string>("corertnty");
            entity.origcore        = row.IsNull("origcore") ? string.Empty : row.Field <string>("origcore");
            entity.extrasortasc    = row.IsNull("extrasortasc") ? string.Empty : row.Field <string>("extrasortasc");
            entity.extrasortdsc    = row.IsNull("extrasortdsc") ? string.Empty : row.Field <string>("extrasortdsc");
            entity.ordertype       = row.IsNull("ordertype") ? string.Empty : row.Field <string>("ordertype");
            entity.ordertypedspl   = row.IsNull("ordertypedspl") ? string.Empty : row.Field <string>("ordertypedspl");
            entity.qtyreturn       = row.IsNull("qtyreturn") ? decimal.Zero : row.Field <decimal>("qtyreturn");
            entity.qtyreturndspl   = row.IsNull("qtyreturndspl") ? string.Empty : row.Field <string>("qtyreturndspl");
            entity.orderaltno      = row.IsNull("orderaltno") ? 0 : row.Field <int>("orderaltno");
            entity.netavail        = row.IsNull("netavail") ? decimal.Zero : row.Field <decimal>("netavail");
            entity.priceoverfl     = row.Field <bool>("priceoverfl");
            entity.priceclty       = row.IsNull("priceclty") ? string.Empty : row.Field <string>("priceclty");
            entity.pricecd         = row.IsNull("pricecd") ? decimal.Zero : row.Field <decimal>("pricecd");
            entity.ptlkitbofl      = row.Field <bool>("ptlkitbofl");
            entity.kitsplitamt     = row.IsNull("kitsplitamt") ? decimal.Zero : row.Field <decimal>("kitsplitamt");
            entity.bonoptl         = row.IsNull("bonoptl") ? 0 : row.Field <int>("bonoptl");
            entity.priceorigcd     = row.IsNull("priceorigcd") ? string.Empty : row.Field <string>("priceorigcd");
            entity.margin          = row.IsNull("margin") ? decimal.Zero : row.Field <decimal>("margin");
            entity.margindspl      = row.IsNull("margindspl") ? string.Empty : row.Field <string>("margindspl");
            entity.margpct         = row.IsNull("margpct") ? decimal.Zero : row.Field <decimal>("margpct");
            entity.margpctdspl     = row.IsNull("margpctdspl") ? string.Empty : row.Field <string>("margpctdspl");
            entity.cube            = row.IsNull("cube") ? decimal.Zero : row.Field <decimal>("cube");
            entity.weight          = row.IsNull("weight") ? decimal.Zero : row.Field <decimal>("weight");
            entity.csunperstk      = row.IsNull("csunperstk") ? decimal.Zero : row.Field <decimal>("csunperstk");
            entity.specconv        = row.IsNull("specconv") ? 0 : row.Field <int>("specconv");
            entity.prccostper      = row.IsNull("prccostper") ? string.Empty : row.Field <string>("prccostper");
            entity.speccostty      = row.IsNull("speccostty") ? string.Empty : row.Field <string>("speccostty");
            entity.icspecrecno     = row.IsNull("icspecrecno") ? 0 : row.Field <int>("icspecrecno");
            entity.speccostdspl    = row.IsNull("speccostdspl") ? string.Empty : row.Field <string>("speccostdspl");
            entity.edierr          = row.IsNull("edierr") ? 0 : row.Field <int>("edierr");
            entity.ediexc          = row.IsNull("ediexc") ? 0 : row.Field <int>("ediexc");
            entity.edilineno       = row.IsNull("edilineno") ? string.Empty : row.Field <string>("edilineno");
            entity.custprod        = row.IsNull("custprod") ? string.Empty : row.Field <string>("custprod");
            entity.origlineno      = row.IsNull("origlineno") ? 0 : row.Field <int>("origlineno");
            entity.chgtolineno     = row.IsNull("chgtolineno") ? 0 : row.Field <int>("chgtolineno");
            entity.lostbusty       = row.IsNull("lostbusty") ? string.Empty : row.Field <string>("lostbusty");
            entity.chgqtyfl        = row.Field <bool>("chgqtyfl");
            entity.extcomfl        = row.Field <bool>("extcomfl");
            entity.inventoryty     = row.IsNull("inventoryty") ? string.Empty : row.Field <string>("inventoryty");
            entity.invtydspl       = row.IsNull("invtydspl") ? string.Empty : row.Field <string>("invtydspl");
            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.upcid           = row.IsNull("upcid") ? string.Empty : row.Field <string>("upcid");
            return(entity);
        }