/// <summary> /// Update a database row from a class /// </summary> public static void UpdateRowFromPorrarreptadjretrievesng(ref DataRow row, Porrarreptadjretrievesng entity) { row.SetField("origrevdays", entity.origrevdays); row.SetField("origtotqtyord", entity.origtotqtyord); row.SetField("origtotlineamt", entity.origtotlineamt); row.SetField("origtotweight", entity.origtotweight); row.SetField("origtotcubes", entity.origtotcubes); row.SetField("pctstock", entity.pctstock); row.SetField("pctnonstock", entity.pctnonstock); row.SetField("pctspecials", entity.pctspecials); row.SetField("targetamt", entity.targetamt); row.SetField("shortamt", entity.shortamt); row.SetField("usagerate", entity.usagerate); row.SetField("shorttext", entity.shorttext); }
public static Porrarreptadjretrievesng BuildPorrarreptadjretrievesngFromRow(DataRow row) { Porrarreptadjretrievesng entity = new Porrarreptadjretrievesng(); entity.origrevdays = row.IsNull("origrevdays") ? decimal.Zero : row.Field <decimal>("origrevdays"); entity.origtotqtyord = row.IsNull("origtotqtyord") ? decimal.Zero : row.Field <decimal>("origtotqtyord"); entity.origtotlineamt = row.IsNull("origtotlineamt") ? decimal.Zero : row.Field <decimal>("origtotlineamt"); entity.origtotweight = row.IsNull("origtotweight") ? decimal.Zero : row.Field <decimal>("origtotweight"); entity.origtotcubes = row.IsNull("origtotcubes") ? decimal.Zero : row.Field <decimal>("origtotcubes"); entity.pctstock = row.IsNull("pctstock") ? decimal.Zero : row.Field <decimal>("pctstock"); entity.pctnonstock = row.IsNull("pctnonstock") ? decimal.Zero : row.Field <decimal>("pctnonstock"); entity.pctspecials = row.IsNull("pctspecials") ? decimal.Zero : row.Field <decimal>("pctspecials"); entity.targetamt = row.IsNull("targetamt") ? decimal.Zero : row.Field <decimal>("targetamt"); entity.shortamt = row.IsNull("shortamt") ? decimal.Zero : row.Field <decimal>("shortamt"); entity.usagerate = row.IsNull("usagerate") ? decimal.Zero : row.Field <decimal>("usagerate"); entity.shorttext = row.IsNull("shorttext") ? string.Empty : row.Field <string>("shorttext"); return(entity); }