/// <summary> /// Update a database row from a class /// </summary> public static void UpdateRowFromGlifdetailbannerresults(ref DataRow row, Glifdetailbannerresults entity) { row.SetField("cdesign", entity.cdesign); row.SetField("creportnm", entity.creportnm); row.SetField("cprtline", entity.cprtline); row.SetField("icolumnno", entity.icolumnno); row.SetField("lcolumn", entity.lcolumn); row.SetField("icurryr", entity.icurryr); row.SetField("iperiod", entity.iperiod); row.SetField("icyear", entity.icyear); row.SetField("iseqno", entity.iseqno); row.SetField("iperfisc", entity.iperfisc); row.SetField("cdesignname", entity.cdesignname); row.SetField("userfield", entity.userfield); }
public static Glifdetailbannerresults BuildGlifdetailbannerresultsFromRow(DataRow row) { Glifdetailbannerresults entity = new Glifdetailbannerresults(); entity.cdesign = row.IsNull("cdesign") ? string.Empty : row.Field <string>("cdesign"); entity.creportnm = row.IsNull("creportnm") ? string.Empty : row.Field <string>("creportnm"); entity.cprtline = row.IsNull("cprtline") ? string.Empty : row.Field <string>("cprtline"); entity.icolumnno = row.IsNull("icolumnno") ? 0 : row.Field <int>("icolumnno"); entity.lcolumn = row.Field <bool>("lcolumn"); entity.icurryr = row.IsNull("icurryr") ? 0 : row.Field <int>("icurryr"); entity.iperiod = row.IsNull("iperiod") ? 0 : row.Field <int>("iperiod"); entity.icyear = row.IsNull("icyear") ? 0 : row.Field <int>("icyear"); entity.iseqno = row.IsNull("iseqno") ? 0 : row.Field <int>("iseqno"); entity.iperfisc = row.IsNull("iperfisc") ? 0 : row.Field <int>("iperfisc"); entity.cdesignname = row.IsNull("cdesignname") ? string.Empty : row.Field <string>("cdesignname"); entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield"); return(entity); }