Example #1
0
        public static Loadwtlineextresults BuildLoadwtlineextresultsFromRow(DataRow row)
        {
            Loadwtlineextresults entity = new Loadwtlineextresults();

            entity.usagefl         = row.Field <bool>("usagefl");
            entity.lineno          = row.IsNull("lineno") ? 0 : row.Field <int>("lineno");
            entity.unit            = row.IsNull("unit") ? string.Empty : row.Field <string>("unit");
            entity.approvety       = row.IsNull("approvety") ? string.Empty : row.Field <string>("approvety");
            entity.prodcati        = row.IsNull("prodcati") ? string.Empty : row.Field <string>("prodcati");
            entity.qtyship         = row.IsNull("qtyship") ? decimal.Zero : row.Field <decimal>("qtyship");
            entity.duedt           = row.Field <DateTime?>("duedt");
            entity.bofl            = row.Field <bool>("bofl");
            entity.proddesc        = row.IsNull("proddesc") ? string.Empty : row.Field <string>("proddesc");
            entity.netamt          = row.IsNull("netamt") ? decimal.Zero : row.Field <decimal>("netamt");
            entity.surplus         = row.IsNull("surplus") ? decimal.Zero : row.Field <decimal>("surplus");
            entity.specprcst       = row.IsNull("specprcst") ? string.Empty : row.Field <string>("specprcst");
            entity.netavail        = row.IsNull("netavail") ? decimal.Zero : row.Field <decimal>("netavail");
            entity.orderaltno      = row.IsNull("orderaltno") ? string.Empty : row.Field <string>("orderaltno");
            entity.prodcost        = row.IsNull("prodcost") ? decimal.Zero : row.Field <decimal>("prodcost");
            entity.prodinrcvfl     = row.IsNull("prodinrcvfl") ? string.Empty : row.Field <string>("prodinrcvfl");
            entity.delayresrvfl    = row.Field <bool>("delayresrvfl");
            entity.prod            = row.IsNull("prod") ? string.Empty : row.Field <string>("prod");
            entity.nonstockty      = row.IsNull("nonstockty") ? string.Empty : row.Field <string>("nonstockty");
            entity.icspstatustype  = row.IsNull("icspstatustype") ? string.Empty : row.Field <string>("icspstatustype");
            entity.addonamt        = row.IsNull("addonamt") ? decimal.Zero : row.Field <decimal>("addonamt");
            entity.addonpct        = row.IsNull("addonpct") ? decimal.Zero : row.Field <decimal>("addonpct");
            entity.addonmarkuptype = row.IsNull("addonmarkuptype") ? string.Empty : row.Field <string>("addonmarkuptype");
            entity.addonmarkupcost = row.IsNull("addonmarkupcost") ? decimal.Zero : row.Field <decimal>("addonmarkupcost");
            entity.addontype       = row.IsNull("addontype") ? string.Empty : row.Field <string>("addontype");
            entity.qtyord          = row.IsNull("qtyord") ? decimal.Zero : row.Field <decimal>("qtyord");
            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");
            return(entity);
        }
Example #2
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromLoadwtlineextresults(ref DataRow row, Loadwtlineextresults entity)
 {
     row.SetField("usagefl", entity.usagefl);
     row.SetField("lineno", entity.lineno);
     row.SetField("unit", entity.unit);
     row.SetField("approvety", entity.approvety);
     row.SetField("prodcati", entity.prodcati);
     row.SetField("qtyship", entity.qtyship);
     row.SetField("duedt", entity.duedt);
     row.SetField("bofl", entity.bofl);
     row.SetField("proddesc", entity.proddesc);
     row.SetField("netamt", entity.netamt);
     row.SetField("surplus", entity.surplus);
     row.SetField("specprcst", entity.specprcst);
     row.SetField("netavail", entity.netavail);
     row.SetField("orderaltno", entity.orderaltno);
     row.SetField("prodcost", entity.prodcost);
     row.SetField("prodinrcvfl", entity.prodinrcvfl);
     row.SetField("delayresrvfl", entity.delayresrvfl);
     row.SetField("prod", entity.prod);
     row.SetField("nonstockty", entity.nonstockty);
     row.SetField("icspstatustype", entity.icspstatustype);
     row.SetField("addonamt", entity.addonamt);
     row.SetField("addonpct", entity.addonpct);
     row.SetField("addonmarkuptype", entity.addonmarkuptype);
     row.SetField("addonmarkupcost", entity.addonmarkupcost);
     row.SetField("addontype", entity.addontype);
     row.SetField("qtyord", entity.qtyord);
     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);
 }