/// <summary> /// Update a database row from a class /// </summary> public static void UpdateRowFromIcipfetchroairesults(ref DataRow row, Icipfetchroairesults entity) { row.SetField("netavail", entity.netavail); row.SetField("unit", entity.unit); row.SetField("onorder", entity.onorder); row.SetField("netmonth", entity.netmonth); row.SetField("ordqty", entity.ordqty); row.SetField("purunit", entity.purunit); row.SetField("ordmonth", entity.ordmonth); row.SetField("linept", entity.linept); row.SetField("cmessage", entity.cmessage); row.SetField("usagerate", entity.usagerate); row.SetField("userfield", entity.userfield); }
public static Icipfetchroairesults BuildIcipfetchroairesultsFromRow(DataRow row) { Icipfetchroairesults entity = new Icipfetchroairesults(); entity.netavail = row.IsNull("netavail") ? decimal.Zero : row.Field <decimal>("netavail"); entity.unit = row.IsNull("unit") ? string.Empty : row.Field <string>("unit"); entity.onorder = row.IsNull("onorder") ? decimal.Zero : row.Field <decimal>("onorder"); entity.netmonth = row.IsNull("netmonth") ? decimal.Zero : row.Field <decimal>("netmonth"); entity.ordqty = row.IsNull("ordqty") ? decimal.Zero : row.Field <decimal>("ordqty"); entity.purunit = row.IsNull("purunit") ? string.Empty : row.Field <string>("purunit"); entity.ordmonth = row.IsNull("ordmonth") ? decimal.Zero : row.Field <decimal>("ordmonth"); entity.linept = row.IsNull("linept") ? decimal.Zero : row.Field <decimal>("linept"); entity.cmessage = row.IsNull("cmessage") ? string.Empty : row.Field <string>("cmessage"); entity.usagerate = row.IsNull("usagerate") ? decimal.Zero : row.Field <decimal>("usagerate"); entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield"); return(entity); }