/// <summary> /// Update a database row from a class /// </summary> public static void UpdateRowFromOeesdetaillinesingle(ref DataRow row, Oeesdetaillinesingle entity) { row.SetField("lineno", entity.lineno); row.SetField("orderno", entity.orderno); row.SetField("ordersuf", entity.ordersuf); row.SetField("sort", entity.sort); row.SetField("oeehrecid", entity.oeehrecid); row.SetField("custno", entity.custno); row.SetField("shipto", entity.shipto); row.SetField("transtype", entity.transtype); row.SetField("wtbilledorder", entity.wtbilledorder); row.SetField("lastlineno", entity.lastlineno); row.SetField("seecostfl", entity.seecostfl); row.SetField("icsnpofl", entity.icsnpofl); row.SetField("iclotrcptty", entity.iclotrcptty); row.SetField("modibfl", entity.modibfl); row.SetField("stagecd", entity.stagecd); row.SetField("whse", entity.whse); row.SetField("userfield", entity.userfield); }
public static Oeesdetaillinesingle BuildOeesdetaillinesingleFromRow(DataRow row) { Oeesdetaillinesingle entity = new Oeesdetaillinesingle(); entity.lineno = row.IsNull("lineno") ? 0 : row.Field <int>("lineno"); entity.orderno = row.IsNull("orderno") ? 0 : row.Field <int>("orderno"); entity.ordersuf = row.IsNull("ordersuf") ? 0 : row.Field <int>("ordersuf"); entity.sort = row.IsNull("sort") ? string.Empty : row.Field <string>("sort"); entity.oeehrecid = row.IsNull("oeehrecid") ? 0 : row.Field <long>("oeehrecid"); entity.custno = row.IsNull("custno") ? decimal.Zero : row.Field <decimal>("custno"); entity.shipto = row.IsNull("shipto") ? string.Empty : row.Field <string>("shipto"); entity.transtype = row.IsNull("transtype") ? string.Empty : row.Field <string>("transtype"); entity.wtbilledorder = row.Field <bool>("wtbilledorder"); entity.lastlineno = row.IsNull("lastlineno") ? 0 : row.Field <int>("lastlineno"); entity.seecostfl = row.Field <bool>("seecostfl"); entity.icsnpofl = row.Field <bool>("icsnpofl"); entity.iclotrcptty = row.IsNull("iclotrcptty") ? string.Empty : row.Field <string>("iclotrcptty"); entity.modibfl = row.Field <bool>("modibfl"); entity.stagecd = row.IsNull("stagecd") ? 0 : row.Field <int>("stagecd"); entity.whse = row.IsNull("whse") ? string.Empty : row.Field <string>("whse"); entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield"); return(entity); }