コード例 #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromWteilinelist(ref DataRow row, Wteilinelist entity)
 {
     row.SetField("binloc1", entity.binloc1);
     row.SetField("binloc2", entity.binloc2);
     row.SetField("cancelfl", entity.cancelfl);
     row.SetField("chrgqty", entity.chrgqty);
     row.SetField("cono", entity.cono);
     row.SetField("conv", entity.conv);
     row.SetField("corewarrty", entity.corewarrty);
     row.SetField("csunperstk", entity.csunperstk);
     row.SetField("eachfl", entity.eachfl);
     row.SetField("eachprice", entity.eachprice);
     row.SetField("icsnpofl", entity.icsnpofl);
     row.SetField("icspecrecno", entity.icspecrecno);
     row.SetField("jrnlno", entity.jrnlno);
     row.SetField("lineno", entity.lineno);
     row.SetField("nonstockty", entity.nonstockty);
     row.SetField("nosnlots", entity.nosnlots);
     row.SetField("notesfl", entity.notesfl);
     row.SetField("oqtyrcv", entity.oqtyrcv);
     row.SetField("oqtyunavail", entity.oqtyunavail);
     row.SetField("oreasunavty", entity.oreasunavty);
     row.SetField("osortbinloc", entity.osortbinloc);
     row.SetField("ostkqtyrcv", entity.ostkqtyrcv);
     row.SetField("pono", entity.pono);
     row.SetField("posuf", entity.posuf);
     row.SetField("postfl", entity.postfl);
     row.SetField("prccostper", entity.prccostper);
     row.SetField("price", entity.price);
     row.SetField("proddesc", entity.proddesc);
     row.SetField("prodinrcvfl", entity.prodinrcvfl);
     row.SetField("qtyassign", entity.qtyassign);
     row.SetField("qtyord", entity.qtyord);
     row.SetField("qtyrcv", entity.qtyrcv);
     row.SetField("qtyship", entity.qtyship);
     row.SetField("qtyunavail", entity.qtyunavail);
     row.SetField("reasunavty", entity.reasunavty);
     row.SetField("reqprod", entity.reqprod);
     row.SetField("seqno", entity.seqno);
     row.SetField("serlottype", entity.serlottype);
     row.SetField("shipprod", entity.shipprod);
     row.SetField("sortbinloc", entity.sortbinloc);
     row.SetField("specconv", entity.specconv);
     row.SetField("speccostty", entity.speccostty);
     row.SetField("stkadj", entity.stkadj);
     row.SetField("stkqtyord", entity.stkqtyord);
     row.SetField("stkqtyrcv", entity.stkqtyrcv);
     row.SetField("stkqtyship", entity.stkqtyship);
     row.SetField("tallyfl", entity.tallyfl);
     row.SetField("ties", entity.ties);
     row.SetField("trackfl", entity.trackfl);
     row.SetField("transtype", entity.transtype);
     row.SetField("unit", entity.unit);
     row.SetField("unitupdtfl", entity.unitupdtfl);
     row.SetField("vendprod", entity.vendprod);
     row.SetField("verrcvchgfl", entity.verrcvchgfl);
     row.SetField("wlwhsefl", entity.wlwhsefl);
     row.SetField("whse", entity.whse);
     row.SetField("wmfl", entity.wmfl);
     row.SetField("wmqtyrcv", entity.wmqtyrcv);
     row.SetField("sortbinlocenabled", entity.sortbinlocenabled);
     row.SetField("poeirecid", entity.poeirecid);
     row.SetField("poeirowid", entity.poeirowid.ToByteArray());
     row.SetField("wtehrowid", entity.wtehrowid.ToByteArray());
     row.SetField("wtelrowid", entity.wtelrowid.ToByteArray());
     row.SetField("brandcode", entity.brandcode);
     row.SetField("mfgprod", entity.mfgprod);
     row.SetField("msdsfl", entity.msdsfl);
     row.SetField("userfield", entity.userfield);
 }
コード例 #2
0
        public static Wteilinelist BuildWteilinelistFromRow(DataRow row)
        {
            Wteilinelist entity = new Wteilinelist();

            entity.binloc1           = row.IsNull("binloc1") ? string.Empty : row.Field <string>("binloc1");
            entity.binloc2           = row.IsNull("binloc2") ? string.Empty : row.Field <string>("binloc2");
            entity.cancelfl          = row.Field <bool>("cancelfl");
            entity.chrgqty           = row.IsNull("chrgqty") ? decimal.Zero : row.Field <decimal>("chrgqty");
            entity.cono              = row.IsNull("cono") ? 0 : row.Field <int>("cono");
            entity.conv              = row.IsNull("conv") ? decimal.Zero : row.Field <decimal>("conv");
            entity.corewarrty        = row.IsNull("corewarrty") ? string.Empty : row.Field <string>("corewarrty");
            entity.csunperstk        = row.IsNull("csunperstk") ? decimal.Zero : row.Field <decimal>("csunperstk");
            entity.eachfl            = row.Field <bool>("eachfl");
            entity.eachprice         = row.IsNull("eachprice") ? decimal.Zero : row.Field <decimal>("eachprice");
            entity.icsnpofl          = row.Field <bool>("icsnpofl");
            entity.icspecrecno       = row.IsNull("icspecrecno") ? 0 : row.Field <int>("icspecrecno");
            entity.jrnlno            = row.IsNull("jrnlno") ? 0 : row.Field <int>("jrnlno");
            entity.lineno            = row.IsNull("lineno") ? 0 : row.Field <int>("lineno");
            entity.nonstockty        = row.IsNull("nonstockty") ? string.Empty : row.Field <string>("nonstockty");
            entity.nosnlots          = row.IsNull("nosnlots") ? decimal.Zero : row.Field <decimal>("nosnlots");
            entity.notesfl           = row.IsNull("notesfl") ? string.Empty : row.Field <string>("notesfl");
            entity.oqtyrcv           = row.IsNull("oqtyrcv") ? decimal.Zero : row.Field <decimal>("oqtyrcv");
            entity.oqtyunavail       = row.IsNull("oqtyunavail") ? decimal.Zero : row.Field <decimal>("oqtyunavail");
            entity.oreasunavty       = row.IsNull("oreasunavty") ? string.Empty : row.Field <string>("oreasunavty");
            entity.osortbinloc       = row.IsNull("osortbinloc") ? string.Empty : row.Field <string>("osortbinloc");
            entity.ostkqtyrcv        = row.IsNull("ostkqtyrcv") ? decimal.Zero : row.Field <decimal>("ostkqtyrcv");
            entity.pono              = row.IsNull("pono") ? 0 : row.Field <int>("pono");
            entity.posuf             = row.IsNull("posuf") ? 0 : row.Field <int>("posuf");
            entity.postfl            = row.Field <bool>("postfl");
            entity.prccostper        = row.IsNull("prccostper") ? string.Empty : row.Field <string>("prccostper");
            entity.price             = row.IsNull("price") ? decimal.Zero : row.Field <decimal>("price");
            entity.proddesc          = row.IsNull("proddesc") ? string.Empty : row.Field <string>("proddesc");
            entity.prodinrcvfl       = row.Field <bool>("prodinrcvfl");
            entity.qtyassign         = row.IsNull("qtyassign") ? decimal.Zero : row.Field <decimal>("qtyassign");
            entity.qtyord            = row.IsNull("qtyord") ? decimal.Zero : row.Field <decimal>("qtyord");
            entity.qtyrcv            = row.IsNull("qtyrcv") ? decimal.Zero : row.Field <decimal>("qtyrcv");
            entity.qtyship           = row.IsNull("qtyship") ? decimal.Zero : row.Field <decimal>("qtyship");
            entity.qtyunavail        = row.IsNull("qtyunavail") ? decimal.Zero : row.Field <decimal>("qtyunavail");
            entity.reasunavty        = row.IsNull("reasunavty") ? string.Empty : row.Field <string>("reasunavty");
            entity.reqprod           = row.IsNull("reqprod") ? string.Empty : row.Field <string>("reqprod");
            entity.seqno             = row.IsNull("seqno") ? 0 : row.Field <int>("seqno");
            entity.serlottype        = row.IsNull("serlottype") ? string.Empty : row.Field <string>("serlottype");
            entity.shipprod          = row.IsNull("shipprod") ? string.Empty : row.Field <string>("shipprod");
            entity.sortbinloc        = row.IsNull("sortbinloc") ? string.Empty : row.Field <string>("sortbinloc");
            entity.specconv          = row.IsNull("specconv") ? 0 : row.Field <int>("specconv");
            entity.speccostty        = row.IsNull("speccostty") ? string.Empty : row.Field <string>("speccostty");
            entity.stkadj            = row.IsNull("stkadj") ? decimal.Zero : row.Field <decimal>("stkadj");
            entity.stkqtyord         = row.IsNull("stkqtyord") ? decimal.Zero : row.Field <decimal>("stkqtyord");
            entity.stkqtyrcv         = row.IsNull("stkqtyrcv") ? decimal.Zero : row.Field <decimal>("stkqtyrcv");
            entity.stkqtyship        = row.IsNull("stkqtyship") ? decimal.Zero : row.Field <decimal>("stkqtyship");
            entity.tallyfl           = row.Field <bool>("tallyfl");
            entity.ties              = row.IsNull("ties") ? string.Empty : row.Field <string>("ties");
            entity.trackfl           = row.Field <bool>("trackfl");
            entity.transtype         = row.IsNull("transtype") ? string.Empty : row.Field <string>("transtype");
            entity.unit              = row.IsNull("unit") ? string.Empty : row.Field <string>("unit");
            entity.unitupdtfl        = row.Field <bool>("unitupdtfl");
            entity.vendprod          = row.IsNull("vendprod") ? string.Empty : row.Field <string>("vendprod");
            entity.verrcvchgfl       = row.Field <bool>("verrcvchgfl");
            entity.wlwhsefl          = row.Field <bool>("wlwhsefl");
            entity.whse              = row.IsNull("whse") ? string.Empty : row.Field <string>("whse");
            entity.wmfl              = row.Field <bool>("wmfl");
            entity.wmqtyrcv          = row.IsNull("wmqtyrcv") ? decimal.Zero : row.Field <decimal>("wmqtyrcv");
            entity.sortbinlocenabled = row.Field <bool>("sortbinlocenabled");
            entity.poeirecid         = row.IsNull("poeirecid") ? 0 : row.Field <long>("poeirecid");
            entity.poeirowid         = row.Field <byte[]>("poeirowid").ToStringEncoded();
            entity.wtehrowid         = row.Field <byte[]>("wtehrowid").ToStringEncoded();
            entity.wtelrowid         = row.Field <byte[]>("wtelrowid").ToStringEncoded();
            entity.brandcode         = row.IsNull("brandcode") ? string.Empty : row.Field <string>("brandcode");
            entity.mfgprod           = row.IsNull("mfgprod") ? string.Empty : row.Field <string>("mfgprod");
            entity.msdsfl            = row.Field <bool>("msdsfl");
            entity.userfield         = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }