/// <summary> /// Update a database row from a class /// </summary> public static void UpdateRowFromGlsdloadttcriteria(ref DataRow row, Glsdloadttcriteria entity) { row.SetField("recordlimit", entity.recordlimit); row.SetField("groupnm", entity.groupnm); row.SetField("transno", entity.transno); row.SetField("setno", entity.setno); row.SetField("reversety", entity.reversety); row.SetField("glno", entity.glno); row.SetField("glyr", entity.glyr); row.SetField("refer", entity.refer); row.SetField("maxamount", entity.maxamount); row.SetField("userfield", entity.userfield); }
public static Glsdloadttcriteria BuildGlsdloadttcriteriaFromRow(DataRow row) { Glsdloadttcriteria entity = new Glsdloadttcriteria(); entity.recordlimit = row.IsNull("recordlimit") ? 0 : row.Field <int>("recordlimit"); entity.groupnm = row.IsNull("groupnm") ? string.Empty : row.Field <string>("groupnm"); entity.transno = row.IsNull("transno") ? 0 : row.Field <int>("transno"); entity.setno = row.IsNull("setno") ? 0 : row.Field <int>("setno"); entity.reversety = row.IsNull("reversety") ? string.Empty : row.Field <string>("reversety"); entity.glno = row.IsNull("glno") ? string.Empty : row.Field <string>("glno"); entity.glyr = row.IsNull("glyr") ? 0 : row.Field <int>("glyr"); entity.refer = row.IsNull("refer") ? string.Empty : row.Field <string>("refer"); entity.maxamount = row.IsNull("maxamount") ? decimal.Zero : row.Field <decimal>("maxamount"); entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield"); return(entity); }