/// <summary> /// Update a database row from a class /// </summary> public static void UpdateRowFromGlsdtransloadttsingle(ref DataRow row, Glsdtransloadttsingle entity) { row.SetField("groupnm", entity.groupnm); row.SetField("setno", entity.setno); row.SetField("glyr", entity.glyr); row.SetField("proofdr", entity.proofdr); row.SetField("proofcr", entity.proofcr); row.SetField("infomsg", entity.infomsg); row.SetField("userfield", entity.userfield); }
public static Glsdtransloadttsingle BuildGlsdtransloadttsingleFromRow(DataRow row) { Glsdtransloadttsingle entity = new Glsdtransloadttsingle(); entity.groupnm = row.IsNull("groupnm") ? string.Empty : row.Field <string>("groupnm"); entity.setno = row.IsNull("setno") ? 0 : row.Field <int>("setno"); entity.glyr = row.IsNull("glyr") ? 0 : row.Field <int>("glyr"); entity.proofdr = row.IsNull("proofdr") ? decimal.Zero : row.Field <decimal>("proofdr"); entity.proofcr = row.IsNull("proofcr") ? decimal.Zero : row.Field <decimal>("proofcr"); entity.infomsg = row.IsNull("infomsg") ? string.Empty : row.Field <string>("infomsg"); entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield"); return(entity); }