Exemple #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromVaspsectionautocrt(ref DataRow row, Vaspsectionautocrt 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("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("sctntype", entity.sctntype);
     row.SetField("vaassemblyfl", entity.vaassemblyfl);
     row.SetField("vaassemblyty", entity.vaassemblyty);
     row.SetField("rowid-vasps", entity.rowidVasps.ToByteArray());
     row.SetField("userfield", entity.userfield);
 }
Exemple #2
0
        public static Vaspsectionautocrt BuildVaspsectionautocrtFromRow(DataRow row)
        {
            Vaspsectionautocrt entity = new Vaspsectionautocrt();

            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.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.sctntype     = row.IsNull("sctntype") ? string.Empty : row.Field <string>("sctntype");
            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);
        }