/// <summary> /// Update a database row from a class /// </summary> public static void UpdateRowFromGlaccountcreate(ref DataRow row, Glaccountcreate entity) { row.SetField("yr", entity.yr); row.SetField("glno", entity.glno); row.SetField("glsa-rowid", entity.glsaRowid.ToByteArray()); row.SetField("gltitle", entity.gltitle); row.SetField("accttype", entity.accttype); row.SetField("userfield", entity.userfield); }
public static Glaccountcreate BuildGlaccountcreateFromRow(DataRow row) { Glaccountcreate entity = new Glaccountcreate(); entity.yr = row.IsNull("yr") ? 0 : row.Field <int>("yr"); entity.glno = row.IsNull("glno") ? string.Empty : row.Field <string>("glno"); entity.glsaRowid = row.Field <byte[]>("glsa-rowid").ToStringEncoded(); entity.gltitle = row.IsNull("gltitle") ? string.Empty : row.Field <string>("gltitle"); entity.accttype = row.IsNull("accttype") ? string.Empty : row.Field <string>("accttype"); entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield"); return(entity); }