Пример #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromPoeilinesubsuper(ref DataRow row, Poeilinesubsuper entity)
 {
     row.SetField("poeirowid", entity.poeirowid.ToByteArray());
     row.SetField("prod", entity.prod);
     row.SetField("proddesc", entity.proddesc);
     row.SetField("vendprod", entity.vendprod);
     row.SetField("unit", entity.unit);
     row.SetField("dsplprice", entity.dsplprice);
     row.SetField("msdsfl", entity.msdsfl);
     row.SetField("notesfl", entity.notesfl);
     row.SetField("mfgprod", entity.mfgprod);
     row.SetField("userfield", entity.userfield);
 }
Пример #2
0
        public static Poeilinesubsuper BuildPoeilinesubsuperFromRow(DataRow row)
        {
            Poeilinesubsuper entity = new Poeilinesubsuper();

            entity.poeirowid = row.Field <byte[]>("poeirowid").ToStringEncoded();
            entity.prod      = row.IsNull("prod") ? string.Empty : row.Field <string>("prod");
            entity.proddesc  = row.IsNull("proddesc") ? string.Empty : row.Field <string>("proddesc");
            entity.vendprod  = row.IsNull("vendprod") ? string.Empty : row.Field <string>("vendprod");
            entity.unit      = row.IsNull("unit") ? string.Empty : row.Field <string>("unit");
            entity.dsplprice = row.IsNull("dsplprice") ? decimal.Zero : row.Field <decimal>("dsplprice");
            entity.msdsfl    = row.Field <bool>("msdsfl");
            entity.notesfl   = row.IsNull("notesfl") ? string.Empty : row.Field <string>("notesfl");
            entity.mfgprod   = row.IsNull("mfgprod") ? string.Empty : row.Field <string>("mfgprod");
            entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }