Пример #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromVaspheaderchangeupdate(ref DataRow row, Vaspheaderchangeupdate entity)
 {
     row.SetField("nodaysfab", entity.nodaysfab);
     row.SetField("refer", entity.refer);
     row.SetField("verrefer", entity.verrefer);
     row.SetField("rowid-vasp", entity.rowidVasp.ToByteArray());
     row.SetField("userfield", entity.userfield);
 }
Пример #2
0
        public static Vaspheaderchangeupdate BuildVaspheaderchangeupdateFromRow(DataRow row)
        {
            Vaspheaderchangeupdate entity = new Vaspheaderchangeupdate();

            entity.nodaysfab = row.IsNull("nodaysfab") ? 0 : row.Field <int>("nodaysfab");
            entity.refer     = row.IsNull("refer") ? string.Empty : row.Field <string>("refer");
            entity.verrefer  = row.IsNull("verrefer") ? string.Empty : row.Field <string>("verrefer");
            entity.rowidVasp = row.Field <byte[]>("rowid-vasp").ToStringEncoded();
            entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }