/// <summary> /// Build a minimal row from a class (key fields only) /// </summary> public static void BuildMinimalRow(ref DataRow row, ApspBase entity) { row.SetField("cono", entity.cono); row.SetField("vendno", entity.vendno); row.SetField("prodline", entity.prodline); row.SetField("yr", entity.yr); row.SetField("whse", entity.whse); row.SetField("apspRowID", entity.rowID.ToByteArray()); }
/// <summary> /// Update a database row from a class /// </summary> public static void UpdateRowFromApspBase(ref DataRow row, ApspBase entity) { row.SetField("cono", entity.cono); row.SetField("vendno", entity.vendno); row.SetField("prodline", entity.prodline); row.SetField("yr", entity.yr); row.SetField("noinvbill", entity.noinvbill); row.SetField("nolinebill", entity.nolinebill); row.SetField("qtysold1", entity.qtysold1); row.SetField("qtysold2", entity.qtysold2); row.SetField("qtysold3", entity.qtysold3); row.SetField("qtysold4", entity.qtysold4); row.SetField("qtysold5", entity.qtysold5); row.SetField("qtysold6", entity.qtysold6); row.SetField("qtysold7", entity.qtysold7); row.SetField("qtysold8", entity.qtysold8); row.SetField("qtysold9", entity.qtysold9); row.SetField("qtysold10", entity.qtysold10); row.SetField("qtysold11", entity.qtysold11); row.SetField("qtysold12", entity.qtysold12); row.SetField("purchamt1", entity.purchamt1); row.SetField("purchamt2", entity.purchamt2); row.SetField("purchamt3", entity.purchamt3); row.SetField("purchamt4", entity.purchamt4); row.SetField("purchamt5", entity.purchamt5); row.SetField("purchamt6", entity.purchamt6); row.SetField("purchamt7", entity.purchamt7); row.SetField("purchamt8", entity.purchamt8); row.SetField("purchamt9", entity.purchamt9); row.SetField("purchamt10", entity.purchamt10); row.SetField("purchamt11", entity.purchamt11); row.SetField("purchamt12", entity.purchamt12); row.SetField("salesamt1", entity.salesamt1); row.SetField("salesamt2", entity.salesamt2); row.SetField("salesamt3", entity.salesamt3); row.SetField("salesamt4", entity.salesamt4); row.SetField("salesamt5", entity.salesamt5); row.SetField("salesamt6", entity.salesamt6); row.SetField("salesamt7", entity.salesamt7); row.SetField("salesamt8", entity.salesamt8); row.SetField("salesamt9", entity.salesamt9); row.SetField("salesamt10", entity.salesamt10); row.SetField("salesamt11", entity.salesamt11); row.SetField("salesamt12", entity.salesamt12); row.SetField("cogamt1", entity.cogamt1); row.SetField("cogamt2", entity.cogamt2); row.SetField("cogamt3", entity.cogamt3); row.SetField("cogamt4", entity.cogamt4); row.SetField("cogamt5", entity.cogamt5); row.SetField("cogamt6", entity.cogamt6); row.SetField("cogamt7", entity.cogamt7); row.SetField("cogamt8", entity.cogamt8); row.SetField("cogamt9", entity.cogamt9); row.SetField("cogamt10", entity.cogamt10); row.SetField("cogamt11", entity.cogamt11); row.SetField("cogamt12", entity.cogamt12); row.SetField("transdt", entity.transdt); row.SetField("transtm", entity.transtm); row.SetField("operinit", entity.operinit); row.SetField("whse", entity.whse); row.SetField("user1", entity.user1); row.SetField("user2", entity.user2); row.SetField("user3", entity.user3); row.SetField("user4", entity.user4); row.SetField("user5", entity.user5); row.SetField("user6", entity.user6); row.SetField("user7", entity.user7); row.SetField("user8", entity.user8); row.SetField("user9", entity.user9); row.SetField("transproc", entity.transproc); row.SetField("transdttmz", entity.transdttmz); row.SetField("apspRowID", entity.rowID.ToByteArray()); }