using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.Profile;
using Oracle.Web.Profile;
using System.Data;

namespace VEtterem
{
    public partial class ItemDetails : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            
        }

        protected void NoteszbeImageButton_Click(object sender, ImageClickEventArgs e)
        {   
            
            DataView dv = (DataView)ItemSqlDataSource.Select(DataSourceSelectArguments.Empty);
            DataRowCollection drc = dv.Table.Rows;
            DataRow dr = drc[0]; //Biztos, hogy csak egy sort ad vissza, mert úgymond egy konkrét id-ra keresünk            

            int eID = Int32.Parse(dr["EtlapID"].ToString());
            string nev = dr["ENEV"].ToString();
            int ar = Int32.Parse(dr["AR"].ToString());
            int mennyiseg = Int32.Parse(((TextBox)DetailsView1.FindControl("TextBox1")).Text);
            
            Kosar.Kosar kosar = (Kosar.Kosar)Session["Kosar"];
            if (kosar != null)
                kosar.Berak(eID, nev, ar, mennyiseg);
            
        }

        
    }
}
