Exemplo n.º 1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromReportcchistresults(ref DataRow row, Reportcchistresults entity)
 {
     row.SetField("amount", entity.amount);
     row.SetField("authamt", entity.authamt);
     row.SetField("avadd", entity.avadd);
     row.SetField("avzip", entity.avzip);
     row.SetField("bankno", entity.bankno);
     row.SetField("bosuf", entity.bosuf);
     row.SetField("cardid", entity.cardid);
     row.SetField("cardno", entity.cardno);
     row.SetField("category", entity.category);
     row.SetField("ccholdbofl", entity.ccholdbofl);
     row.SetField("charmediaauth", entity.charmediaauth);
     row.SetField("charpreauth", entity.charpreauth);
     row.SetField("cmc", entity.cmc);
     row.SetField("cmm", entity.cmm);
     row.SetField("commcd", entity.commcd);
     row.SetField("cono", entity.cono);
     row.SetField("createdt", entity.createdt);
     row.SetField("createtm", entity.createtm);
     row.SetField("currproc", entity.currproc);
     row.SetField("destzip", entity.destzip);
     row.SetField("exp", entity.exp);
     row.SetField("mediaauth", entity.mediaauth);
     row.SetField("mediacd", entity.mediacd);
     row.SetField("merchantid", entity.merchantid);
     row.SetField("operinit", entity.operinit);
     row.SetField("orderno", entity.orderno);
     row.SetField("ordersuf", entity.ordersuf);
     row.SetField("origamt", entity.origamt);
     row.SetField("origproccd", entity.origproccd);
     row.SetField("preauthno", entity.preauthno);
     row.SetField("processcd", entity.processcd);
     row.SetField("processno", entity.processno);
     row.SetField("respdt", entity.respdt);
     row.SetField("response", entity.response);
     row.SetField("resptm", entity.resptm);
     row.SetField("saleamt", entity.saleamt);
     row.SetField("seqno", entity.seqno);
     row.SetField("statustype", entity.statustype);
     row.SetField("submitdt", entity.submitdt);
     row.SetField("submittm", entity.submittm);
     row.SetField("taxamt", entity.taxamt);
     row.SetField("transcd", entity.transcd);
     row.SetField("transdt", entity.transdt);
     row.SetField("transproc", entity.transproc);
     row.SetField("transtm", entity.transtm);
     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("newordno", entity.newordno);
     row.SetField("newordsuf", entity.newordsuf);
     row.SetField("cUnMaskCardNo", entity.cUnMaskCardNo);
     row.SetField("cOrderNum", entity.cOrderNum);
     row.SetField("oeehaid", entity.oeehaid);
 }
Exemplo n.º 2
0
        public static Reportcchistresults BuildReportcchistresultsFromRow(DataRow row)
        {
            Reportcchistresults entity = new Reportcchistresults();

            entity.amount        = row.IsNull("amount") ? decimal.Zero : row.Field <decimal>("amount");
            entity.authamt       = row.IsNull("authamt") ? decimal.Zero : row.Field <decimal>("authamt");
            entity.avadd         = row.IsNull("avadd") ? string.Empty : row.Field <string>("avadd");
            entity.avzip         = row.IsNull("avzip") ? string.Empty : row.Field <string>("avzip");
            entity.bankno        = row.IsNull("bankno") ? 0 : row.Field <int>("bankno");
            entity.bosuf         = row.IsNull("bosuf") ? 0 : row.Field <int>("bosuf");
            entity.cardid        = row.IsNull("cardid") ? 0 : row.Field <int>("cardid");
            entity.cardno        = row.IsNull("cardno") ? string.Empty : row.Field <string>("cardno");
            entity.category      = row.IsNull("category") ? string.Empty : row.Field <string>("category");
            entity.ccholdbofl    = row.Field <bool>("ccholdbofl");
            entity.charmediaauth = row.IsNull("charmediaauth") ? string.Empty : row.Field <string>("charmediaauth");
            entity.charpreauth   = row.IsNull("charpreauth") ? string.Empty : row.Field <string>("charpreauth");
            entity.cmc           = row.IsNull("cmc") ? string.Empty : row.Field <string>("cmc");
            entity.cmm           = row.IsNull("cmm") ? string.Empty : row.Field <string>("cmm");
            entity.commcd        = row.IsNull("commcd") ? 0 : row.Field <int>("commcd");
            entity.cono          = row.IsNull("cono") ? 0 : row.Field <int>("cono");
            entity.createdt      = row.Field <DateTime?>("createdt");
            entity.createtm      = row.IsNull("createtm") ? string.Empty : row.Field <string>("createtm");
            entity.currproc      = row.IsNull("currproc") ? string.Empty : row.Field <string>("currproc");
            entity.destzip       = row.IsNull("destzip") ? string.Empty : row.Field <string>("destzip");
            entity.exp           = row.IsNull("exp") ? string.Empty : row.Field <string>("exp");
            entity.mediaauth     = row.IsNull("mediaauth") ? 0 : row.Field <int>("mediaauth");
            entity.mediacd       = row.IsNull("mediacd") ? 0 : row.Field <int>("mediacd");
            entity.merchantid    = row.IsNull("merchantid") ? string.Empty : row.Field <string>("merchantid");
            entity.operinit      = row.IsNull("operinit") ? string.Empty : row.Field <string>("operinit");
            entity.orderno       = row.IsNull("orderno") ? 0 : row.Field <int>("orderno");
            entity.ordersuf      = row.IsNull("ordersuf") ? 0 : row.Field <int>("ordersuf");
            entity.origamt       = row.IsNull("origamt") ? decimal.Zero : row.Field <decimal>("origamt");
            entity.origproccd    = row.IsNull("origproccd") ? 0 : row.Field <int>("origproccd");
            entity.preauthno     = row.IsNull("preauthno") ? 0 : row.Field <int>("preauthno");
            entity.processcd     = row.IsNull("processcd") ? 0 : row.Field <int>("processcd");
            entity.processno     = row.IsNull("processno") ? 0 : row.Field <int>("processno");
            entity.respdt        = row.Field <DateTime?>("respdt");
            entity.response      = row.IsNull("response") ? string.Empty : row.Field <string>("response");
            entity.resptm        = row.IsNull("resptm") ? string.Empty : row.Field <string>("resptm");
            entity.saleamt       = row.IsNull("saleamt") ? decimal.Zero : row.Field <decimal>("saleamt");
            entity.seqno         = row.IsNull("seqno") ? 0 : row.Field <int>("seqno");
            entity.statustype    = row.Field <bool>("statustype");
            entity.submitdt      = row.Field <DateTime?>("submitdt");
            entity.submittm      = row.IsNull("submittm") ? string.Empty : row.Field <string>("submittm");
            entity.taxamt        = row.IsNull("taxamt") ? decimal.Zero : row.Field <decimal>("taxamt");
            entity.transcd       = row.IsNull("transcd") ? string.Empty : row.Field <string>("transcd");
            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.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.newordno      = row.IsNull("newordno") ? 0 : row.Field <int>("newordno");
            entity.newordsuf     = row.IsNull("newordsuf") ? 0 : row.Field <int>("newordsuf");
            entity.cUnMaskCardNo = row.IsNull("cUnMaskCardNo") ? string.Empty : row.Field <string>("cUnMaskCardNo");
            entity.cOrderNum     = row.IsNull("cOrderNum") ? string.Empty : row.Field <string>("cOrderNum");
            entity.oeehaid       = row.IsNull("oeehaid") ? 0 : row.Field <long>("oeehaid");
            return(entity);
        }