Example #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromValinehist(ref DataRow row, Valinehist entity)
 {
     row.SetField("boseqno", entity.boseqno);
     row.SetField("seqnoinfo", entity.seqnoinfo);
     row.SetField("seqno", entity.seqno);
     row.SetField("nonstockty", entity.nonstockty);
     row.SetField("stginfo", entity.stginfo);
     row.SetField("tieinfo", entity.tieinfo);
     row.SetField("qtyord", entity.qtyord);
     row.SetField("qtyship", entity.qtyship);
     row.SetField("pickeddt", entity.pickeddt);
     row.SetField("shipdt", entity.shipdt);
 }
Example #2
0
        public static Valinehist BuildValinehistFromRow(DataRow row)
        {
            Valinehist entity = new Valinehist();

            entity.boseqno    = row.IsNull("boseqno") ? 0 : row.Field <int>("boseqno");
            entity.seqnoinfo  = row.IsNull("seqnoinfo") ? string.Empty : row.Field <string>("seqnoinfo");
            entity.seqno      = row.IsNull("seqno") ? 0 : row.Field <int>("seqno");
            entity.nonstockty = row.IsNull("nonstockty") ? string.Empty : row.Field <string>("nonstockty");
            entity.stginfo    = row.IsNull("stginfo") ? string.Empty : row.Field <string>("stginfo");
            entity.tieinfo    = row.IsNull("tieinfo") ? string.Empty : row.Field <string>("tieinfo");
            entity.qtyord     = row.IsNull("qtyord") ? decimal.Zero : row.Field <decimal>("qtyord");
            entity.qtyship    = row.IsNull("qtyship") ? decimal.Zero : row.Field <decimal>("qtyship");
            entity.pickeddt   = row.Field <DateTime?>("pickeddt");
            entity.shipdt     = row.Field <DateTime?>("shipdt");
            return(entity);
        }