/// <summary> /// Update a database row from a class /// </summary> public static void UpdateRowFromApeiinvdeterrors(ref DataRow row, Apeiinvdeterrors entity) { row.SetField("errortype", entity.errortype); row.SetField("errornumber", entity.errornumber); row.SetField("errormessage", entity.errormessage); row.SetField("errordata", entity.errordata); row.SetField("seqno", entity.seqno); row.SetField("userfield", entity.userfield); }
public static Apeiinvdeterrors BuildApeiinvdeterrorsFromRow(DataRow row) { Apeiinvdeterrors entity = new Apeiinvdeterrors(); entity.errortype = row.IsNull("errortype") ? string.Empty : row.Field <string>("errortype"); entity.errornumber = row.IsNull("errornumber") ? 0 : row.Field <int>("errornumber"); entity.errormessage = row.IsNull("errormessage") ? string.Empty : row.Field <string>("errormessage"); entity.errordata = row.IsNull("errordata") ? string.Empty : row.Field <string>("errordata"); entity.seqno = row.IsNull("seqno") ? 0 : row.Field <int>("seqno"); entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield"); return(entity); }