Esempio n. 1
0
        public static Tenderingcchist BuildTenderingcchistFromRow(DataRow row)
        {
            Tenderingcchist entity = new Tenderingcchist();

            entity.amount        = row.IsNull("amount") ? decimal.Zero : row.Field <decimal>("amount");
            entity.authamt       = row.IsNull("authamt") ? decimal.Zero : row.Field <decimal>("authamt");
            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.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.userfield     = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }
Esempio n. 2
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromTenderingcchist(ref DataRow row, Tenderingcchist entity)
 {
     row.SetField("amount", entity.amount);
     row.SetField("authamt", entity.authamt);
     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("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("userfield", entity.userfield);
 }