예제 #1
0
        public static Vaspheaderlistresults BuildVaspheaderlistresultsFromRow(DataRow row)
        {
            Vaspheaderlistresults entity = new Vaspheaderlistresults();

            entity.cVANotes     = row.IsNull("cVANotes") ? string.Empty : row.Field <string>("cVANotes");
            entity.shipprod     = row.IsNull("shipprod") ? string.Empty : row.Field <string>("shipprod");
            entity.whse         = row.IsNull("whse") ? string.Empty : row.Field <string>("whse");
            entity.nodaysfab    = row.IsNull("nodaysfab") ? 0 : row.Field <int>("nodaysfab");
            entity.refer        = row.IsNull("refer") ? string.Empty : row.Field <string>("refer");
            entity.cProdNotes   = row.IsNull("cProdNotes") ? string.Empty : row.Field <string>("cProdNotes");
            entity.descrip      = row.IsNull("descrip") ? string.Empty : row.Field <string>("descrip");
            entity.proddesc     = row.IsNull("proddesc") ? string.Empty : row.Field <string>("proddesc");
            entity.proddesc2    = row.IsNull("proddesc2") ? string.Empty : row.Field <string>("proddesc2");
            entity.whsedesc     = row.IsNull("whsedesc") ? string.Empty : row.Field <string>("whsedesc");
            entity.user1        = row.IsNull("user1") ? string.Empty : row.Field <string>("user1");
            entity.user2        = row.IsNull("user2") ? string.Empty : row.Field <string>("user2");
            entity.catfl        = row.Field <bool>("catfl");
            entity.vaassemblyfl = row.Field <bool>("vaassemblyfl");
            entity.vaassemblyty = row.IsNull("vaassemblyty") ? string.Empty : row.Field <string>("vaassemblyty");
            entity.verno        = row.IsNull("verno") ? 0 : row.Field <int>("verno");
            entity.verrefer     = row.IsNull("verrefer") ? string.Empty : row.Field <string>("verrefer");
            entity.vercrtdt     = row.Field <DateTime?>("vercrtdt");
            entity.rowid        = row.Field <byte[]>("rowid").ToStringEncoded();
            entity.userfield    = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }
예제 #2
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromVaspheaderlistresults(ref DataRow row, Vaspheaderlistresults entity)
 {
     row.SetField("cVANotes", entity.cVANotes);
     row.SetField("shipprod", entity.shipprod);
     row.SetField("whse", entity.whse);
     row.SetField("nodaysfab", entity.nodaysfab);
     row.SetField("refer", entity.refer);
     row.SetField("cProdNotes", entity.cProdNotes);
     row.SetField("descrip", entity.descrip);
     row.SetField("proddesc", entity.proddesc);
     row.SetField("proddesc2", entity.proddesc2);
     row.SetField("whsedesc", entity.whsedesc);
     row.SetField("user1", entity.user1);
     row.SetField("user2", entity.user2);
     row.SetField("catfl", entity.catfl);
     row.SetField("vaassemblyfl", entity.vaassemblyfl);
     row.SetField("vaassemblyty", entity.vaassemblyty);
     row.SetField("verno", entity.verno);
     row.SetField("verrefer", entity.verrefer);
     row.SetField("vercrtdt", entity.vercrtdt);
     row.SetField("rowid", entity.rowid.ToByteArray());
     row.SetField("userfield", entity.userfield);
 }