/// <summary> /// Update a database row from a class /// </summary> public static void UpdateRowFromGlsacheckfornull(ref DataRow row, Glsacheckfornull entity) { row.SetField("glno", entity.glno); row.SetField("glyear", entity.glyear); row.SetField("glsarowid", entity.glsarowid.ToByteArray()); row.SetField("warningmess", entity.warningmess); row.SetField("userfield", entity.userfield); }
public static Glsacheckfornull BuildGlsacheckfornullFromRow(DataRow row) { Glsacheckfornull entity = new Glsacheckfornull(); entity.glno = row.IsNull("glno") ? string.Empty : row.Field <string>("glno"); entity.glyear = row.IsNull("glyear") ? 0 : row.Field <int>("glyear"); entity.glsarowid = row.Field <byte[]>("glsarowid").ToStringEncoded(); entity.warningmess = row.IsNull("warningmess") ? string.Empty : row.Field <string>("warningmess"); entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield"); return(entity); }