/// <summary> /// Update a database row from a class /// </summary> public static void UpdateRowFromIcamrcalcmethodsingle(ref DataRow row, Icamrcalcmethodsingle entity) { row.SetField("cono", entity.cono); row.SetField("reportno", entity.reportno); row.SetField("whse", entity.whse); row.SetField("prod", entity.prod); row.SetField("backwrd", entity.backwrd); row.SetField("trend", entity.trend); row.SetField("forwrd", entity.forwrd); row.SetField("monthroll", entity.monthroll); row.SetField("exponsmooth", entity.exponsmooth); row.SetField("userfield", entity.userfield); }
public static Icamrcalcmethodsingle BuildIcamrcalcmethodsingleFromRow(DataRow row) { Icamrcalcmethodsingle entity = new Icamrcalcmethodsingle(); entity.cono = row.IsNull("cono") ? 0 : row.Field <int>("cono"); entity.reportno = row.IsNull("reportno") ? 0 : row.Field <int>("reportno"); entity.whse = row.IsNull("whse") ? string.Empty : row.Field <string>("whse"); entity.prod = row.IsNull("prod") ? string.Empty : row.Field <string>("prod"); entity.backwrd = row.IsNull("backwrd") ? string.Empty : row.Field <string>("backwrd"); entity.trend = row.IsNull("trend") ? string.Empty : row.Field <string>("trend"); entity.forwrd = row.IsNull("forwrd") ? string.Empty : row.Field <string>("forwrd"); entity.monthroll = row.IsNull("monthroll") ? string.Empty : row.Field <string>("monthroll"); entity.exponsmooth = row.IsNull("exponsmooth") ? string.Empty : row.Field <string>("exponsmooth"); entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield"); return(entity); }