/// <summary> /// Update a database row from a class /// </summary> public static void UpdateRowFromWteiupdate(ref DataRow row, Wteiupdate entity) { row.SetField("jrnlno", entity.jrnlno); row.SetField("printorder", entity.printorder); row.SetField("allowpickfl", entity.allowpickfl); row.SetField("picktype", entity.picktype); row.SetField("pickprinter", entity.pickprinter); row.SetField("allowreceiptsfl", entity.allowreceiptsfl); row.SetField("receiptstype", entity.receiptstype); row.SetField("receiptsprinter", entity.receiptsprinter); row.SetField("whse", entity.whse); row.SetField("userfield", entity.userfield); }
public static Wteiupdate BuildWteiupdateFromRow(DataRow row) { Wteiupdate entity = new Wteiupdate(); entity.jrnlno = row.IsNull("jrnlno") ? 0 : row.Field <int>("jrnlno"); entity.printorder = row.IsNull("printorder") ? string.Empty : row.Field <string>("printorder"); entity.allowpickfl = row.Field <bool>("allowpickfl"); entity.picktype = row.IsNull("picktype") ? string.Empty : row.Field <string>("picktype"); entity.pickprinter = row.IsNull("pickprinter") ? string.Empty : row.Field <string>("pickprinter"); entity.allowreceiptsfl = row.Field <bool>("allowreceiptsfl"); entity.receiptstype = row.IsNull("receiptstype") ? string.Empty : row.Field <string>("receiptstype"); entity.receiptsprinter = row.IsNull("receiptsprinter") ? string.Empty : row.Field <string>("receiptsprinter"); entity.whse = row.IsNull("whse") ? string.Empty : row.Field <string>("whse"); entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield"); return(entity); }