/// <summary> /// Update a database row from a class /// </summary> public static void UpdateRowFromVasectionspec(ref DataRow row, Vasectionspec entity) { row.SetField("vano", entity.vano); row.SetField("vasuf", entity.vasuf); row.SetField("seqno", entity.seqno); row.SetField("sctntype", entity.sctntype); row.SetField("specdata", entity.specdata); row.SetField("specprtfl", entity.specprtfl); row.SetField("specprtty", entity.specprtty); row.SetField("userfield", entity.userfield); }
public static Vasectionspec BuildVasectionspecFromRow(DataRow row) { Vasectionspec entity = new Vasectionspec(); entity.vano = row.IsNull("vano") ? 0 : row.Field<int>("vano"); entity.vasuf = row.IsNull("vasuf") ? 0 : row.Field<int>("vasuf"); entity.seqno = row.IsNull("seqno") ? 0 : row.Field<int>("seqno"); entity.sctntype = row.IsNull("sctntype") ? string.Empty : row.Field<string>("sctntype"); entity.specdata = row.IsNull("specdata") ? string.Empty : row.Field<string>("specdata"); entity.specprtfl = row.Field<bool>("specprtfl"); entity.specprtty = row.IsNull("specprtty") ? string.Empty : row.Field<string>("specprtty"); entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field<string>("userfield"); return entity; }