private List<CurrencyStamp> GetCurrencyStamps()
        {
            List<CurrencyStamp> stampsAll = null;

            using (CurrencyDbContext context = new CurrencyDbContext())
            {
                stampsAll = context.CurrencyStamps.ToList();
            }

            return stampsAll;
        }
Exemplo n.º 2
0
        protected void RefreshButton_Click(object sender, EventArgs e)
        {
            using (CurrencyDbContext context = new CurrencyDbContext())
            {
                List<CurrencyStamp> stamps = context.CurrencyStamps.ToList();

                if (!IsPostBack)
                {
                    StampDataRepeater.DataSource = stamps;
                    StampDataRepeater.DataBind();
                }
            }
        }
Exemplo n.º 3
0
 private void InitDatabase()
 {
     _currencyDbContext = new CurrencyDbContext();
 }