Ejemplo n.º 1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromSaeventcopy(ref DataRow row, Saeventcopy entity)
 {
     row.SetField("fromeventname", entity.fromeventname);
     row.SetField("toeventname", entity.toeventname);
     row.SetField("toeventdesc", entity.toeventdesc);
     row.SetField("eventname", entity.eventname);
     row.SetField("rowid", entity.rowid.ToByteArray());
     row.SetField("userfield", entity.userfield);
 }
Ejemplo n.º 2
0
        public static Saeventcopy BuildSaeventcopyFromRow(DataRow row)
        {
            Saeventcopy entity = new Saeventcopy();

            entity.fromeventname = row.IsNull("fromeventname") ? string.Empty : row.Field <string>("fromeventname");
            entity.toeventname   = row.IsNull("toeventname") ? string.Empty : row.Field <string>("toeventname");
            entity.toeventdesc   = row.IsNull("toeventdesc") ? string.Empty : row.Field <string>("toeventdesc");
            entity.eventname     = row.IsNull("eventname") ? string.Empty : row.Field <string>("eventname");
            entity.rowid         = row.Field <byte[]>("rowid").ToStringEncoded();
            entity.userfield     = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }