Beispiel #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromOelinepricetabprevprc(ref DataRow row, Oelinepricetabprevprc entity)
 {
     row.SetField("prevprice", entity.prevprice);
     row.SetField("prevpricedspl", entity.prevpricedspl);
     row.SetField("prevdt", entity.prevdt);
     row.SetField("discamt", entity.discamt);
     row.SetField("discamtdspl", entity.discamtdspl);
     row.SetField("disctype", entity.disctype);
     row.SetField("qtyord", entity.qtyord);
     row.SetField("unit", entity.unit);
     row.SetField("oeelrecid", entity.oeelrecid);
     row.SetField("userfield", entity.userfield);
 }
Beispiel #2
0
        public static Oelinepricetabprevprc BuildOelinepricetabprevprcFromRow(DataRow row)
        {
            Oelinepricetabprevprc entity = new Oelinepricetabprevprc();

            entity.prevprice     = row.IsNull("prevprice") ? decimal.Zero : row.Field <decimal>("prevprice");
            entity.prevpricedspl = row.IsNull("prevpricedspl") ? string.Empty : row.Field <string>("prevpricedspl");
            entity.prevdt        = row.Field <DateTime?>("prevdt");
            entity.discamt       = row.IsNull("discamt") ? decimal.Zero : row.Field <decimal>("discamt");
            entity.discamtdspl   = row.IsNull("discamtdspl") ? string.Empty : row.Field <string>("discamtdspl");
            entity.disctype      = row.Field <bool>("disctype");
            entity.qtyord        = row.IsNull("qtyord") ? decimal.Zero : row.Field <decimal>("qtyord");
            entity.unit          = row.IsNull("unit") ? string.Empty : row.Field <string>("unit");
            entity.oeelrecid     = row.IsNull("oeelrecid") ? 0 : row.Field <long>("oeelrecid");
            entity.userfield     = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }