コード例 #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromVaspsectionlistresults(ref DataRow row, Vaspsectionlistresults entity)
 {
     row.SetField("codedesc", entity.codedesc);
     row.SetField("destdesc", entity.destdesc);
     row.SetField("dseqno", entity.dseqno);
     row.SetField("notesfl", entity.notesfl);
     row.SetField("nonstockfl", entity.nonstockfl);
     row.SetField("sctncode", entity.sctncode);
     row.SetField("sctntype", entity.sctntype);
     row.SetField("seqno", entity.seqno);
     row.SetField("shipprod", entity.shipprod);
     row.SetField("whse", entity.whse);
     row.SetField("vaassemblyfl", entity.vaassemblyfl);
     row.SetField("vaassemblyty", entity.vaassemblyty);
     row.SetField("verno", entity.verno);
     row.SetField("rowid", entity.rowid.ToByteArray());
     row.SetField("userfield", entity.userfield);
     row.SetField("brandcode", entity.brandcode);
     row.SetField("mfgprod", entity.mfgprod);
     row.SetField("vendprod", entity.vendprod);
 }
コード例 #2
0
        public static Vaspsectionlistresults BuildVaspsectionlistresultsFromRow(DataRow row)
        {
            Vaspsectionlistresults entity = new Vaspsectionlistresults();

            entity.codedesc     = row.IsNull("codedesc") ? string.Empty : row.Field <string>("codedesc");
            entity.destdesc     = row.IsNull("destdesc") ? string.Empty : row.Field <string>("destdesc");
            entity.dseqno       = row.IsNull("dseqno") ? decimal.Zero : row.Field <decimal>("dseqno");
            entity.notesfl      = row.IsNull("notesfl") ? string.Empty : row.Field <string>("notesfl");
            entity.nonstockfl   = row.Field <bool>("nonstockfl");
            entity.sctncode     = row.IsNull("sctncode") ? string.Empty : row.Field <string>("sctncode");
            entity.sctntype     = row.IsNull("sctntype") ? string.Empty : row.Field <string>("sctntype");
            entity.seqno        = row.IsNull("seqno") ? 0 : row.Field <int>("seqno");
            entity.shipprod     = row.IsNull("shipprod") ? string.Empty : row.Field <string>("shipprod");
            entity.whse         = row.IsNull("whse") ? string.Empty : row.Field <string>("whse");
            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.rowid        = row.Field <byte[]>("rowid").ToStringEncoded();
            entity.userfield    = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            entity.brandcode    = row.IsNull("brandcode") ? string.Empty : row.Field <string>("brandcode");
            entity.mfgprod      = row.IsNull("mfgprod") ? string.Empty : row.Field <string>("mfgprod");
            entity.vendprod     = row.IsNull("vendprod") ? string.Empty : row.Field <string>("vendprod");
            return(entity);
        }