/// <summary> /// Update a database row from a class /// </summary> public static void UpdateRowFromWmbinassigncriteria(ref DataRow row, Wmbinassigncriteria entity) { row.SetField("wmadjtype", entity.wmadjtype); row.SetField("ourproc", entity.ourproc); row.SetField("currproc", entity.currproc); row.SetField("prod", entity.prod); row.SetField("tobinloc", entity.tobinloc); row.SetField("pickinit", entity.pickinit); row.SetField("vamodule", entity.vamodule); row.SetField("returnfl", entity.returnfl); row.SetField("jrnlno", entity.jrnlno); row.SetField("ordertype", entity.ordertype); row.SetField("orderno", entity.orderno); row.SetField("ordersuf", entity.ordersuf); row.SetField("seqno", entity.seqno); row.SetField("lineno", entity.lineno); row.SetField("kitfl", entity.kitfl); row.SetField("skipnonkitlogic", entity.skipnonkitlogic); row.SetField("whse", entity.whse); row.SetField("altwhse", entity.altwhse); row.SetField("stkqtyship", entity.stkqtyship); row.SetField("unit", entity.unit); row.SetField("stkqtyrcv", entity.stkqtyrcv); row.SetField("wmqtyrcv", entity.wmqtyrcv); row.SetField("potype", entity.potype); row.SetField("userfield", entity.userfield); }
public static Wmbinassigncriteria BuildWmbinassigncriteriaFromRow(DataRow row) { Wmbinassigncriteria entity = new Wmbinassigncriteria(); entity.wmadjtype = row.IsNull("wmadjtype") ? string.Empty : row.Field <string>("wmadjtype"); entity.ourproc = row.IsNull("ourproc") ? string.Empty : row.Field <string>("ourproc"); entity.currproc = row.IsNull("currproc") ? string.Empty : row.Field <string>("currproc"); entity.prod = row.IsNull("prod") ? string.Empty : row.Field <string>("prod"); entity.tobinloc = row.IsNull("tobinloc") ? string.Empty : row.Field <string>("tobinloc"); entity.pickinit = row.IsNull("pickinit") ? string.Empty : row.Field <string>("pickinit"); entity.vamodule = row.IsNull("vamodule") ? string.Empty : row.Field <string>("vamodule"); entity.returnfl = row.Field <bool>("returnfl"); entity.jrnlno = row.IsNull("jrnlno") ? 0 : row.Field <int>("jrnlno"); entity.ordertype = row.IsNull("ordertype") ? string.Empty : row.Field <string>("ordertype"); entity.orderno = row.IsNull("orderno") ? 0 : row.Field <int>("orderno"); entity.ordersuf = row.IsNull("ordersuf") ? 0 : row.Field <int>("ordersuf"); entity.seqno = row.IsNull("seqno") ? 0 : row.Field <int>("seqno"); entity.lineno = row.IsNull("lineno") ? 0 : row.Field <int>("lineno"); entity.kitfl = row.Field <bool>("kitfl"); entity.skipnonkitlogic = row.Field <bool>("skipnonkitlogic"); entity.whse = row.IsNull("whse") ? string.Empty : row.Field <string>("whse"); entity.altwhse = row.IsNull("altwhse") ? string.Empty : row.Field <string>("altwhse"); entity.stkqtyship = row.IsNull("stkqtyship") ? decimal.Zero : row.Field <decimal>("stkqtyship"); entity.unit = row.IsNull("unit") ? string.Empty : row.Field <string>("unit"); entity.stkqtyrcv = row.IsNull("stkqtyrcv") ? decimal.Zero : row.Field <decimal>("stkqtyrcv"); entity.wmqtyrcv = row.IsNull("wmqtyrcv") ? decimal.Zero : row.Field <decimal>("wmqtyrcv"); entity.potype = row.IsNull("potype") ? string.Empty : row.Field <string>("potype"); entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield"); return(entity); }