Ejemplo n.º 1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromPvrecoveryrecord(ref DataRow row, Pvrecoveryrecord entity)
 {
     row.SetField("action", entity.action);
     row.SetField("functionname", entity.functionname);
     row.SetField("jrnlno", entity.jrnlno);
     row.SetField("recoverydata", entity.recoverydata);
     row.SetField("newjrnlno", entity.newjrnlno);
     row.SetField("newrecoverydata", entity.newrecoverydata);
     row.SetField("userfield", entity.userfield);
 }
Ejemplo n.º 2
0
        public static Pvrecoveryrecord BuildPvrecoveryrecordFromRow(DataRow row)
        {
            Pvrecoveryrecord entity = new Pvrecoveryrecord();

            entity.action          = row.IsNull("action") ? string.Empty : row.Field <string>("action");
            entity.functionname    = row.IsNull("functionname") ? string.Empty : row.Field <string>("functionname");
            entity.jrnlno          = row.IsNull("jrnlno") ? 0 : row.Field <int>("jrnlno");
            entity.recoverydata    = row.IsNull("recoverydata") ? string.Empty : row.Field <string>("recoverydata");
            entity.newjrnlno       = row.IsNull("newjrnlno") ? 0 : row.Field <int>("newjrnlno");
            entity.newrecoverydata = row.IsNull("newrecoverydata") ? string.Empty : row.Field <string>("newrecoverydata");
            entity.userfield       = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }