Exemple #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromOelinepricetabpricelvl(ref DataRow row, Oelinepricetabpricelvl entity)
 {
     row.SetField("level", entity.level);
     row.SetField("price", entity.price);
     row.SetField("pricedspl", entity.pricedspl);
     row.SetField("qty", entity.qty);
     row.SetField("qtydspl", entity.qtydspl);
     row.SetField("userfield", entity.userfield);
 }
Exemple #2
0
        public static Oelinepricetabpricelvl BuildOelinepricetabpricelvlFromRow(DataRow row)
        {
            Oelinepricetabpricelvl entity = new Oelinepricetabpricelvl();

            entity.level     = row.IsNull("level") ? 0 : row.Field <int>("level");
            entity.price     = row.IsNull("price") ? decimal.Zero : row.Field <decimal>("price");
            entity.pricedspl = row.IsNull("pricedspl") ? string.Empty : row.Field <string>("pricedspl");
            entity.qty       = row.IsNull("qty") ? decimal.Zero : row.Field <decimal>("qty");
            entity.qtydspl   = row.IsNull("qtydspl") ? string.Empty : row.Field <string>("qtydspl");
            entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }