Esempio n. 1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromWlitmstrresults(ref DataRow row, Wlitmstrresults entity)
 {
     row.SetField("cono", entity.cono);
     row.SetField("statustype", entity.statustype);
     row.SetField("processty", entity.processty);
     row.SetField("updtype", entity.updtype);
     row.SetField("wletstatus", entity.wletstatus);
     row.SetField("transtype", entity.transtype);
     row.SetField("ordertype", entity.ordertype);
     row.SetField("vendno", entity.vendno);
     row.SetField("whse", entity.whse);
     row.SetField("createdt", entity.createdt);
     row.SetField("createtm", entity.createtm);
     row.SetField("operinit", entity.operinit);
     row.SetField("setno", entity.setno);
     row.SetField("errorno", entity.errorno);
     row.SetField("errormsg", entity.errormsg);
     row.SetField("prod", entity.prod);
     row.SetField("descrip", entity.descrip);
     row.SetField("function", entity.function);
     row.SetField("field1", entity.field1);
     row.SetField("field2", entity.field2);
     row.SetField("serlotty", entity.serlotty);
     row.SetField("specnstype", entity.specnstype);
     row.SetField("prodvendwhse", entity.prodvendwhse);
     row.SetField("wlemrecid", entity.wlemrecid);
     row.SetField("wlemrowid", entity.wlemrowid.ToByteArray());
     row.SetField("cWLETstatus", entity.cWLETstatus);
     row.SetField("cWLETstatustype", entity.cWLETstatustype);
     row.SetField("cWLETProcessty", entity.cWLETProcessty);
     row.SetField("cWLETOrdertype", entity.cWLETOrdertype);
     row.SetField("cWLETUpdatetype", entity.cWLETUpdatetype);
     row.SetField("cWLETFunction", entity.cWLETFunction);
     row.SetField("cWLETTransType", entity.cWLETTransType);
     row.SetField("boxqty", entity.boxqty);
     row.SetField("whzone", entity.whzone);
     row.SetField("casequantity", entity.casequantity);
     row.SetField("palletquantity", entity.palletquantity);
     row.SetField("kitbuild", entity.kitbuild);
     row.SetField("weight", entity.weight);
     row.SetField("icspstattype", entity.icspstattype);
     row.SetField("cicspstattype", entity.cicspstattype);
     row.SetField("msdsfl", entity.msdsfl);
     row.SetField("length", entity.length);
     row.SetField("prodcat", entity.prodcat);
     row.SetField("msdssheetno", entity.msdssheetno);
     row.SetField("width", entity.width);
     row.SetField("unitstock", entity.unitstock);
     row.SetField("height", entity.height);
     row.SetField("kittype", entity.kittype);
     row.SetField("cubes", entity.cubes);
     row.SetField("transdt", entity.transdt);
     row.SetField("transtm", entity.transtm);
     row.SetField("binloc1", entity.binloc1);
     row.SetField("binloc2", entity.binloc2);
     row.SetField("icswstattype", entity.icswstattype);
     row.SetField("cicswstattype", entity.cicswstattype);
     row.SetField("upcno", entity.upcno);
     row.SetField("ccontrol", entity.ccontrol);
     row.SetField("vendprod", entity.vendprod);
     row.SetField("bincntr", entity.bincntr);
     row.SetField("category", entity.category);
     row.SetField("name", entity.name);
     row.SetField("shipfmno", entity.shipfmno);
     row.SetField("shipfrom", entity.shipfrom);
     row.SetField("address", entity.address);
     row.SetField("phoneno", entity.phoneno);
     row.SetField("address2", entity.address2);
     row.SetField("address3", entity.address3);
     row.SetField("faxphone", entity.faxphone);
     row.SetField("city", entity.city);
     row.SetField("state", entity.state);
     row.SetField("zipcd", entity.zipcd);
     row.SetField("edicode", entity.edicode);
     row.SetField("country", entity.country);
     row.SetField("dunsno", entity.dunsno);
     row.SetField("contact", entity.contact);
     row.SetField("crossref", entity.crossref);
     row.SetField("crosstype", entity.crosstype);
     row.SetField("unitdesc", entity.unitdesc);
     row.SetField("adjusttype", entity.adjusttype);
     row.SetField("inbound", entity.inbound);
     row.SetField("validtrans", entity.validtrans);
     row.SetField("locationreq", entity.locationreq);
     row.SetField("entrydt", entity.entrydt);
     row.SetField("reasonunavty", entity.reasonunavty);
     row.SetField("oreasonunavty", entity.oreasonunavty);
     row.SetField("onhandlabel", entity.onhandlabel);
     row.SetField("onhandqty", entity.onhandqty);
     row.SetField("unavailqty", entity.unavailqty);
     row.SetField("memo", entity.memo);
     row.SetField("qtyadjusted", entity.qtyadjusted);
     row.SetField("ohlabel", entity.ohlabel);
     row.SetField("adjustdesc", entity.adjustdesc);
     row.SetField("curreasondesc", entity.curreasondesc);
     row.SetField("oldreasondesc", entity.oldreasondesc);
     row.SetField("icsouqty", entity.icsouqty);
     row.SetField("stkfunction", entity.stkfunction);
     row.SetField("binupdated", entity.binupdated);
     row.SetField("wtno", entity.wtno);
     row.SetField("cspecnstype", entity.cspecnstype);
     row.SetField("lotherrecords", entity.lotherrecords);
     row.SetField("userfield", entity.userfield);
 }
Esempio n. 2
0
        public static Wlitmstrresults BuildWlitmstrresultsFromRow(DataRow row)
        {
            Wlitmstrresults entity = new Wlitmstrresults();

            entity.cono            = row.IsNull("cono") ? 0 : row.Field <int>("cono");
            entity.statustype      = row.IsNull("statustype") ? string.Empty : row.Field <string>("statustype");
            entity.processty       = row.IsNull("processty") ? string.Empty : row.Field <string>("processty");
            entity.updtype         = row.IsNull("updtype") ? string.Empty : row.Field <string>("updtype");
            entity.wletstatus      = row.IsNull("wletstatus") ? string.Empty : row.Field <string>("wletstatus");
            entity.transtype       = row.IsNull("transtype") ? string.Empty : row.Field <string>("transtype");
            entity.ordertype       = row.IsNull("ordertype") ? string.Empty : row.Field <string>("ordertype");
            entity.vendno          = row.IsNull("vendno") ? decimal.Zero : row.Field <decimal>("vendno");
            entity.whse            = row.IsNull("whse") ? string.Empty : row.Field <string>("whse");
            entity.createdt        = row.Field <DateTime?>("createdt");
            entity.createtm        = row.IsNull("createtm") ? string.Empty : row.Field <string>("createtm");
            entity.operinit        = row.IsNull("operinit") ? string.Empty : row.Field <string>("operinit");
            entity.setno           = row.IsNull("setno") ? string.Empty : row.Field <string>("setno");
            entity.errorno         = row.IsNull("errorno") ? 0 : row.Field <int>("errorno");
            entity.errormsg        = row.IsNull("errormsg") ? string.Empty : row.Field <string>("errormsg");
            entity.prod            = row.IsNull("prod") ? string.Empty : row.Field <string>("prod");
            entity.descrip         = row.IsNull("descrip") ? string.Empty : row.Field <string>("descrip");
            entity.function        = row.IsNull("function") ? string.Empty : row.Field <string>("function");
            entity.field1          = row.IsNull("field1") ? string.Empty : row.Field <string>("field1");
            entity.field2          = row.IsNull("field2") ? string.Empty : row.Field <string>("field2");
            entity.serlotty        = row.IsNull("serlotty") ? string.Empty : row.Field <string>("serlotty");
            entity.specnstype      = row.IsNull("specnstype") ? string.Empty : row.Field <string>("specnstype");
            entity.prodvendwhse    = row.IsNull("prodvendwhse") ? string.Empty : row.Field <string>("prodvendwhse");
            entity.wlemrecid       = row.IsNull("wlemrecid") ? 0 : row.Field <long>("wlemrecid");
            entity.wlemrowid       = row.Field <byte[]>("wlemrowid").ToStringEncoded();
            entity.cWLETstatus     = row.IsNull("cWLETstatus") ? string.Empty : row.Field <string>("cWLETstatus");
            entity.cWLETstatustype = row.IsNull("cWLETstatustype") ? string.Empty : row.Field <string>("cWLETstatustype");
            entity.cWLETProcessty  = row.IsNull("cWLETProcessty") ? string.Empty : row.Field <string>("cWLETProcessty");
            entity.cWLETOrdertype  = row.IsNull("cWLETOrdertype") ? string.Empty : row.Field <string>("cWLETOrdertype");
            entity.cWLETUpdatetype = row.IsNull("cWLETUpdatetype") ? string.Empty : row.Field <string>("cWLETUpdatetype");
            entity.cWLETFunction   = row.IsNull("cWLETFunction") ? string.Empty : row.Field <string>("cWLETFunction");
            entity.cWLETTransType  = row.IsNull("cWLETTransType") ? string.Empty : row.Field <string>("cWLETTransType");
            entity.boxqty          = row.IsNull("boxqty") ? 0 : row.Field <int>("boxqty");
            entity.whzone          = row.IsNull("whzone") ? string.Empty : row.Field <string>("whzone");
            entity.casequantity    = row.IsNull("casequantity") ? decimal.Zero : row.Field <decimal>("casequantity");
            entity.palletquantity  = row.IsNull("palletquantity") ? decimal.Zero : row.Field <decimal>("palletquantity");
            entity.kitbuild        = row.IsNull("kitbuild") ? string.Empty : row.Field <string>("kitbuild");
            entity.weight          = row.IsNull("weight") ? decimal.Zero : row.Field <decimal>("weight");
            entity.icspstattype    = row.IsNull("icspstattype") ? string.Empty : row.Field <string>("icspstattype");
            entity.cicspstattype   = row.IsNull("cicspstattype") ? string.Empty : row.Field <string>("cicspstattype");
            entity.msdsfl          = row.Field <bool>("msdsfl");
            entity.length          = row.IsNull("length") ? decimal.Zero : row.Field <decimal>("length");
            entity.prodcat         = row.IsNull("prodcat") ? string.Empty : row.Field <string>("prodcat");
            entity.msdssheetno     = row.IsNull("msdssheetno") ? string.Empty : row.Field <string>("msdssheetno");
            entity.width           = row.IsNull("width") ? decimal.Zero : row.Field <decimal>("width");
            entity.unitstock       = row.IsNull("unitstock") ? string.Empty : row.Field <string>("unitstock");
            entity.height          = row.IsNull("height") ? decimal.Zero : row.Field <decimal>("height");
            entity.kittype         = row.IsNull("kittype") ? string.Empty : row.Field <string>("kittype");
            entity.cubes           = row.IsNull("cubes") ? decimal.Zero : row.Field <decimal>("cubes");
            entity.transdt         = row.Field <DateTime?>("transdt");
            entity.transtm         = row.IsNull("transtm") ? string.Empty : row.Field <string>("transtm");
            entity.binloc1         = row.IsNull("binloc1") ? string.Empty : row.Field <string>("binloc1");
            entity.binloc2         = row.IsNull("binloc2") ? string.Empty : row.Field <string>("binloc2");
            entity.icswstattype    = row.IsNull("icswstattype") ? string.Empty : row.Field <string>("icswstattype");
            entity.cicswstattype   = row.IsNull("cicswstattype") ? string.Empty : row.Field <string>("cicswstattype");
            entity.upcno           = row.IsNull("upcno") ? string.Empty : row.Field <string>("upcno");
            entity.ccontrol        = row.IsNull("ccontrol") ? string.Empty : row.Field <string>("ccontrol");
            entity.vendprod        = row.IsNull("vendprod") ? string.Empty : row.Field <string>("vendprod");
            entity.bincntr         = row.IsNull("bincntr") ? string.Empty : row.Field <string>("bincntr");
            entity.category        = row.IsNull("category") ? string.Empty : row.Field <string>("category");
            entity.name            = row.IsNull("name") ? string.Empty : row.Field <string>("name");
            entity.shipfmno        = row.IsNull("shipfmno") ? 0 : row.Field <int>("shipfmno");
            entity.shipfrom        = row.IsNull("shipfrom") ? string.Empty : row.Field <string>("shipfrom");
            entity.address         = row.IsNull("address") ? string.Empty : row.Field <string>("address");
            entity.phoneno         = row.IsNull("phoneno") ? string.Empty : row.Field <string>("phoneno");
            entity.address2        = row.IsNull("address2") ? string.Empty : row.Field <string>("address2");
            entity.address3        = row.IsNull("address3") ? string.Empty : row.Field <string>("address3");
            entity.faxphone        = row.IsNull("faxphone") ? string.Empty : row.Field <string>("faxphone");
            entity.city            = row.IsNull("city") ? string.Empty : row.Field <string>("city");
            entity.state           = row.IsNull("state") ? string.Empty : row.Field <string>("state");
            entity.zipcd           = row.IsNull("zipcd") ? string.Empty : row.Field <string>("zipcd");
            entity.edicode         = row.IsNull("edicode") ? string.Empty : row.Field <string>("edicode");
            entity.country         = row.IsNull("country") ? string.Empty : row.Field <string>("country");
            entity.dunsno          = row.IsNull("dunsno") ? string.Empty : row.Field <string>("dunsno");
            entity.contact         = row.IsNull("contact") ? string.Empty : row.Field <string>("contact");
            entity.crossref        = row.IsNull("crossref") ? string.Empty : row.Field <string>("crossref");
            entity.crosstype       = row.IsNull("crosstype") ? string.Empty : row.Field <string>("crosstype");
            entity.unitdesc        = row.IsNull("unitdesc") ? string.Empty : row.Field <string>("unitdesc");
            entity.adjusttype      = row.IsNull("adjusttype") ? string.Empty : row.Field <string>("adjusttype");
            entity.inbound         = row.IsNull("inbound") ? string.Empty : row.Field <string>("inbound");
            entity.validtrans      = row.IsNull("validtrans") ? string.Empty : row.Field <string>("validtrans");
            entity.locationreq     = row.IsNull("locationreq") ? string.Empty : row.Field <string>("locationreq");
            entity.entrydt         = row.Field <DateTime?>("entrydt");
            entity.reasonunavty    = row.IsNull("reasonunavty") ? string.Empty : row.Field <string>("reasonunavty");
            entity.oreasonunavty   = row.IsNull("oreasonunavty") ? string.Empty : row.Field <string>("oreasonunavty");
            entity.onhandlabel     = row.IsNull("onhandlabel") ? string.Empty : row.Field <string>("onhandlabel");
            entity.onhandqty       = row.IsNull("onhandqty") ? decimal.Zero : row.Field <decimal>("onhandqty");
            entity.unavailqty      = row.IsNull("unavailqty") ? decimal.Zero : row.Field <decimal>("unavailqty");
            entity.memo            = row.IsNull("memo") ? string.Empty : row.Field <string>("memo");
            entity.qtyadjusted     = row.IsNull("qtyadjusted") ? decimal.Zero : row.Field <decimal>("qtyadjusted");
            entity.ohlabel         = row.IsNull("ohlabel") ? string.Empty : row.Field <string>("ohlabel");
            entity.adjustdesc      = row.IsNull("adjustdesc") ? string.Empty : row.Field <string>("adjustdesc");
            entity.curreasondesc   = row.IsNull("curreasondesc") ? string.Empty : row.Field <string>("curreasondesc");
            entity.oldreasondesc   = row.IsNull("oldreasondesc") ? string.Empty : row.Field <string>("oldreasondesc");
            entity.icsouqty        = row.IsNull("icsouqty") ? decimal.Zero : row.Field <decimal>("icsouqty");
            entity.stkfunction     = row.IsNull("stkfunction") ? string.Empty : row.Field <string>("stkfunction");
            entity.binupdated      = row.IsNull("binupdated") ? string.Empty : row.Field <string>("binupdated");
            entity.wtno            = row.IsNull("wtno") ? string.Empty : row.Field <string>("wtno");
            entity.cspecnstype     = row.IsNull("cspecnstype") ? string.Empty : row.Field <string>("cspecnstype");
            entity.lotherrecords   = row.Field <bool>("lotherrecords");
            entity.userfield       = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }