/// <summary> /// Update a database row from a class /// </summary> public static void UpdateRowFromOelinelinetie(ref DataRow row, Oelinelinetie entity) { row.SetField("ordertype", entity.ordertype); row.SetField("ordertypeenabled", entity.ordertypeenabled); row.SetField("seqno", entity.seqno); row.SetField("oeelkrowid", entity.oeelkrowid.ToByteArray()); row.SetField("vendno", entity.vendno); row.SetField("vendnoenabled", entity.vendnoenabled); row.SetField("shipfmno", entity.shipfmno); row.SetField("shipfmnoenabled", entity.shipfmnoenabled); row.SetField("poduedate", entity.poduedate); row.SetField("poduedateenabled", entity.poduedateenabled); row.SetField("poshipvia", entity.poshipvia); row.SetField("poshipviaenabled", entity.poshipviaenabled); row.SetField("pofrttermscd", entity.pofrttermscd); row.SetField("pofrttermsenabled", entity.pofrttermsenabled); row.SetField("potransferloc", entity.potransferloc); row.SetField("potransferlocenabled", entity.potransferlocenabled); row.SetField("pofrtbillacct", entity.pofrtbillacct); row.SetField("pofrtbacctenabled", entity.pofrtbacctenabled); row.SetField("fob", entity.fob); row.SetField("fobenabled", entity.fobenabled); row.SetField("phoneno", entity.phoneno); row.SetField("faxphoneno", entity.faxphoneno); row.SetField("expediter", entity.expediter); row.SetField("confirm", entity.confirm); row.SetField("confirmenabled", entity.confirmenabled); row.SetField("orderdate", entity.orderdate); row.SetField("orderdatehidden", entity.orderdatehidden); row.SetField("wtwhse", entity.wtwhse); row.SetField("wtwhseenabled", entity.wtwhseenabled); row.SetField("wtduedate", entity.wtduedate); row.SetField("wtduedateenabled", entity.wtduedateenabled); row.SetField("wtshipvia", entity.wtshipvia); row.SetField("wtshipviaenabled", entity.wtshipviaenabled); row.SetField("wtcono", entity.wtcono); row.SetField("vawhse", entity.vawhse); row.SetField("vawhseenabled", entity.vawhseenabled); row.SetField("vano", entity.vano); row.SetField("vanoenabled", entity.vanoenabled); row.SetField("vasuf", entity.vasuf); row.SetField("vasufenabled", entity.vasufenabled); row.SetField("verno", entity.verno); row.SetField("vernoenabled", entity.vernoenabled); row.SetField("orderaltno", entity.orderaltno); row.SetField("orderaltnoenabled", entity.orderaltnoenabled); row.SetField("orderaltnohidden", entity.orderaltnohidden); row.SetField("backordertype", entity.backordertype); row.SetField("backordertypeenabled", entity.backordertypeenabled); row.SetField("copycommentfl", entity.copycommentfl); row.SetField("copycommentflenabled", entity.copycommentflenabled); row.SetField("powtnew", entity.powtnew); row.SetField("powtintfl", entity.powtintfl); row.SetField("miscvendorfl", entity.miscvendorfl); row.SetField("manualname", entity.manualname); row.SetField("manualaddr1", entity.manualaddr1); row.SetField("manualaddr2", entity.manualaddr2); row.SetField("manualaddr3", entity.manualaddr3); row.SetField("manualcity", entity.manualcity); row.SetField("manualstate", entity.manualstate); row.SetField("manualzipcd", entity.manualzipcd); row.SetField("breaktype", entity.breaktype); row.SetField("restrictovrfl", entity.restrictovrfl); row.SetField("restricterrmess", entity.restricterrmess); row.SetField("userfield", entity.userfield); }
public static Oelinelinetie BuildOelinelinetieFromRow(DataRow row) { Oelinelinetie entity = new Oelinelinetie(); entity.ordertype = row.IsNull("ordertype") ? string.Empty : row.Field <string>("ordertype"); entity.ordertypeenabled = row.Field <bool>("ordertypeenabled"); entity.seqno = row.IsNull("seqno") ? 0 : row.Field <int>("seqno"); entity.oeelkrowid = row.Field <byte[]>("oeelkrowid").ToStringEncoded(); entity.vendno = row.IsNull("vendno") ? decimal.Zero : row.Field <decimal>("vendno"); entity.vendnoenabled = row.Field <bool>("vendnoenabled"); entity.shipfmno = row.IsNull("shipfmno") ? 0 : row.Field <int>("shipfmno"); entity.shipfmnoenabled = row.Field <bool>("shipfmnoenabled"); entity.poduedate = row.Field <DateTime?>("poduedate"); entity.poduedateenabled = row.Field <bool>("poduedateenabled"); entity.poshipvia = row.IsNull("poshipvia") ? string.Empty : row.Field <string>("poshipvia"); entity.poshipviaenabled = row.Field <bool>("poshipviaenabled"); entity.pofrttermscd = row.IsNull("pofrttermscd") ? string.Empty : row.Field <string>("pofrttermscd"); entity.pofrttermsenabled = row.Field <bool>("pofrttermsenabled"); entity.potransferloc = row.IsNull("potransferloc") ? string.Empty : row.Field <string>("potransferloc"); entity.potransferlocenabled = row.Field <bool>("potransferlocenabled"); entity.pofrtbillacct = row.IsNull("pofrtbillacct") ? string.Empty : row.Field <string>("pofrtbillacct"); entity.pofrtbacctenabled = row.Field <bool>("pofrtbacctenabled"); entity.fob = row.Field <bool>("fob"); entity.fobenabled = row.Field <bool>("fobenabled"); entity.phoneno = row.IsNull("phoneno") ? string.Empty : row.Field <string>("phoneno"); entity.faxphoneno = row.IsNull("faxphoneno") ? string.Empty : row.Field <string>("faxphoneno"); entity.expediter = row.IsNull("expediter") ? string.Empty : row.Field <string>("expediter"); entity.confirm = row.Field <bool>("confirm"); entity.confirmenabled = row.Field <bool>("confirmenabled"); entity.orderdate = row.Field <DateTime?>("orderdate"); entity.orderdatehidden = row.Field <bool>("orderdatehidden"); entity.wtwhse = row.IsNull("wtwhse") ? string.Empty : row.Field <string>("wtwhse"); entity.wtwhseenabled = row.Field <bool>("wtwhseenabled"); entity.wtduedate = row.Field <DateTime?>("wtduedate"); entity.wtduedateenabled = row.Field <bool>("wtduedateenabled"); entity.wtshipvia = row.IsNull("wtshipvia") ? string.Empty : row.Field <string>("wtshipvia"); entity.wtshipviaenabled = row.Field <bool>("wtshipviaenabled"); entity.wtcono = row.IsNull("wtcono") ? 0 : row.Field <int>("wtcono"); entity.vawhse = row.IsNull("vawhse") ? string.Empty : row.Field <string>("vawhse"); entity.vawhseenabled = row.Field <bool>("vawhseenabled"); entity.vano = row.IsNull("vano") ? 0 : row.Field <int>("vano"); entity.vanoenabled = row.Field <bool>("vanoenabled"); entity.vasuf = row.IsNull("vasuf") ? 0 : row.Field <int>("vasuf"); entity.vasufenabled = row.Field <bool>("vasufenabled"); entity.verno = row.IsNull("verno") ? 0 : row.Field <int>("verno"); entity.vernoenabled = row.Field <bool>("vernoenabled"); entity.orderaltno = row.IsNull("orderaltno") ? 0 : row.Field <int>("orderaltno"); entity.orderaltnoenabled = row.Field <bool>("orderaltnoenabled"); entity.orderaltnohidden = row.Field <bool>("orderaltnohidden"); entity.backordertype = row.IsNull("backordertype") ? string.Empty : row.Field <string>("backordertype"); entity.backordertypeenabled = row.Field <bool>("backordertypeenabled"); entity.copycommentfl = row.Field <bool>("copycommentfl"); entity.copycommentflenabled = row.Field <bool>("copycommentflenabled"); entity.powtnew = row.Field <bool>("powtnew"); entity.powtintfl = row.Field <bool>("powtintfl"); entity.miscvendorfl = row.Field <bool>("miscvendorfl"); entity.manualname = row.IsNull("manualname") ? string.Empty : row.Field <string>("manualname"); entity.manualaddr1 = row.IsNull("manualaddr1") ? string.Empty : row.Field <string>("manualaddr1"); entity.manualaddr2 = row.IsNull("manualaddr2") ? string.Empty : row.Field <string>("manualaddr2"); entity.manualaddr3 = row.IsNull("manualaddr3") ? string.Empty : row.Field <string>("manualaddr3"); entity.manualcity = row.IsNull("manualcity") ? string.Empty : row.Field <string>("manualcity"); entity.manualstate = row.IsNull("manualstate") ? string.Empty : row.Field <string>("manualstate"); entity.manualzipcd = row.IsNull("manualzipcd") ? string.Empty : row.Field <string>("manualzipcd"); entity.breaktype = row.IsNull("breaktype") ? string.Empty : row.Field <string>("breaktype"); entity.restrictovrfl = row.Field <bool>("restrictovrfl"); entity.restricterrmess = row.IsNull("restricterrmess") ? string.Empty : row.Field <string>("restricterrmess"); entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield"); return(entity); }