private void GetItem(int id) { SpellDAL tDAL = new SpellDAL(); DataTable dt = tDAL.SelectById(id); txbSpellName.Content = dt.Rows[0]["name"].ToString(); txbCastingTime.Content = dt.Rows[0]["castingtime"].ToString(); txbCastingNumber.Content = dt.Rows[0]["castingnumber"].ToString(); txbIngredient.Content = dt.Rows[0]["ingredient"].ToString(); txbDescription.Content = dt.Rows[0]["spelldescription"].ToString(); }