Example #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromPorrarreptupdatesingle(ref DataRow row, Porrarreptupdatesingle entity)
 {
     row.SetField("rowid-poerah", entity.rowidPoerah.ToByteArray());
     row.SetField("shipfmno", entity.shipfmno);
     row.SetField("billtowhse", entity.billtowhse);
     row.SetField("buyer", entity.buyer);
     row.SetField("mergefl", entity.mergefl);
 }
Example #2
0
        public static Porrarreptupdatesingle BuildPorrarreptupdatesingleFromRow(DataRow row)
        {
            Porrarreptupdatesingle entity = new Porrarreptupdatesingle();

            entity.rowidPoerah = row.Field <byte[]>("rowid-poerah").ToStringEncoded();
            entity.shipfmno    = row.IsNull("shipfmno") ? 0 : row.Field <int>("shipfmno");
            entity.billtowhse  = row.IsNull("billtowhse") ? string.Empty : row.Field <string>("billtowhse");
            entity.buyer       = row.IsNull("buyer") ? string.Empty : row.Field <string>("buyer");
            entity.mergefl     = row.Field <bool>("mergefl");
            return(entity);
        }