Exemplo n.º 1
0
        public static Ptxqueuelistresults BuildPtxqueuelistresultsFromRow(DataRow row)
        {
            Ptxqueuelistresults entity = new Ptxqueuelistresults();

            entity.statusty        = row.IsNull("statusty") ? string.Empty : row.Field <string>("statusty");
            entity.type            = row.IsNull("type") ? string.Empty : row.Field <string>("type");
            entity.doctype         = row.IsNull("doctype") ? string.Empty : row.Field <string>("doctype");
            entity.orderno         = row.IsNull("orderno") ? 0 : row.Field <int>("orderno");
            entity.ordersuf        = row.IsNull("ordersuf") ? 0 : row.Field <int>("ordersuf");
            entity.ordernotesfl    = row.IsNull("ordernotesfl") ? string.Empty : row.Field <string>("ordernotesfl");
            entity.whse            = row.IsNull("whse") ? string.Empty : row.Field <string>("whse");
            entity.whsename        = row.IsNull("whsename") ? string.Empty : row.Field <string>("whsename");
            entity.processmsg      = row.IsNull("processmsg") ? string.Empty : row.Field <string>("processmsg");
            entity.transdttmz      = row.IsNull("transdttmz") ? string.Empty : row.Field <string>("transdttmz");
            entity.nodetails       = row.IsNull("nodetails") ? 0 : row.Field <int>("nodetails");
            entity.custvendno      = row.IsNull("custvendno") ? decimal.Zero : row.Field <decimal>("custvendno");
            entity.custvendnotesfl = row.IsNull("custvendnotesfl") ? string.Empty : row.Field <string>("custvendnotesfl");
            entity.shipto          = row.IsNull("shipto") ? string.Empty : row.Field <string>("shipto");
            entity.shiptonotesfl   = row.IsNull("shiptonotesfl") ? string.Empty : row.Field <string>("shiptonotesfl");
            entity.shipfmno        = row.IsNull("shipfmno") ? 0 : row.Field <int>("shipfmno");
            entity.shiptoshipfmno  = row.IsNull("shiptoshipfmno") ? string.Empty : row.Field <string>("shiptoshipfmno");
            entity.name            = row.IsNull("name") ? string.Empty : row.Field <string>("name");
            entity.stagecdword     = row.IsNull("stagecdword") ? string.Empty : row.Field <string>("stagecdword");
            entity.transtype       = row.IsNull("transtype") ? string.Empty : row.Field <string>("transtype");
            entity.rwid            = row.Field <byte[]>("rwid").ToStringEncoded();
            return(entity);
        }
Exemplo n.º 2
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromPtxqueuelistresults(ref DataRow row, Ptxqueuelistresults entity)
 {
     row.SetField("statusty", entity.statusty);
     row.SetField("type", entity.type);
     row.SetField("doctype", entity.doctype);
     row.SetField("orderno", entity.orderno);
     row.SetField("ordersuf", entity.ordersuf);
     row.SetField("ordernotesfl", entity.ordernotesfl);
     row.SetField("whse", entity.whse);
     row.SetField("whsename", entity.whsename);
     row.SetField("processmsg", entity.processmsg);
     row.SetField("transdttmz", entity.transdttmz);
     row.SetField("nodetails", entity.nodetails);
     row.SetField("custvendno", entity.custvendno);
     row.SetField("custvendnotesfl", entity.custvendnotesfl);
     row.SetField("shipto", entity.shipto);
     row.SetField("shiptonotesfl", entity.shiptonotesfl);
     row.SetField("shipfmno", entity.shipfmno);
     row.SetField("shiptoshipfmno", entity.shiptoshipfmno);
     row.SetField("name", entity.name);
     row.SetField("stagecdword", entity.stagecdword);
     row.SetField("transtype", entity.transtype);
     row.SetField("rwid", entity.rwid.ToByteArray());
 }