Exemplo n.º 1
0
        public static Poblanketresults BuildPoblanketresultsFromRow(DataRow row)
        {
            Poblanketresults entity = new Poblanketresults();

            entity.pono        = row.IsNull("pono") ? 0 : row.Field <int>("pono");
            entity.posuf       = row.IsNull("posuf") ? 0 : row.Field <int>("posuf");
            entity.ponox       = row.IsNull("ponox") ? string.Empty : row.Field <string>("ponox");
            entity.ponotesfl   = row.IsNull("ponotesfl") ? string.Empty : row.Field <string>("ponotesfl");
            entity.transtype   = row.IsNull("transtype") ? string.Empty : row.Field <string>("transtype");
            entity.stagecd     = row.IsNull("stagecd") ? 0 : row.Field <int>("stagecd");
            entity.stagecdx    = row.IsNull("stagecdx") ? string.Empty : row.Field <string>("stagecdx");
            entity.vendno      = row.IsNull("vendno") ? decimal.Zero : row.Field <decimal>("vendno");
            entity.vendnotesfl = row.IsNull("vendnotesfl") ? string.Empty : row.Field <string>("vendnotesfl");
            entity.shipfmno    = row.IsNull("shipfmno") ? 0 : row.Field <int>("shipfmno");
            entity.name        = row.IsNull("name") ? string.Empty : row.Field <string>("name");
            entity.shiptowhse  = row.IsNull("shiptowhse") ? string.Empty : row.Field <string>("shiptowhse");
            entity.billtowhse  = row.IsNull("billtowhse") ? string.Empty : row.Field <string>("billtowhse");
            entity.orderdt     = row.Field <DateTime?>("orderdt");
            entity.shipviaty   = row.IsNull("shipviaty") ? string.Empty : row.Field <string>("shipviaty");
            entity.descrip     = row.IsNull("descrip") ? string.Empty : row.Field <string>("descrip");
            entity.peehrowid   = row.Field <byte[]>("peehrowid").ToStringEncoded();
            entity.apsvrowid   = row.Field <byte[]>("apsvrowid").ToStringEncoded();
            entity.apssrowid   = row.Field <byte[]>("apssrowid").ToStringEncoded();
            return(entity);
        }
Exemplo n.º 2
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromPoblanketresults(ref DataRow row, Poblanketresults entity)
 {
     row.SetField("pono", entity.pono);
     row.SetField("posuf", entity.posuf);
     row.SetField("ponox", entity.ponox);
     row.SetField("ponotesfl", entity.ponotesfl);
     row.SetField("transtype", entity.transtype);
     row.SetField("stagecd", entity.stagecd);
     row.SetField("stagecdx", entity.stagecdx);
     row.SetField("vendno", entity.vendno);
     row.SetField("vendnotesfl", entity.vendnotesfl);
     row.SetField("shipfmno", entity.shipfmno);
     row.SetField("name", entity.name);
     row.SetField("shiptowhse", entity.shiptowhse);
     row.SetField("billtowhse", entity.billtowhse);
     row.SetField("orderdt", entity.orderdt);
     row.SetField("shipviaty", entity.shipviaty);
     row.SetField("descrip", entity.descrip);
     row.SetField("peehrowid", entity.peehrowid.ToByteArray());
     row.SetField("apsvrowid", entity.apsvrowid.ToByteArray());
     row.SetField("apssrowid", entity.apssrowid.ToByteArray());
 }