protected void Page_Load(object sender, EventArgs e) { EClient user = (EClient)Session["user"]; if (user != null) { welc.Text = "Hoşgeldin " + user.name + " ! İşte Yemeklerimiz"; welc.Visible = true; if (!IsPostBack) { ProductGrid.DataSource = BLLProduct.SelectProduct_Category(1); using (System.IO.StreamWriter file = new System.IO.StreamWriter(submittedFilePath, true)) { file.WriteLine("[" + DateTime.Now + "] DB PRODUCTS SELECTED BY CATEGORY"); } ProductGrid.DataBind(); aperatifGrid.DataSource = BLLProduct.SelectProduct_Category(2); using (System.IO.StreamWriter file = new System.IO.StreamWriter(submittedFilePath, true)) { file.WriteLine("[" + DateTime.Now + "] DB PRODUCTS SELECTED BY CATEGORY"); } aperatifGrid.DataBind(); IcecekGrid.DataSource = BLLProduct.SelectProduct_Category(3); using (System.IO.StreamWriter file = new System.IO.StreamWriter(submittedFilePath, true)) { file.WriteLine("[" + DateTime.Now + "] DB PRODUCTS SELECTED BY CATEGORY"); } IcecekGrid.DataBind(); tatlıGrid.DataSource = BLLProduct.SelectProduct_Category(4); using (System.IO.StreamWriter file = new System.IO.StreamWriter(submittedFilePath, true)) { file.WriteLine("[" + DateTime.Now + "] DB PRODUCTS SELECTED BY CATEGORY"); } tatlıGrid.DataBind(); } } else { welc.Visible = false; Response.Redirect("~/Default.aspx"); } }