Пример #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromOelinetiedvaord(ref DataRow row, Oelinetiedvaord entity)
 {
     row.SetField("orderno", entity.orderno);
     row.SetField("ordersuf", entity.ordersuf);
     row.SetField("lineno", entity.lineno);
     row.SetField("tiedvano", entity.tiedvano);
     row.SetField("userfield", entity.userfield);
 }
Пример #2
0
        public static Oelinetiedvaord BuildOelinetiedvaordFromRow(DataRow row)
        {
            Oelinetiedvaord entity = new Oelinetiedvaord();

            entity.orderno   = row.IsNull("orderno") ? 0 : row.Field <int>("orderno");
            entity.ordersuf  = row.IsNull("ordersuf") ? 0 : row.Field <int>("ordersuf");
            entity.lineno    = row.IsNull("lineno") ? 0 : row.Field <int>("lineno");
            entity.tiedvano  = row.IsNull("tiedvano") ? 0 : row.Field <int>("tiedvano");
            entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }