Ejemplo n.º 1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromPtxqueuebatchdetailresults(ref DataRow row, Ptxqueuebatchdetailresults entity)
 {
     row.SetField("transtype", entity.transtype);
     row.SetField("doctype", entity.doctype);
     row.SetField("orderno", entity.orderno);
     row.SetField("ordersuf", entity.ordersuf);
     row.SetField("ordernotesfl", entity.ordernotesfl);
     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("rwid", entity.rwid.ToByteArray());
     row.SetField("createproc", entity.createproc);
     row.SetField("seqno", entity.seqno);
 }
Ejemplo n.º 2
0
        public static Ptxqueuebatchdetailresults BuildPtxqueuebatchdetailresultsFromRow(DataRow row)
        {
            Ptxqueuebatchdetailresults entity = new Ptxqueuebatchdetailresults();

            entity.transtype       = row.IsNull("transtype") ? string.Empty : row.Field <string>("transtype");
            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.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.rwid            = row.Field <byte[]>("rwid").ToStringEncoded();
            entity.createproc      = row.IsNull("createproc") ? string.Empty : row.Field <string>("createproc");
            entity.seqno           = row.IsNull("seqno") ? 0 : row.Field <int>("seqno");
            return(entity);
        }