Beispiel #1
0
        public static Vaifbuildvalinelistresults BuildVaifbuildvalinelistresultsFromRow(DataRow row)
        {
            Vaifbuildvalinelistresults entity = new Vaifbuildvalinelistresults();

            entity.vano            = row.IsNull("vano") ? 0 : row.Field <int>("vano");
            entity.vasuf           = row.IsNull("vasuf") ? 0 : row.Field <int>("vasuf");
            entity.cVANotes        = row.IsNull("cVANotes") ? string.Empty : row.Field <string>("cVANotes");
            entity.seqno           = row.IsNull("seqno") ? 0 : row.Field <int>("seqno");
            entity.cSctnNotes      = row.IsNull("cSctnNotes") ? string.Empty : row.Field <string>("cSctnNotes");
            entity.sctntype        = row.IsNull("sctntype") ? string.Empty : row.Field <string>("sctntype");
            entity.lineno          = row.IsNull("lineno") ? 0 : row.Field <int>("lineno");
            entity.commentfl       = row.Field <bool>("commentfl");
            entity.nonstockty      = row.IsNull("nonstockty") ? string.Empty : row.Field <string>("nonstockty");
            entity.shipprod        = row.IsNull("shipprod") ? string.Empty : row.Field <string>("shipprod");
            entity.notesfl         = row.IsNull("notesfl") ? string.Empty : row.Field <string>("notesfl");
            entity.cProdDesc       = row.IsNull("cProdDesc") ? string.Empty : row.Field <string>("cProdDesc");
            entity.qtybasetotfl    = row.Field <bool>("qtybasetotfl");
            entity.qtyneeded       = row.IsNull("qtyneeded") ? decimal.Zero : row.Field <decimal>("qtyneeded");
            entity.unit            = row.IsNull("unit") ? string.Empty : row.Field <string>("unit");
            entity.qtyord          = row.IsNull("qtyord") ? decimal.Zero : row.Field <decimal>("qtyord");
            entity.qtyship         = row.IsNull("qtyship") ? decimal.Zero : row.Field <decimal>("qtyship");
            entity.prodcostdspl    = row.IsNull("prodcostdspl") ? string.Empty : row.Field <string>("prodcostdspl");
            entity.netamtdspl      = row.IsNull("netamtdspl") ? string.Empty : row.Field <string>("netamtdspl");
            entity.statustype      = row.Field <bool>("statustype");
            entity.rushfl          = row.Field <bool>("rushfl");
            entity.labordata       = row.IsNull("labordata") ? string.Empty : row.Field <string>("labordata");
            entity.netavail        = row.IsNull("netavail") ? decimal.Zero : row.Field <decimal>("netavail");
            entity.qtyonorder      = row.IsNull("qtyonorder") ? decimal.Zero : row.Field <decimal>("qtyonorder");
            entity.ordertypedspl   = row.IsNull("ordertypedspl") ? string.Empty : row.Field <string>("ordertypedspl");
            entity.orderaltno      = row.IsNull("orderaltno") ? 0 : row.Field <int>("orderaltno");
            entity.orderduedt      = row.Field <DateTime?>("orderduedt");
            entity.builderdspl     = row.IsNull("builderdspl") ? string.Empty : row.Field <string>("builderdspl");
            entity.timeelapseddspl = row.IsNull("timeelapseddspl") ? string.Empty : row.Field <string>("timeelapseddspl");
            entity.pndintrnestamt  = row.IsNull("pndintrnestamt") ? decimal.Zero : row.Field <decimal>("pndintrnestamt");
            entity.pndintrnestsecs = row.IsNull("pndintrnestsecs") ? 0 : row.Field <int>("pndintrnestsecs");
            entity.pndintrnesthrs  = row.IsNull("pndintrnesthrs") ? string.Empty : row.Field <string>("pndintrnesthrs");
            entity.pndintrnactamt  = row.IsNull("pndintrnactamt") ? decimal.Zero : row.Field <decimal>("pndintrnactamt");
            entity.pndintrnactsecs = row.IsNull("pndintrnactsecs") ? 0 : row.Field <int>("pndintrnactsecs");
            entity.pndintrnacthrs  = row.IsNull("pndintrnacthrs") ? string.Empty : row.Field <string>("pndintrnacthrs");
            entity.brandcode       = row.IsNull("brandcode") ? string.Empty : row.Field <string>("brandcode");
            entity.mfgprod         = row.IsNull("mfgprod") ? string.Empty : row.Field <string>("mfgprod");
            entity.vendprod        = row.IsNull("vendprod") ? string.Empty : row.Field <string>("vendprod");
            entity.msdsfl          = row.Field <bool>("msdsfl");
            entity.whse            = row.IsNull("whse") ? string.Empty : row.Field <string>("whse");
            entity.userfield       = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }
Beispiel #2
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromVaifbuildvalinelistresults(ref DataRow row, Vaifbuildvalinelistresults entity)
 {
     row.SetField("vano", entity.vano);
     row.SetField("vasuf", entity.vasuf);
     row.SetField("cVANotes", entity.cVANotes);
     row.SetField("seqno", entity.seqno);
     row.SetField("cSctnNotes", entity.cSctnNotes);
     row.SetField("sctntype", entity.sctntype);
     row.SetField("lineno", entity.lineno);
     row.SetField("commentfl", entity.commentfl);
     row.SetField("nonstockty", entity.nonstockty);
     row.SetField("shipprod", entity.shipprod);
     row.SetField("notesfl", entity.notesfl);
     row.SetField("cProdDesc", entity.cProdDesc);
     row.SetField("qtybasetotfl", entity.qtybasetotfl);
     row.SetField("qtyneeded", entity.qtyneeded);
     row.SetField("unit", entity.unit);
     row.SetField("qtyord", entity.qtyord);
     row.SetField("qtyship", entity.qtyship);
     row.SetField("prodcostdspl", entity.prodcostdspl);
     row.SetField("netamtdspl", entity.netamtdspl);
     row.SetField("statustype", entity.statustype);
     row.SetField("rushfl", entity.rushfl);
     row.SetField("labordata", entity.labordata);
     row.SetField("netavail", entity.netavail);
     row.SetField("qtyonorder", entity.qtyonorder);
     row.SetField("ordertypedspl", entity.ordertypedspl);
     row.SetField("orderaltno", entity.orderaltno);
     row.SetField("orderduedt", entity.orderduedt);
     row.SetField("builderdspl", entity.builderdspl);
     row.SetField("timeelapseddspl", entity.timeelapseddspl);
     row.SetField("pndintrnestamt", entity.pndintrnestamt);
     row.SetField("pndintrnestsecs", entity.pndintrnestsecs);
     row.SetField("pndintrnesthrs", entity.pndintrnesthrs);
     row.SetField("pndintrnactamt", entity.pndintrnactamt);
     row.SetField("pndintrnactsecs", entity.pndintrnactsecs);
     row.SetField("pndintrnacthrs", entity.pndintrnacthrs);
     row.SetField("brandcode", entity.brandcode);
     row.SetField("mfgprod", entity.mfgprod);
     row.SetField("vendprod", entity.vendprod);
     row.SetField("msdsfl", entity.msdsfl);
     row.SetField("whse", entity.whse);
     row.SetField("userfield", entity.userfield);
 }