コード例 #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromCrbankcopy(ref DataRow row, Crbankcopy entity)
 {
     row.SetField("frombankno", entity.frombankno);
     row.SetField("tobankno", entity.tobankno);
     row.SetField("name", entity.name);
     row.SetField("rowid", entity.rowid.ToByteArray());
     row.SetField("userfield", entity.userfield);
 }
コード例 #2
0
        public static Crbankcopy BuildCrbankcopyFromRow(DataRow row)
        {
            Crbankcopy entity = new Crbankcopy();

            entity.frombankno = row.IsNull("frombankno") ? 0 : row.Field <int>("frombankno");
            entity.tobankno   = row.IsNull("tobankno") ? 0 : row.Field <int>("tobankno");
            entity.name       = row.IsNull("name") ? string.Empty : row.Field <string>("name");
            entity.rowid      = row.Field <byte[]>("rowid").ToStringEncoded();
            entity.userfield  = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }