public static Poblanketreleasesingle BuildPoblanketreleasesingleFromRow(DataRow row) { Poblanketreleasesingle entity = new Poblanketreleasesingle(); entity.pono = row.IsNull("pono") ? 0 : row.Field <int>("pono"); entity.posuf = row.IsNull("posuf") ? 0 : row.Field <int>("posuf"); entity.ponotesfl = row.IsNull("ponotesfl") ? string.Empty : row.Field <string>("ponotesfl"); entity.vendno = row.IsNull("vendno") ? decimal.Zero : row.Field <decimal>("vendno"); entity.vendnotesfl = row.IsNull("vendnotesfl") ? string.Empty : row.Field <string>("vendnotesfl"); entity.vendname = row.IsNull("vendname") ? string.Empty : row.Field <string>("vendname"); entity.shipfmno = row.IsNull("shipfmno") ? 0 : row.Field <int>("shipfmno"); entity.releasetxt = row.IsNull("releasetxt") ? string.Empty : row.Field <string>("releasetxt"); entity.shiptowhse = row.IsNull("shiptowhse") ? string.Empty : row.Field <string>("shiptowhse"); entity.shiptonm = row.IsNull("shiptonm") ? string.Empty : row.Field <string>("shiptonm"); entity.shiptoaddr1 = row.IsNull("shiptoaddr1") ? string.Empty : row.Field <string>("shiptoaddr1"); entity.shiptoaddr2 = row.IsNull("shiptoaddr2") ? string.Empty : row.Field <string>("shiptoaddr2"); entity.shiptoaddr3 = row.IsNull("shiptoaddr3") ? string.Empty : row.Field <string>("shiptoaddr3"); entity.shiptocity = row.IsNull("shiptocity") ? string.Empty : row.Field <string>("shiptocity"); entity.shiptost = row.IsNull("shiptost") ? string.Empty : row.Field <string>("shiptost"); entity.shiptozip = row.IsNull("shiptozip") ? string.Empty : row.Field <string>("shiptozip"); entity.countrycd = row.IsNull("countrycd") ? string.Empty : row.Field <string>("countrycd"); entity.shiptoerr = row.IsNull("shiptoerr") ? string.Empty : row.Field <string>("shiptoerr"); entity.geocd = row.IsNull("geocd") ? 0 : row.Field <int>("geocd"); entity.outofcityfl = row.Field <bool>("outofcityfl"); entity.orderdt = row.Field <DateTime?>("orderdt"); entity.shipinstr = row.IsNull("shipinstr") ? string.Empty : row.Field <string>("shipinstr"); entity.shipviaty = row.IsNull("shipviaty") ? string.Empty : row.Field <string>("shipviaty"); entity.shipviadesc = row.IsNull("shipviadesc") ? string.Empty : row.Field <string>("shipviadesc"); entity.billtoerr = row.IsNull("billtoerr") ? string.Empty : row.Field <string>("billtoerr"); entity.billtowhse = row.IsNull("billtowhse") ? string.Empty : row.Field <string>("billtowhse"); entity.billtoname = row.IsNull("billtoname") ? string.Empty : row.Field <string>("billtoname"); entity.billtoaddr1 = row.IsNull("billtoaddr1") ? string.Empty : row.Field <string>("billtoaddr1"); entity.billtoaddr2 = row.IsNull("billtoaddr2") ? string.Empty : row.Field <string>("billtoaddr2"); entity.billtoaddr3 = row.IsNull("billtoaddr3") ? string.Empty : row.Field <string>("billtoaddr3"); entity.billtocity = row.IsNull("billtocity") ? string.Empty : row.Field <string>("billtocity"); entity.billtostate = row.IsNull("billtostate") ? string.Empty : row.Field <string>("billtostate"); entity.billtozipcd = row.IsNull("billtozipcd") ? string.Empty : row.Field <string>("billtozipcd"); entity.billtocountrycd = row.IsNull("billtocountrycd") ? string.Empty : row.Field <string>("billtocountrycd"); entity.shiptofl = row.Field <bool>("shiptofl"); entity.modvtfl = row.Field <bool>("modvtfl"); entity.taxinterfacety = row.IsNull("taxinterfacety") ? string.Empty : row.Field <string>("taxinterfacety"); entity.freeformaddr = row.Field <bool>("freeformaddr"); entity.poehrowid = row.Field <byte[]>("poehrowid").ToStringEncoded(); entity.apsvrowid = row.Field <byte[]>("apsvrowid").ToStringEncoded(); entity.apssrowid = row.Field <byte[]>("apssrowid").ToStringEncoded(); entity.fiBillToStateHidden = row.Field <bool>("fiBillToState-hidden"); entity.fiShipToNmSensitive = row.Field <bool>("fiShipToNm-sensitive"); entity.fiShipToAddr1Sensitive = row.Field <bool>("fiShipToAddr1-sensitive"); entity.fiShipToAddr2Sensitive = row.Field <bool>("fiShipToAddr2-sensitive"); entity.fiShipToAddr3Sensitive = row.Field <bool>("fiShipToAddr3-sensitive"); entity.fiShipToCitySensitive = row.Field <bool>("fiShipToCity-sensitive"); entity.fiShipToStSensitive = row.Field <bool>("fiShipToSt-sensitive"); entity.fiShipToStHidden = row.Field <bool>("fiShipToSt-hidden"); entity.fiShipToZipSensitive = row.Field <bool>("fiShipToZip-sensitive"); entity.fiGeoCodeSensitive = row.Field <bool>("fiGeoCode-sensitive"); entity.tgOutOfCityFlSensitive = row.Field <bool>("tgOutOfCityFl-sensitive"); entity.btnGeocodeSensitive = row.Field <bool>("btnGeocode-sensitive"); entity.cbCountryCdSensitive = row.Field <bool>("cbCountryCd-sensitive"); return(entity); }
/// <summary> /// Update a database row from a class /// </summary> public static void UpdateRowFromPoblanketreleasesingle(ref DataRow row, Poblanketreleasesingle entity) { row.SetField("pono", entity.pono); row.SetField("posuf", entity.posuf); row.SetField("ponotesfl", entity.ponotesfl); row.SetField("vendno", entity.vendno); row.SetField("vendnotesfl", entity.vendnotesfl); row.SetField("vendname", entity.vendname); row.SetField("shipfmno", entity.shipfmno); row.SetField("releasetxt", entity.releasetxt); row.SetField("shiptowhse", entity.shiptowhse); row.SetField("shiptonm", entity.shiptonm); row.SetField("shiptoaddr1", entity.shiptoaddr1); row.SetField("shiptoaddr2", entity.shiptoaddr2); row.SetField("shiptoaddr3", entity.shiptoaddr3); row.SetField("shiptocity", entity.shiptocity); row.SetField("shiptost", entity.shiptost); row.SetField("shiptozip", entity.shiptozip); row.SetField("countrycd", entity.countrycd); row.SetField("shiptoerr", entity.shiptoerr); row.SetField("geocd", entity.geocd); row.SetField("outofcityfl", entity.outofcityfl); row.SetField("orderdt", entity.orderdt); row.SetField("shipinstr", entity.shipinstr); row.SetField("shipviaty", entity.shipviaty); row.SetField("shipviadesc", entity.shipviadesc); row.SetField("billtoerr", entity.billtoerr); row.SetField("billtowhse", entity.billtowhse); row.SetField("billtoname", entity.billtoname); row.SetField("billtoaddr1", entity.billtoaddr1); row.SetField("billtoaddr2", entity.billtoaddr2); row.SetField("billtoaddr3", entity.billtoaddr3); row.SetField("billtocity", entity.billtocity); row.SetField("billtostate", entity.billtostate); row.SetField("billtozipcd", entity.billtozipcd); row.SetField("billtocountrycd", entity.billtocountrycd); row.SetField("shiptofl", entity.shiptofl); row.SetField("modvtfl", entity.modvtfl); row.SetField("taxinterfacety", entity.taxinterfacety); row.SetField("freeformaddr", entity.freeformaddr); row.SetField("poehrowid", entity.poehrowid.ToByteArray()); row.SetField("apsvrowid", entity.apsvrowid.ToByteArray()); row.SetField("apssrowid", entity.apssrowid.ToByteArray()); row.SetField("fiBillToState-hidden", entity.fiBillToStateHidden); row.SetField("fiShipToNm-sensitive", entity.fiShipToNmSensitive); row.SetField("fiShipToAddr1-sensitive", entity.fiShipToAddr1Sensitive); row.SetField("fiShipToAddr2-sensitive", entity.fiShipToAddr2Sensitive); row.SetField("fiShipToAddr3-sensitive", entity.fiShipToAddr3Sensitive); row.SetField("fiShipToCity-sensitive", entity.fiShipToCitySensitive); row.SetField("fiShipToSt-sensitive", entity.fiShipToStSensitive); row.SetField("fiShipToSt-hidden", entity.fiShipToStHidden); row.SetField("fiShipToZip-sensitive", entity.fiShipToZipSensitive); row.SetField("fiGeoCode-sensitive", entity.fiGeoCodeSensitive); row.SetField("tgOutOfCityFl-sensitive", entity.tgOutOfCityFlSensitive); row.SetField("btnGeocode-sensitive", entity.btnGeocodeSensitive); row.SetField("cbCountryCd-sensitive", entity.cbCountryCdSensitive); }