/// <summary> /// Update a database row from a class /// </summary> public static void UpdateRowFromPoeidetailheader(ref DataRow row, Poeidetailheader entity) { row.SetField("pono", entity.pono); row.SetField("posuf", entity.posuf); row.SetField("correctiontext", entity.correctiontext); row.SetField("transtype", entity.transtype); row.SetField("vendno", entity.vendno); row.SetField("shipfmno", entity.shipfmno); row.SetField("prodline", entity.prodline); row.SetField("whse", entity.whse); row.SetField("billtowhse", entity.billtowhse); row.SetField("buyer", entity.buyer); row.SetField("stagecdx", entity.stagecdx); row.SetField("botext", entity.botext); row.SetField("vendname", entity.vendname); row.SetField("vendaddr1", entity.vendaddr1); row.SetField("vendaddr2", entity.vendaddr2); row.SetField("vendaddr3", entity.vendaddr3); row.SetField("vendcity", entity.vendcity); row.SetField("vendstate", entity.vendstate); row.SetField("vendzip", entity.vendzip); row.SetField("vendcountry", entity.vendcountry); row.SetField("shipfrommname", entity.shipfrommname); row.SetField("shipfromaddr1", entity.shipfromaddr1); row.SetField("shipfromaddr2", entity.shipfromaddr2); row.SetField("shipfromaddr3", entity.shipfromaddr3); row.SetField("shipfromcity", entity.shipfromcity); row.SetField("shipfromstate", entity.shipfromstate); row.SetField("shipfromzip", entity.shipfromzip); row.SetField("shipfromcountry", entity.shipfromcountry); row.SetField("orderdt", entity.orderdt); row.SetField("duedt", entity.duedt); row.SetField("actionty", entity.actionty); row.SetField("ignoreltfl", entity.ignoreltfl); row.SetField("rushfl", entity.rushfl); row.SetField("receiptdt", entity.receiptdt); row.SetField("subfl", entity.subfl); row.SetField("fobfl", entity.fobfl); row.SetField("orderdisp", entity.orderdisp); row.SetField("bofl", entity.bofl); row.SetField("confirmfl", entity.confirmfl); row.SetField("shipviaty", entity.shipviaty); row.SetField("shipviadesc", entity.shipviadesc); row.SetField("jrnlno", entity.jrnlno); row.SetField("termstype", entity.termstype); row.SetField("termsdesc", entity.termsdesc); row.SetField("currencyty", entity.currencyty); row.SetField("currencydesc", entity.currencydesc); row.SetField("currsymbol", entity.currsymbol); row.SetField("qtytarget", entity.qtytarget); row.SetField("dollartarget", entity.dollartarget); row.SetField("weighttarget", entity.weighttarget); row.SetField("cubestarget", entity.cubestarget); row.SetField("target", entity.target); row.SetField("orderaltno", entity.orderaltno); row.SetField("orderaltsuf", entity.orderaltsuf); row.SetField("createdby", entity.createdby); row.SetField("resaleno", entity.resaleno); row.SetField("resalefl", entity.resalefl); row.SetField("refer", entity.refer); row.SetField("shipinstr", entity.shipinstr); row.SetField("netbillty", entity.netbillty); row.SetField("netbilltyvis", entity.netbilltyvis); row.SetField("userfield", entity.userfield); }
public static Poeidetailheader BuildPoeidetailheaderFromRow(DataRow row) { Poeidetailheader entity = new Poeidetailheader(); entity.pono = row.IsNull("pono") ? 0 : row.Field <int>("pono"); entity.posuf = row.IsNull("posuf") ? 0 : row.Field <int>("posuf"); entity.correctiontext = row.IsNull("correctiontext") ? string.Empty : row.Field <string>("correctiontext"); entity.transtype = row.IsNull("transtype") ? string.Empty : row.Field <string>("transtype"); entity.vendno = row.IsNull("vendno") ? decimal.Zero : row.Field <decimal>("vendno"); entity.shipfmno = row.IsNull("shipfmno") ? 0 : row.Field <int>("shipfmno"); entity.prodline = row.IsNull("prodline") ? string.Empty : row.Field <string>("prodline"); entity.whse = row.IsNull("whse") ? string.Empty : row.Field <string>("whse"); entity.billtowhse = row.IsNull("billtowhse") ? string.Empty : row.Field <string>("billtowhse"); entity.buyer = row.IsNull("buyer") ? string.Empty : row.Field <string>("buyer"); entity.stagecdx = row.IsNull("stagecdx") ? string.Empty : row.Field <string>("stagecdx"); entity.botext = row.IsNull("botext") ? string.Empty : row.Field <string>("botext"); entity.vendname = row.IsNull("vendname") ? string.Empty : row.Field <string>("vendname"); entity.vendaddr1 = row.IsNull("vendaddr1") ? string.Empty : row.Field <string>("vendaddr1"); entity.vendaddr2 = row.IsNull("vendaddr2") ? string.Empty : row.Field <string>("vendaddr2"); entity.vendaddr3 = row.IsNull("vendaddr3") ? string.Empty : row.Field <string>("vendaddr3"); entity.vendcity = row.IsNull("vendcity") ? string.Empty : row.Field <string>("vendcity"); entity.vendstate = row.IsNull("vendstate") ? string.Empty : row.Field <string>("vendstate"); entity.vendzip = row.IsNull("vendzip") ? string.Empty : row.Field <string>("vendzip"); entity.vendcountry = row.IsNull("vendcountry") ? string.Empty : row.Field <string>("vendcountry"); entity.shipfrommname = row.IsNull("shipfrommname") ? string.Empty : row.Field <string>("shipfrommname"); entity.shipfromaddr1 = row.IsNull("shipfromaddr1") ? string.Empty : row.Field <string>("shipfromaddr1"); entity.shipfromaddr2 = row.IsNull("shipfromaddr2") ? string.Empty : row.Field <string>("shipfromaddr2"); entity.shipfromaddr3 = row.IsNull("shipfromaddr3") ? string.Empty : row.Field <string>("shipfromaddr3"); entity.shipfromcity = row.IsNull("shipfromcity") ? string.Empty : row.Field <string>("shipfromcity"); entity.shipfromstate = row.IsNull("shipfromstate") ? string.Empty : row.Field <string>("shipfromstate"); entity.shipfromzip = row.IsNull("shipfromzip") ? string.Empty : row.Field <string>("shipfromzip"); entity.shipfromcountry = row.IsNull("shipfromcountry") ? string.Empty : row.Field <string>("shipfromcountry"); entity.orderdt = row.Field <DateTime?>("orderdt"); entity.duedt = row.Field <DateTime?>("duedt"); entity.actionty = row.IsNull("actionty") ? string.Empty : row.Field <string>("actionty"); entity.ignoreltfl = row.Field <bool>("ignoreltfl"); entity.rushfl = row.Field <bool>("rushfl"); entity.receiptdt = row.Field <DateTime?>("receiptdt"); entity.subfl = row.Field <bool>("subfl"); entity.fobfl = row.Field <bool>("fobfl"); entity.orderdisp = row.IsNull("orderdisp") ? string.Empty : row.Field <string>("orderdisp"); entity.bofl = row.Field <bool>("bofl"); entity.confirmfl = row.Field <bool>("confirmfl"); entity.shipviaty = row.IsNull("shipviaty") ? string.Empty : row.Field <string>("shipviaty"); entity.shipviadesc = row.IsNull("shipviadesc") ? string.Empty : row.Field <string>("shipviadesc"); entity.jrnlno = row.IsNull("jrnlno") ? 0 : row.Field <int>("jrnlno"); entity.termstype = row.IsNull("termstype") ? string.Empty : row.Field <string>("termstype"); entity.termsdesc = row.IsNull("termsdesc") ? string.Empty : row.Field <string>("termsdesc"); entity.currencyty = row.IsNull("currencyty") ? string.Empty : row.Field <string>("currencyty"); entity.currencydesc = row.IsNull("currencydesc") ? string.Empty : row.Field <string>("currencydesc"); entity.currsymbol = row.IsNull("currsymbol") ? string.Empty : row.Field <string>("currsymbol"); entity.qtytarget = row.IsNull("qtytarget") ? string.Empty : row.Field <string>("qtytarget"); entity.dollartarget = row.IsNull("dollartarget") ? string.Empty : row.Field <string>("dollartarget"); entity.weighttarget = row.IsNull("weighttarget") ? string.Empty : row.Field <string>("weighttarget"); entity.cubestarget = row.IsNull("cubestarget") ? string.Empty : row.Field <string>("cubestarget"); entity.target = row.IsNull("target") ? decimal.Zero : row.Field <decimal>("target"); entity.orderaltno = row.IsNull("orderaltno") ? 0 : row.Field <int>("orderaltno"); entity.orderaltsuf = row.IsNull("orderaltsuf") ? 0 : row.Field <int>("orderaltsuf"); entity.createdby = row.IsNull("createdby") ? string.Empty : row.Field <string>("createdby"); entity.resaleno = row.IsNull("resaleno") ? string.Empty : row.Field <string>("resaleno"); entity.resalefl = row.Field <bool>("resalefl"); entity.refer = row.IsNull("refer") ? string.Empty : row.Field <string>("refer"); entity.shipinstr = row.IsNull("shipinstr") ? string.Empty : row.Field <string>("shipinstr"); entity.netbillty = row.IsNull("netbillty") ? string.Empty : row.Field <string>("netbillty"); entity.netbilltyvis = row.Field <bool>("netbilltyvis"); entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield"); return(entity); }