public static Saccprocessor BuildSaccprocessorFromRow(DataRow row) { Saccprocessor entity = new Saccprocessor(); entity.anssfx = row.IsNull("anssfx") ? string.Empty : row.Field <string>("anssfx"); entity.bkusfx = row.IsNull("bkusfx") ? string.Empty : row.Field <string>("bkusfx"); entity.callingURL = row.IsNull("callingURL") ? string.Empty : row.Field <string>("callingURL"); entity.callingURLH5 = row.IsNull("callingURLH5") ? string.Empty : row.Field <string>("callingURLH5"); entity.chkactcd = row.IsNull("chkactcd") ? string.Empty : row.Field <string>("chkactcd"); entity.chkdlcd = row.IsNull("chkdlcd") ? string.Empty : row.Field <string>("chkdlcd"); entity.chkothcd = row.IsNull("chkothcd") ? string.Empty : row.Field <string>("chkothcd"); entity.cono = row.IsNull("cono") ? 0 : row.Field <int>("cono"); entity.delay = row.IsNull("delay") ? 0 : row.Field <int>("delay"); entity.directory = row.IsNull("directory") ? string.Empty : row.Field <string>("directory"); entity.flatfileencrypt = row.Field <bool>("flatfileencrypt"); entity.forcecd = row.IsNull("forcecd") ? string.Empty : row.Field <string>("forcecd"); entity.ipaddress = row.IsNull("ipaddress") ? string.Empty : row.Field <string>("ipaddress"); entity.lastuser = row.IsNull("lastuser") ? 0 : row.Field <int>("lastuser"); entity.name = row.IsNull("name") ? string.Empty : row.Field <string>("name"); entity.numusers = row.IsNull("numusers") ? 0 : row.Field <int>("numusers"); entity.operinit = row.IsNull("operinit") ? string.Empty : row.Field <string>("operinit"); entity.portnum = row.IsNull("portnum") ? string.Empty : row.Field <string>("portnum"); entity.prauthcd = row.IsNull("prauthcd") ? string.Empty : row.Field <string>("prauthcd"); entity.prefix = row.IsNull("prefix") ? string.Empty : row.Field <string>("prefix"); entity.processno = row.IsNull("processno") ? 0 : row.Field <int>("processno"); entity.processorhostport = row.IsNull("processorhostport") ? string.Empty : row.Field <string>("processorhostport"); entity.processorhostsite = row.IsNull("processorhostsite") ? string.Empty : row.Field <string>("processorhostsite"); entity.processorpartnerid = row.IsNull("processorpartnerid") ? string.Empty : row.Field <string>("processorpartnerid"); entity.processortype = row.IsNull("processortype") ? string.Empty : row.Field <string>("processortype"); entity.processoruserid = row.IsNull("processoruserid") ? string.Empty : row.Field <string>("processoruserid"); entity.processoruserpw = row.IsNull("processoruserpw") ? string.Empty : row.Field <string>("processoruserpw"); entity.processorvendorid = row.IsNull("processorvendorid") ? string.Empty : row.Field <string>("processorvendorid"); entity.purlevelno = row.IsNull("purlevelno") ? 0 : row.Field <int>("purlevelno"); entity.reqsfx = row.IsNull("reqsfx") ? string.Empty : row.Field <string>("reqsfx"); entity.responseURL = row.IsNull("responseURL") ? string.Empty : row.Field <string>("responseURL"); entity.responseURLH5 = row.IsNull("responseURLH5") ? string.Empty : row.Field <string>("responseURLH5"); entity.retncd = row.IsNull("retncd") ? string.Empty : row.Field <string>("retncd"); entity.salecd = row.IsNull("salecd") ? string.Empty : row.Field <string>("salecd"); entity.setlcd = row.IsNull("setlcd") ? string.Empty : row.Field <string>("setlcd"); entity.tempsfx = row.IsNull("tempsfx") ? string.Empty : row.Field <string>("tempsfx"); entity.timeout = row.IsNull("timeout") ? 0 : row.Field <int>("timeout"); entity.transdt = row.Field <DateTime?>("transdt"); entity.transproc = row.IsNull("transproc") ? string.Empty : row.Field <string>("transproc"); entity.transtm = row.IsNull("transtm") ? string.Empty : row.Field <string>("transtm"); entity.unixrun = row.IsNull("unixrun") ? string.Empty : row.Field <string>("unixrun"); entity.webauthfl = row.Field <bool>("webauthfl"); entity.user1 = row.IsNull("user1") ? string.Empty : row.Field <string>("user1"); entity.user2 = row.IsNull("user2") ? string.Empty : row.Field <string>("user2"); entity.user3 = row.IsNull("user3") ? string.Empty : row.Field <string>("user3"); entity.user4 = row.IsNull("user4") ? string.Empty : row.Field <string>("user4"); entity.user5 = row.IsNull("user5") ? string.Empty : row.Field <string>("user5"); entity.user6 = row.Field <decimal?>("user6"); entity.user7 = row.Field <decimal?>("user7"); entity.user8 = row.Field <DateTime?>("user8"); entity.user9 = row.Field <DateTime?>("user9"); entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield"); entity.rowid = row.Field <byte[]>("rowid").ToStringEncoded(); return(entity); }
/// <summary> /// Update a database row from a class /// </summary> public static void UpdateRowFromSaccprocessor(ref DataRow row, Saccprocessor entity) { row.SetField("anssfx", entity.anssfx); row.SetField("bkusfx", entity.bkusfx); row.SetField("callingURL", entity.callingURL); row.SetField("callingURLH5", entity.callingURLH5); row.SetField("chkactcd", entity.chkactcd); row.SetField("chkdlcd", entity.chkdlcd); row.SetField("chkothcd", entity.chkothcd); row.SetField("cono", entity.cono); row.SetField("delay", entity.delay); row.SetField("directory", entity.directory); row.SetField("flatfileencrypt", entity.flatfileencrypt); row.SetField("forcecd", entity.forcecd); row.SetField("ipaddress", entity.ipaddress); row.SetField("lastuser", entity.lastuser); row.SetField("name", entity.name); row.SetField("numusers", entity.numusers); row.SetField("operinit", entity.operinit); row.SetField("portnum", entity.portnum); row.SetField("prauthcd", entity.prauthcd); row.SetField("prefix", entity.prefix); row.SetField("processno", entity.processno); row.SetField("processorhostport", entity.processorhostport); row.SetField("processorhostsite", entity.processorhostsite); row.SetField("processorpartnerid", entity.processorpartnerid); row.SetField("processortype", entity.processortype); row.SetField("processoruserid", entity.processoruserid); row.SetField("processoruserpw", entity.processoruserpw); row.SetField("processorvendorid", entity.processorvendorid); row.SetField("purlevelno", entity.purlevelno); row.SetField("reqsfx", entity.reqsfx); row.SetField("responseURL", entity.responseURL); row.SetField("responseURLH5", entity.responseURLH5); row.SetField("retncd", entity.retncd); row.SetField("salecd", entity.salecd); row.SetField("setlcd", entity.setlcd); row.SetField("tempsfx", entity.tempsfx); row.SetField("timeout", entity.timeout); row.SetField("transdt", entity.transdt); row.SetField("transproc", entity.transproc); row.SetField("transtm", entity.transtm); row.SetField("unixrun", entity.unixrun); row.SetField("webauthfl", entity.webauthfl); 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("userfield", entity.userfield); row.SetField("rowid", entity.rowid.ToByteArray()); }