/// <summary> /// Update a database row from a class /// </summary> public static void UpdateRowFromLoadexcptusagettresults(ref DataRow row, Loadexcptusagettresults entity) { row.SetField("monthseq", entity.monthseq); row.SetField("monthwords", entity.monthwords); row.SetField("year", entity.year); row.SetField("normusage", entity.normusage); row.SetField("transusage", entity.transusage); row.SetField("overreasty", entity.overreasty); row.SetField("overrsdesc", entity.overrsdesc); row.SetField("nodaysso", entity.nodaysso); row.SetField("notimesso", entity.notimesso); row.SetField("avginvval", entity.avginvval); row.SetField("overusage", entity.overusage); row.SetField("transpct", entity.transpct); row.SetField("linehits", entity.linehits); row.SetField("linehitswt", entity.linehitswt); row.SetField("linehitslb", entity.linehitslb); row.SetField("linehitstot", entity.linehitstot); row.SetField("userfield", entity.userfield); }
public static Loadexcptusagettresults BuildLoadexcptusagettresultsFromRow(DataRow row) { Loadexcptusagettresults entity = new Loadexcptusagettresults(); entity.monthseq = row.IsNull("monthseq") ? 0 : row.Field <int>("monthseq"); entity.monthwords = row.IsNull("monthwords") ? string.Empty : row.Field <string>("monthwords"); entity.year = row.IsNull("year") ? 0 : row.Field <int>("year"); entity.normusage = row.IsNull("normusage") ? decimal.Zero : row.Field <decimal>("normusage"); entity.transusage = row.IsNull("transusage") ? decimal.Zero : row.Field <decimal>("transusage"); entity.overreasty = row.IsNull("overreasty") ? string.Empty : row.Field <string>("overreasty"); entity.overrsdesc = row.IsNull("overrsdesc") ? string.Empty : row.Field <string>("overrsdesc"); entity.nodaysso = row.IsNull("nodaysso") ? 0 : row.Field <int>("nodaysso"); entity.notimesso = row.IsNull("notimesso") ? 0 : row.Field <int>("notimesso"); entity.avginvval = row.IsNull("avginvval") ? decimal.Zero : row.Field <decimal>("avginvval"); entity.overusage = row.IsNull("overusage") ? decimal.Zero : row.Field <decimal>("overusage"); entity.transpct = row.IsNull("transpct") ? decimal.Zero : row.Field <decimal>("transpct"); entity.linehits = row.IsNull("linehits") ? 0 : row.Field <int>("linehits"); entity.linehitswt = row.IsNull("linehitswt") ? 0 : row.Field <int>("linehitswt"); entity.linehitslb = row.IsNull("linehitslb") ? 0 : row.Field <int>("linehitslb"); entity.linehitstot = row.IsNull("linehitstot") ? 0 : row.Field <int>("linehitstot"); entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield"); return(entity); }