예제 #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromApetalookupresults(ref DataRow row, Apetalookupresults entity)
 {
     row.SetField("achinvno", entity.achinvno);
     row.SetField("achinvsuf", entity.achinvsuf);
     row.SetField("amount", entity.amount);
     row.SetField("bankno", entity.bankno);
     row.SetField("charmedia", entity.charmedia);
     row.SetField("commcd", entity.commcd);
     row.SetField("createdt", entity.createdt);
     row.SetField("createtm", entity.createtm);
     row.SetField("currencyty", entity.currencyty);
     row.SetField("currproc", entity.currproc);
     row.SetField("mediacd", entity.mediacd);
     row.SetField("merchantid", entity.merchantid);
     row.SetField("processno", entity.processno);
     row.SetField("response", entity.response);
     row.SetField("responsedt", entity.responsedt);
     row.SetField("responsetm", entity.responsetm);
     row.SetField("rowpointer", entity.rowpointer);
     row.SetField("shipfm", entity.shipfm);
     row.SetField("srcrowpointer", entity.srcrowpointer);
     row.SetField("statustype", entity.statustype);
     row.SetField("submitdt", entity.submitdt);
     row.SetField("submittm", entity.submittm);
     row.SetField("token", entity.token);
     row.SetField("transcd", entity.transcd);
     row.SetField("transdttmz", entity.transdttmz);
     row.SetField("transproc", entity.transproc);
     row.SetField("vendno", entity.vendno);
     row.SetField("vendno2", entity.vendno2);
     row.SetField("whse", entity.whse);
     row.SetField("userfield", entity.userfield);
 }
예제 #2
0
        public static Apetalookupresults BuildApetalookupresultsFromRow(DataRow row)
        {
            Apetalookupresults entity = new Apetalookupresults();

            entity.achinvno      = row.IsNull("achinvno") ? string.Empty : row.Field <string>("achinvno");
            entity.achinvsuf     = row.IsNull("achinvsuf") ? string.Empty : row.Field <string>("achinvsuf");
            entity.amount        = row.IsNull("amount") ? decimal.Zero : row.Field <decimal>("amount");
            entity.bankno        = row.IsNull("bankno") ? 0 : row.Field <int>("bankno");
            entity.charmedia     = row.IsNull("charmedia") ? string.Empty : row.Field <string>("charmedia");
            entity.commcd        = row.IsNull("commcd") ? 0 : row.Field <int>("commcd");
            entity.createdt      = row.Field <DateTime?>("createdt");
            entity.createtm      = row.IsNull("createtm") ? string.Empty : row.Field <string>("createtm");
            entity.currencyty    = row.IsNull("currencyty") ? string.Empty : row.Field <string>("currencyty");
            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.processno     = row.IsNull("processno") ? 0 : row.Field <int>("processno");
            entity.response      = row.IsNull("response") ? string.Empty : row.Field <string>("response");
            entity.responsedt    = row.Field <DateTime?>("responsedt");
            entity.responsetm    = row.IsNull("responsetm") ? string.Empty : row.Field <string>("responsetm");
            entity.rowpointer    = row.IsNull("rowpointer") ? string.Empty : row.Field <string>("rowpointer");
            entity.shipfm        = row.IsNull("shipfm") ? 0 : row.Field <int>("shipfm");
            entity.srcrowpointer = row.IsNull("srcrowpointer") ? string.Empty : row.Field <string>("srcrowpointer");
            entity.statustype    = row.Field <bool>("statustype");
            entity.submitdt      = row.Field <DateTime?>("submitdt");
            entity.submittm      = row.IsNull("submittm") ? string.Empty : row.Field <string>("submittm");
            entity.token         = row.IsNull("token") ? string.Empty : row.Field <string>("token");
            entity.transcd       = row.IsNull("transcd") ? string.Empty : row.Field <string>("transcd");
            entity.transdttmz    = row.Field <DateTime?>("transdttmz");
            entity.transproc     = row.IsNull("transproc") ? string.Empty : row.Field <string>("transproc");
            entity.vendno        = row.IsNull("vendno") ? decimal.Zero : row.Field <decimal>("vendno");
            entity.vendno2       = row.IsNull("vendno2") ? decimal.Zero : row.Field <decimal>("vendno2");
            entity.whse          = row.IsNull("whse") ? string.Empty : row.Field <string>("whse");
            entity.userfield     = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }