コード例 #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromVaspsectionaddsctn(ref DataRow row, Vaspsectionaddsctn entity)
 {
     row.SetField("shipprod", entity.shipprod);
     row.SetField("whse", entity.whse);
     row.SetField("verno", entity.verno);
     row.SetField("seqno", entity.seqno);
     row.SetField("sctncode", entity.sctncode);
     row.SetField("sctntype", entity.sctntype);
     row.SetField("vaautolnentryty", entity.vaautolnentryty);
     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("vaassemblyfl", entity.vaassemblyfl);
     row.SetField("vaassemblyty", entity.vaassemblyty);
     row.SetField("rowid-vasps", entity.rowidVasps.ToByteArray());
     row.SetField("userfield", entity.userfield);
 }
コード例 #2
0
        public static Vaspsectionaddsctn BuildVaspsectionaddsctnFromRow(DataRow row)
        {
            Vaspsectionaddsctn entity = new Vaspsectionaddsctn();

            entity.shipprod        = row.IsNull("shipprod") ? string.Empty : row.Field <string>("shipprod");
            entity.whse            = row.IsNull("whse") ? string.Empty : row.Field <string>("whse");
            entity.verno           = row.IsNull("verno") ? 0 : row.Field <int>("verno");
            entity.seqno           = row.IsNull("seqno") ? 0 : row.Field <int>("seqno");
            entity.sctncode        = row.IsNull("sctncode") ? string.Empty : row.Field <string>("sctncode");
            entity.sctntype        = row.IsNull("sctntype") ? string.Empty : row.Field <string>("sctntype");
            entity.vaautolnentryty = row.IsNull("vaautolnentryty") ? string.Empty : row.Field <string>("vaautolnentryty");
            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.vaassemblyfl    = row.Field <bool>("vaassemblyfl");
            entity.vaassemblyty    = row.IsNull("vaassemblyty") ? string.Empty : row.Field <string>("vaassemblyty");
            entity.rowidVasps      = row.Field <byte[]>("rowid-vasps").ToStringEncoded();
            entity.userfield       = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }