Exemplo n.º 1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromWmscsearchresults(ref DataRow row, Wmscsearchresults entity)
 {
     row.SetField("maxqty", entity.maxqty);
     row.SetField("sizetype", entity.sizetype);
     row.SetField("prod", entity.prod);
     row.SetField("whse", entity.whse);
     row.SetField("productnotes", entity.productnotes);
     row.SetField("proddesc1", entity.proddesc1);
     row.SetField("proddesc2", entity.proddesc2);
     row.SetField("unitstock", entity.unitstock);
     row.SetField("operinit", entity.operinit);
     row.SetField("transdt", entity.transdt);
     row.SetField("transproc", entity.transproc);
     row.SetField("transtm", entity.transtm);
     row.SetField("typecd", entity.typecd);
     row.SetField("user1", entity.user1);
     row.SetField("user2", entity.user2);
     row.SetField("user3", entity.user3);
     row.SetField("user4", entity.user4);
     row.SetField("user5", entity.user5);
     row.SetField("user6", entity.user6);
     row.SetField("user7", entity.user7);
     row.SetField("user8", entity.user8);
     row.SetField("user9", entity.user9);
     row.SetField("rowid-wmsc", entity.rowidWmsc.ToByteArray());
     row.SetField("userfield", entity.userfield);
 }
Exemplo n.º 2
0
        public static Wmscsearchresults BuildWmscsearchresultsFromRow(DataRow row)
        {
            Wmscsearchresults entity = new Wmscsearchresults();

            entity.maxqty       = row.IsNull("maxqty") ? decimal.Zero : row.Field <decimal>("maxqty");
            entity.sizetype     = row.IsNull("sizetype") ? string.Empty : row.Field <string>("sizetype");
            entity.prod         = row.IsNull("prod") ? string.Empty : row.Field <string>("prod");
            entity.whse         = row.IsNull("whse") ? string.Empty : row.Field <string>("whse");
            entity.productnotes = row.IsNull("productnotes") ? string.Empty : row.Field <string>("productnotes");
            entity.proddesc1    = row.IsNull("proddesc1") ? string.Empty : row.Field <string>("proddesc1");
            entity.proddesc2    = row.IsNull("proddesc2") ? string.Empty : row.Field <string>("proddesc2");
            entity.unitstock    = row.IsNull("unitstock") ? string.Empty : row.Field <string>("unitstock");
            entity.operinit     = row.IsNull("operinit") ? string.Empty : row.Field <string>("operinit");
            entity.transdt      = row.Field <DateTime?>("transdt");
            entity.transproc    = row.IsNull("transproc") ? string.Empty : row.Field <string>("transproc");
            entity.transtm      = row.IsNull("transtm") ? string.Empty : row.Field <string>("transtm");
            entity.typecd       = row.IsNull("typecd") ? string.Empty : row.Field <string>("typecd");
            entity.user1        = row.IsNull("user1") ? string.Empty : row.Field <string>("user1");
            entity.user2        = row.IsNull("user2") ? string.Empty : row.Field <string>("user2");
            entity.user3        = row.IsNull("user3") ? string.Empty : row.Field <string>("user3");
            entity.user4        = row.IsNull("user4") ? string.Empty : row.Field <string>("user4");
            entity.user5        = row.IsNull("user5") ? string.Empty : row.Field <string>("user5");
            entity.user6        = row.Field <decimal?>("user6");
            entity.user7        = row.Field <decimal?>("user7");
            entity.user8        = row.Field <DateTime?>("user8");
            entity.user9        = row.Field <DateTime?>("user9");
            entity.rowidWmsc    = row.Field <byte[]>("rowid-wmsc").ToStringEncoded();
            entity.userfield    = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }