using System;
using System.Collections.Generic;
using System.Data;
using System.Data.OleDb;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Drawing;
using System.IO;
using System.Net.Mail;
using System.Configuration;

public partial class Default2 : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Session["Giris"] != "Yapıldı")
        {
            Response.Redirect("Giris.aspx");
        }

    }
    protected void Button1_Click(object sender, EventArgs e)
    {
        OleDbConnection Veritabani = new OleDbConnection();
        Veritabani.ConnectionString = "Provider=Microsoft.Jet.OleDb.4.0; Data Source=" + Server.MapPath("App_Data/BSoylu.mdb");
        Veritabani.Open();
            OleDbCommand Kayit = new OleDbCommand();
            Kayit.Connection = Veritabani;
            string tarih = DropDownList1.SelectedItem.Text + "." + DropDownList2.SelectedValue + "." + DropDownList3.SelectedItem.Text;
            string tarih2 = DropDownList5.SelectedItem.Text + "." + DropDownList6.SelectedValue + "." + DropDownList7.SelectedItem.Text;
            Kayit.CommandText = "Insert Into Veriler(Saat1,Saat2,Adi,Aciklama,Tarih2,Tarih,Renk) Values('" + DropDownList4.SelectedItem.Text.ToString() + "','" + DropDownList8.SelectedItem.Text.ToString() + "','" + txt_Baslik.Text.ToString() + "','" + txt_Icerik.Text.ToString() + "','" + tarih2.ToString() + "','" + tarih.ToString() + "','" + DropDownList9.SelectedValue.ToString() + "')";
            Kayit.ExecuteNonQuery();

       
        Veritabani.Close();
    }
}