示例#1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromPdsficswresults(ref DataRow row, Pdsficswresults entity)
 {
     row.SetField("prod", entity.prod);
     row.SetField("prodnotesfl", entity.prodnotesfl);
     row.SetField("whse", entity.whse);
     row.SetField("cpricetext", entity.cpricetext);
     row.SetField("cspeccostty", entity.cspeccostty);
     row.SetField("baseprice", entity.baseprice);
     row.SetField("listprice", entity.listprice);
     row.SetField("replcost", entity.replcost);
     row.SetField("stndcost", entity.stndcost);
     row.SetField("lastcost", entity.lastcost);
     row.SetField("priceupddt", entity.priceupddt);
     row.SetField("replcostdt", entity.replcostdt);
     row.SetField("stndcostdt", entity.stndcostdt);
     row.SetField("userfield", entity.userfield);
 }
示例#2
0
        public static Pdsficswresults BuildPdsficswresultsFromRow(DataRow row)
        {
            Pdsficswresults entity = new Pdsficswresults();

            entity.prod        = row.IsNull("prod") ? string.Empty : row.Field <string>("prod");
            entity.prodnotesfl = row.IsNull("prodnotesfl") ? string.Empty : row.Field <string>("prodnotesfl");
            entity.whse        = row.IsNull("whse") ? string.Empty : row.Field <string>("whse");
            entity.cpricetext  = row.IsNull("cpricetext") ? string.Empty : row.Field <string>("cpricetext");
            entity.cspeccostty = row.IsNull("cspeccostty") ? string.Empty : row.Field <string>("cspeccostty");
            entity.baseprice   = row.IsNull("baseprice") ? decimal.Zero : row.Field <decimal>("baseprice");
            entity.listprice   = row.IsNull("listprice") ? decimal.Zero : row.Field <decimal>("listprice");
            entity.replcost    = row.IsNull("replcost") ? decimal.Zero : row.Field <decimal>("replcost");
            entity.stndcost    = row.IsNull("stndcost") ? decimal.Zero : row.Field <decimal>("stndcost");
            entity.lastcost    = row.IsNull("lastcost") ? decimal.Zero : row.Field <decimal>("lastcost");
            entity.priceupddt  = row.Field <DateTime?>("priceupddt");
            entity.replcostdt  = row.Field <DateTime?>("replcostdt");
            entity.stndcostdt  = row.Field <DateTime?>("stndcostdt");
            entity.userfield   = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }