Example #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromPoeilistresults(ref DataRow row, Poeilistresults entity)
 {
     row.SetField("pono", entity.pono);
     row.SetField("posuf", entity.posuf);
     row.SetField("ponox", entity.ponox);
     row.SetField("ponotesfl", entity.ponotesfl);
     row.SetField("stagecd", entity.stagecd);
     row.SetField("stagecdx", entity.stagecdx);
     row.SetField("transtype", entity.transtype);
     row.SetField("enterdt", entity.enterdt);
     row.SetField("printeddt", entity.printeddt);
     row.SetField("reqshipdt", entity.reqshipdt);
     row.SetField("duedt", entity.duedt);
     row.SetField("vendno", entity.vendno);
     row.SetField("vendnox", entity.vendnox);
     row.SetField("vendnotesfl", entity.vendnotesfl);
     row.SetField("shipfmno", entity.shipfmno);
     row.SetField("name", entity.name);
     row.SetField("whse", entity.whse);
     row.SetField("batchdatcd", entity.batchdatcd);
     row.SetField("statusinfo", entity.statusinfo);
     row.SetField("trackfl", entity.trackfl);
     row.SetField("amounti", entity.amounti);
     row.SetField("freightexpx", entity.freightexpx);
     row.SetField("seqno", entity.seqno);
     row.SetField("vapofl", entity.vapofl);
     row.SetField("correctionfl", entity.correctionfl);
     row.SetField("detailtab", entity.detailtab);
     row.SetField("receiverfl", entity.receiverfl);
     row.SetField("userfield", entity.userfield);
 }
Example #2
0
        public static Poeilistresults BuildPoeilistresultsFromRow(DataRow row)
        {
            Poeilistresults entity = new Poeilistresults();

            entity.pono         = row.IsNull("pono") ? 0 : row.Field <int>("pono");
            entity.posuf        = row.IsNull("posuf") ? 0 : row.Field <int>("posuf");
            entity.ponox        = row.IsNull("ponox") ? string.Empty : row.Field <string>("ponox");
            entity.ponotesfl    = row.IsNull("ponotesfl") ? string.Empty : row.Field <string>("ponotesfl");
            entity.stagecd      = row.IsNull("stagecd") ? 0 : row.Field <int>("stagecd");
            entity.stagecdx     = row.IsNull("stagecdx") ? string.Empty : row.Field <string>("stagecdx");
            entity.transtype    = row.IsNull("transtype") ? string.Empty : row.Field <string>("transtype");
            entity.enterdt      = row.Field <DateTime?>("enterdt");
            entity.printeddt    = row.Field <DateTime?>("printeddt");
            entity.reqshipdt    = row.Field <DateTime?>("reqshipdt");
            entity.duedt        = row.Field <DateTime?>("duedt");
            entity.vendno       = row.IsNull("vendno") ? decimal.Zero : row.Field <decimal>("vendno");
            entity.vendnox      = row.IsNull("vendnox") ? string.Empty : row.Field <string>("vendnox");
            entity.vendnotesfl  = row.IsNull("vendnotesfl") ? string.Empty : row.Field <string>("vendnotesfl");
            entity.shipfmno     = row.IsNull("shipfmno") ? 0 : row.Field <int>("shipfmno");
            entity.name         = row.IsNull("name") ? string.Empty : row.Field <string>("name");
            entity.whse         = row.IsNull("whse") ? string.Empty : row.Field <string>("whse");
            entity.batchdatcd   = row.IsNull("batchdatcd") ? string.Empty : row.Field <string>("batchdatcd");
            entity.statusinfo   = row.IsNull("statusinfo") ? string.Empty : row.Field <string>("statusinfo");
            entity.trackfl      = row.Field <bool>("trackfl");
            entity.amounti      = row.IsNull("amounti") ? 0 : row.Field <int>("amounti");
            entity.freightexpx  = row.IsNull("freightexpx") ? string.Empty : row.Field <string>("freightexpx");
            entity.seqno        = row.IsNull("seqno") ? 0 : row.Field <int>("seqno");
            entity.vapofl       = row.Field <bool>("vapofl");
            entity.correctionfl = row.Field <bool>("correctionfl");
            entity.detailtab    = row.IsNull("detailtab") ? string.Empty : row.Field <string>("detailtab");
            entity.receiverfl   = row.Field <bool>("receiverfl");
            entity.userfield    = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }