public static Oeirccdetailresults BuildOeirccdetailresultsFromRow(DataRow row) { Oeirccdetailresults entity = new Oeirccdetailresults(); entity.orderno = row.IsNull("orderno") ? 0 : row.Field <int>("orderno"); entity.ordersuf = row.IsNull("ordersuf") ? 0 : row.Field <int>("ordersuf"); entity.mediacd = row.IsNull("mediacd") ? 0 : row.Field <int>("mediacd"); entity.cardno = row.IsNull("cardno") ? string.Empty : row.Field <string>("cardno"); entity.transcd = row.IsNull("transcd") ? string.Empty : row.Field <string>("transcd"); entity.seqno = row.IsNull("seqno") ? 0 : row.Field <int>("seqno"); entity.exp = row.IsNull("exp") ? string.Empty : row.Field <string>("exp"); entity.cardname = row.IsNull("cardname") ? string.Empty : row.Field <string>("cardname"); entity.token = row.IsNull("token") ? string.Empty : row.Field <string>("token"); entity.authamt = row.IsNull("authamt") ? decimal.Zero : row.Field <decimal>("authamt"); entity.amount = row.IsNull("amount") ? decimal.Zero : row.Field <decimal>("amount"); entity.saleamt = row.IsNull("saleamt") ? decimal.Zero : row.Field <decimal>("saleamt"); entity.origamt = row.IsNull("origamt") ? decimal.Zero : row.Field <decimal>("origamt"); entity.taxamt = row.IsNull("taxamt") ? decimal.Zero : row.Field <decimal>("taxamt"); entity.currproc = row.IsNull("currproc") ? string.Empty : row.Field <string>("currproc"); entity.processcd = row.IsNull("processcd") ? 0 : row.Field <int>("processcd"); entity.commcd = row.IsNull("commcd") ? 0 : row.Field <int>("commcd"); entity.stage = row.IsNull("stage") ? string.Empty : row.Field <string>("stage"); entity.commst = row.IsNull("commst") ? string.Empty : row.Field <string>("commst"); entity.createdt = row.Field <DateTime?>("createdt"); entity.createtm = row.IsNull("createtm") ? string.Empty : row.Field <string>("createtm"); entity.submitdt = row.Field <DateTime?>("submitdt"); entity.submittm = row.IsNull("submittm") ? string.Empty : row.Field <string>("submittm"); entity.respdt = row.Field <DateTime?>("respdt"); entity.resptm = row.IsNull("resptm") ? string.Empty : row.Field <string>("resptm"); entity.response = row.IsNull("response") ? string.Empty : row.Field <string>("response"); entity.comm = row.IsNull("comm") ? string.Empty : row.Field <string>("comm"); entity.statustype = row.Field <bool>("statustype"); entity.charmediaauth = row.IsNull("charmediaauth") ? string.Empty : row.Field <string>("charmediaauth"); entity.charpreauth = row.IsNull("charpreauth") ? string.Empty : row.Field <string>("charpreauth"); entity.destzip = row.IsNull("destzip") ? string.Empty : row.Field <string>("destzip"); entity.avadd = row.IsNull("avadd") ? string.Empty : row.Field <string>("avadd"); entity.avzip = row.IsNull("avzip") ? string.Empty : row.Field <string>("avzip"); entity.merchid = row.IsNull("merchid") ? string.Empty : row.Field <string>("merchid"); entity.merchiddesc = row.IsNull("merchiddesc") ? string.Empty : row.Field <string>("merchiddesc"); entity.category = row.IsNull("category") ? string.Empty : row.Field <string>("category"); entity.ccholdbofl = row.Field <bool>("ccholdbofl"); return(entity); }
/// <summary> /// Update a database row from a class /// </summary> public static void UpdateRowFromOeirccdetailresults(ref DataRow row, Oeirccdetailresults entity) { row.SetField("orderno", entity.orderno); row.SetField("ordersuf", entity.ordersuf); row.SetField("mediacd", entity.mediacd); row.SetField("cardno", entity.cardno); row.SetField("transcd", entity.transcd); row.SetField("seqno", entity.seqno); row.SetField("exp", entity.exp); row.SetField("cardname", entity.cardname); row.SetField("token", entity.token); row.SetField("authamt", entity.authamt); row.SetField("amount", entity.amount); row.SetField("saleamt", entity.saleamt); row.SetField("origamt", entity.origamt); row.SetField("taxamt", entity.taxamt); row.SetField("currproc", entity.currproc); row.SetField("processcd", entity.processcd); row.SetField("commcd", entity.commcd); row.SetField("stage", entity.stage); row.SetField("commst", entity.commst); row.SetField("createdt", entity.createdt); row.SetField("createtm", entity.createtm); row.SetField("submitdt", entity.submitdt); row.SetField("submittm", entity.submittm); row.SetField("respdt", entity.respdt); row.SetField("resptm", entity.resptm); row.SetField("response", entity.response); row.SetField("comm", entity.comm); row.SetField("statustype", entity.statustype); row.SetField("charmediaauth", entity.charmediaauth); row.SetField("charpreauth", entity.charpreauth); row.SetField("destzip", entity.destzip); row.SetField("avadd", entity.avadd); row.SetField("avzip", entity.avzip); row.SetField("merchid", entity.merchid); row.SetField("merchiddesc", entity.merchiddesc); row.SetField("category", entity.category); row.SetField("ccholdbofl", entity.ccholdbofl); }