/// <summary> /// Update a database row from a class /// </summary> public static void UpdateRowFromGlsfsetupp(ref DataRow row, Glsfsetupp entity) { row.SetField("pageLength", entity.pageLength); row.SetField("pageCenter", entity.pageCenter); row.SetField("topMargin", entity.topMargin); row.SetField("bottomMargin", entity.bottomMargin); row.SetField("headerLines", entity.headerLines); row.SetField("footerLines", entity.footerLines); row.SetField("decimalChar", entity.decimalChar); row.SetField("separator", entity.separator); row.SetField("negativeType", entity.negativeType); row.SetField("comment", entity.comment); row.SetField("userfield", entity.userfield); }
public static Glsfsetupp BuildGlsfsetuppFromRow(DataRow row) { Glsfsetupp entity = new Glsfsetupp(); entity.pageLength = row.IsNull("pageLength") ? 0 : row.Field <int>("pageLength"); entity.pageCenter = row.IsNull("pageCenter") ? 0 : row.Field <int>("pageCenter"); entity.topMargin = row.IsNull("topMargin") ? 0 : row.Field <int>("topMargin"); entity.bottomMargin = row.IsNull("bottomMargin") ? 0 : row.Field <int>("bottomMargin"); entity.headerLines = row.IsNull("headerLines") ? 0 : row.Field <int>("headerLines"); entity.footerLines = row.IsNull("footerLines") ? 0 : row.Field <int>("footerLines"); entity.decimalChar = row.IsNull("decimalChar") ? string.Empty : row.Field <string>("decimalChar"); entity.separator = row.IsNull("separator") ? string.Empty : row.Field <string>("separator"); entity.negativeType = row.IsNull("negativeType") ? string.Empty : row.Field <string>("negativeType"); entity.comment = row.IsNull("comment") ? string.Empty : row.Field <string>("comment"); entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield"); return(entity); }