/// <summary> /// Update a database row from a class /// </summary> public static void UpdateRowFromOeordercopyorderlist(ref DataRow row, Oeordercopyorderlist entity) { row.SetField("orderno", entity.orderno); row.SetField("ordersuf", entity.ordersuf); row.SetField("custno", entity.custno); row.SetField("beglineno", entity.beglineno); row.SetField("endlineno", entity.endlineno); row.SetField("disporderno", entity.disporderno); row.SetField("dispstagecd", entity.dispstagecd); row.SetField("promisedt", entity.promisedt); row.SetField("transtype", entity.transtype); row.SetField("whse", entity.whse); row.SetField("origincd", entity.origincd); row.SetField("userfield", entity.userfield); }
public static Oeordercopyorderlist BuildOeordercopyorderlistFromRow(DataRow row) { Oeordercopyorderlist entity = new Oeordercopyorderlist(); entity.orderno = row.IsNull("orderno") ? 0 : row.Field <int>("orderno"); entity.ordersuf = row.IsNull("ordersuf") ? 0 : row.Field <int>("ordersuf"); entity.custno = row.IsNull("custno") ? decimal.Zero : row.Field <decimal>("custno"); entity.beglineno = row.IsNull("beglineno") ? 0 : row.Field <int>("beglineno"); entity.endlineno = row.IsNull("endlineno") ? 0 : row.Field <int>("endlineno"); entity.disporderno = row.IsNull("disporderno") ? string.Empty : row.Field <string>("disporderno"); entity.dispstagecd = row.IsNull("dispstagecd") ? string.Empty : row.Field <string>("dispstagecd"); entity.promisedt = row.Field <DateTime?>("promisedt"); entity.transtype = row.IsNull("transtype") ? string.Empty : row.Field <string>("transtype"); entity.whse = row.IsNull("whse") ? string.Empty : row.Field <string>("whse"); entity.origincd = row.IsNull("origincd") ? string.Empty : row.Field <string>("origincd"); entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield"); return(entity); }