Ejemplo n.º 1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromValueaddlookupresults(ref DataRow row, Valueaddlookupresults entity)
 {
     row.SetField("whse", entity.whse);
     row.SetField("vano", entity.vano);
     row.SetField("vasuf", entity.vasuf);
     row.SetField("notesfl", entity.notesfl);
     row.SetField("shipprod", entity.shipprod);
     row.SetField("qtyord", entity.qtyord);
     row.SetField("enterdt", entity.enterdt);
     row.SetField("transtype", entity.transtype);
     row.SetField("stagecd", entity.stagecd);
     row.SetField("stagecdword", entity.stagecdword);
     row.SetField("nonstockty", entity.nonstockty);
     row.SetField("proddescrip", entity.proddescrip);
     row.SetField("icspnotesfl", entity.icspnotesfl);
     row.SetField("serialfl", entity.serialfl);
     row.SetField("lotfl", entity.lotfl);
     row.SetField("wmfl", entity.wmfl);
     row.SetField("vaeh-rowid", entity.vaehRowid.ToByteArray());
 }
Ejemplo n.º 2
0
        public static Valueaddlookupresults BuildValueaddlookupresultsFromRow(DataRow row)
        {
            Valueaddlookupresults entity = new Valueaddlookupresults();

            entity.whse        = row.IsNull("whse") ? string.Empty : row.Field <string>("whse");
            entity.vano        = row.IsNull("vano") ? 0 : row.Field <int>("vano");
            entity.vasuf       = row.IsNull("vasuf") ? 0 : row.Field <int>("vasuf");
            entity.notesfl     = row.IsNull("notesfl") ? string.Empty : row.Field <string>("notesfl");
            entity.shipprod    = row.IsNull("shipprod") ? string.Empty : row.Field <string>("shipprod");
            entity.qtyord      = row.IsNull("qtyord") ? decimal.Zero : row.Field <decimal>("qtyord");
            entity.enterdt     = row.Field <DateTime?>("enterdt");
            entity.transtype   = row.IsNull("transtype") ? string.Empty : row.Field <string>("transtype");
            entity.stagecd     = row.IsNull("stagecd") ? 0 : row.Field <int>("stagecd");
            entity.stagecdword = row.IsNull("stagecdword") ? string.Empty : row.Field <string>("stagecdword");
            entity.nonstockty  = row.IsNull("nonstockty") ? string.Empty : row.Field <string>("nonstockty");
            entity.proddescrip = row.IsNull("proddescrip") ? string.Empty : row.Field <string>("proddescrip");
            entity.icspnotesfl = row.IsNull("icspnotesfl") ? string.Empty : row.Field <string>("icspnotesfl");
            entity.serialfl    = row.Field <bool>("serialfl");
            entity.lotfl       = row.Field <bool>("lotfl");
            entity.wmfl        = row.Field <bool>("wmfl");
            entity.vaehRowid   = row.Field <byte[]>("vaeh-rowid").ToStringEncoded();
            return(entity);
        }