/// <summary> /// Update a database row from a class /// </summary> public static void UpdateRowFromApeiinvdetpohdrlist(ref DataRow row, Apeiinvdetpohdrlist entity) { row.SetField("pono", entity.pono); row.SetField("posuf", entity.posuf); row.SetField("transtype", entity.transtype); row.SetField("notesfl", entity.notesfl); row.SetField("stagecd", entity.stagecd); row.SetField("stagecdword", entity.stagecdword); row.SetField("vendno", entity.vendno); row.SetField("shipfmno", entity.shipfmno); row.SetField("whse", entity.whse); row.SetField("receiverno", entity.receiverno); row.SetField("totlineamt", entity.totlineamt); row.SetField("discountamt", entity.discountamt); row.SetField("poaddonfl", entity.poaddonfl); row.SetField("closewhencostedfl", entity.closewhencostedfl); row.SetField("divnodesc", entity.divnodesc); row.SetField("apeid-rowid", entity.apeidRowid.ToByteArray()); row.SetField("userfield", entity.userfield); }
public static Apeiinvdetpohdrlist BuildApeiinvdetpohdrlistFromRow(DataRow row) { Apeiinvdetpohdrlist entity = new Apeiinvdetpohdrlist(); entity.pono = row.IsNull("pono") ? 0 : row.Field <int>("pono"); entity.posuf = row.IsNull("posuf") ? 0 : row.Field <int>("posuf"); entity.transtype = row.IsNull("transtype") ? string.Empty : row.Field <string>("transtype"); entity.notesfl = row.IsNull("notesfl") ? string.Empty : row.Field <string>("notesfl"); entity.stagecd = row.IsNull("stagecd") ? 0 : row.Field <int>("stagecd"); entity.stagecdword = row.IsNull("stagecdword") ? string.Empty : row.Field <string>("stagecdword"); entity.vendno = row.IsNull("vendno") ? decimal.Zero : row.Field <decimal>("vendno"); entity.shipfmno = row.IsNull("shipfmno") ? 0 : row.Field <int>("shipfmno"); entity.whse = row.IsNull("whse") ? string.Empty : row.Field <string>("whse"); entity.receiverno = row.IsNull("receiverno") ? string.Empty : row.Field <string>("receiverno"); entity.totlineamt = row.IsNull("totlineamt") ? decimal.Zero : row.Field <decimal>("totlineamt"); entity.discountamt = row.IsNull("discountamt") ? decimal.Zero : row.Field <decimal>("discountamt"); entity.poaddonfl = row.Field <bool>("poaddonfl"); entity.closewhencostedfl = row.Field <bool>("closewhencostedfl"); entity.divnodesc = row.IsNull("divnodesc") ? string.Empty : row.Field <string>("divnodesc"); entity.apeidRowid = row.Field <byte[]>("apeid-rowid").ToStringEncoded(); entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield"); return(entity); }