Ejemplo n.º 1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromVaheadercopy(ref DataRow row, Vaheadercopy entity)
 {
     row.SetField("vano", entity.vano);
     row.SetField("vasuf", entity.vasuf);
     row.SetField("notesfl", entity.notesfl);
     row.SetField("prodname", entity.prodname);
     row.SetField("transtype", entity.transtype);
     row.SetField("stagecd", entity.stagecd);
     row.SetField("stagedspl", entity.stagedspl);
     row.SetField("refer", entity.refer);
     row.SetField("convertto", entity.convertto);
     row.SetField("specnstype", entity.specnstype);
     row.SetField("newprod", entity.newprod);
     row.SetField("newprodnotesfl", entity.newprodnotesfl);
     row.SetField("newproddesc", entity.newproddesc);
     row.SetField("whse", entity.whse);
     row.SetField("savefl", entity.savefl);
     row.SetField("copycommentsfl", entity.copycommentsfl);
     row.SetField("copynotesfl", entity.copynotesfl);
     row.SetField("resetfl", entity.resetfl);
     row.SetField("capaddonfl", entity.capaddonfl);
     row.SetField("newvano", entity.newvano);
     row.SetField("newvasuf", entity.newvasuf);
     row.SetField("vaeh-rowid", entity.vaehRowid.ToByteArray());
     row.SetField("userfield", entity.userfield);
 }
Ejemplo n.º 2
0
        public static Vaheadercopy BuildVaheadercopyFromRow(DataRow row)
        {
            Vaheadercopy entity = new Vaheadercopy();

            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.prodname       = row.IsNull("prodname") ? string.Empty : row.Field <string>("prodname");
            entity.transtype      = row.IsNull("transtype") ? string.Empty : row.Field <string>("transtype");
            entity.stagecd        = row.IsNull("stagecd") ? 0 : row.Field <int>("stagecd");
            entity.stagedspl      = row.IsNull("stagedspl") ? string.Empty : row.Field <string>("stagedspl");
            entity.refer          = row.IsNull("refer") ? string.Empty : row.Field <string>("refer");
            entity.convertto      = row.IsNull("convertto") ? string.Empty : row.Field <string>("convertto");
            entity.specnstype     = row.IsNull("specnstype") ? string.Empty : row.Field <string>("specnstype");
            entity.newprod        = row.IsNull("newprod") ? string.Empty : row.Field <string>("newprod");
            entity.newprodnotesfl = row.IsNull("newprodnotesfl") ? string.Empty : row.Field <string>("newprodnotesfl");
            entity.newproddesc    = row.IsNull("newproddesc") ? string.Empty : row.Field <string>("newproddesc");
            entity.whse           = row.IsNull("whse") ? string.Empty : row.Field <string>("whse");
            entity.savefl         = row.Field <bool>("savefl");
            entity.copycommentsfl = row.Field <bool>("copycommentsfl");
            entity.copynotesfl    = row.Field <bool>("copynotesfl");
            entity.resetfl        = row.Field <bool>("resetfl");
            entity.capaddonfl     = row.Field <bool>("capaddonfl");
            entity.newvano        = row.IsNull("newvano") ? 0 : row.Field <int>("newvano");
            entity.newvasuf       = row.IsNull("newvasuf") ? 0 : row.Field <int>("newvasuf");
            entity.vaehRowid      = row.Field <byte[]>("vaeh-rowid").ToStringEncoded();
            entity.userfield      = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }