C# Film Arşivi Programı

C# Film Arşivi Programı

Form1

</pre>
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Data.OleDb;

namespace WindowsFormsApplication4
{
 public partial class Form1 : Form
 {
 public Form1()
 {
 InitializeComponent();
 }
 OleDbConnection baglanti = new OleDbConnection("Provider=Microsoft.Ace.Oledb.12.0;Data Source=film.accdb;");
 void goster()
 {
 baglanti.Open();
 OleDbDataAdapter getir = new OleDbDataAdapter("Select * From filmarsivi", baglanti);
 DataSet goster = new DataSet();
 getir.Fill(goster, "filmarsivi");
 dataGridView1.DataSource = goster.Tables["filmarsivi"];
 getir.Dispose();
 baglanti.Close();

}
 void goster1()
 {
 baglanti.Open();
 OleDbDataAdapter getir = new OleDbDataAdapter("Select * From filmarsivi order by filminadi ASC", baglanti);
 DataSet goster = new DataSet();
 getir.Fill(goster, "filmarsivi");
 dataGridView1.DataSource = goster.Tables["filmarsivi"];
 getir.Dispose();
 baglanti.Close();

}

private void textBox6_TextChanged(object sender, EventArgs e)
 {
 OleDbDataAdapter getir = new OleDbDataAdapter("Select * From filmarsivi", baglanti);
 baglanti.Open();
 getir.SelectCommand.CommandText = "Select * From filmarsivi" + " where(filminadi like'%" + textBox6.Text + "%')";
 DataSet goster = new DataSet();
 getir.Fill(goster, "filmarsivi");
 goster.Tables["filmarsivi"].Clear();
 dataGridView1.DataSource = goster.Tables["filmarsivi"];
 getir.Fill(goster, "filmarsivi");
 baglanti.Close();

}

private void button4_Click(object sender, EventArgs e)
 {
 OleDbDataAdapter getir = new OleDbDataAdapter("Select * From filmarsivi", baglanti);
 baglanti.Open();
 getir.SelectCommand.CommandText = "Select * From filmarsivi" + " where(filmintürü like'%" + comboBox5.Text + "%')";
 DataSet goster = new DataSet();
 getir.Fill(goster, "filmarsivi");
 goster.Tables["filmarsivi"].Clear();
 dataGridView1.DataSource = goster.Tables["filmarsivi"];
 getir.Fill(goster, "filmarsivi");
 baglanti.Close();

 }

private void Form1_Load(object sender, EventArgs e)
 {
 goster();

textBox9.Text = "FİLM ARŞİVİNE HOŞGELDİNİZ...FİLM ARŞİVİNE HOŞGELDİNİZ...FİLM ARŞİVİNE HOŞGELDİNİZ...FİLM ARŞİVİNE HOŞGELDİNİZ...".ToString();
 timer1.Start();
 }

private void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e)
 {
 int stırno = dataGridView1.SelectedCells[0].RowIndex;
 label12.Text = dataGridView1.Rows[stırno].Cells[0].Value.ToString();
 pictureBox1.ImageLocation = dataGridView1.Rows[stırno].Cells[7].Value.ToString();

}

private void dataGridView1_CellClick(object sender, DataGridViewCellEventArgs e)
 {
 int secili = dataGridView1.SelectedCells[0].RowIndex;
 textBox3.Text = dataGridView1.Rows[secili].Cells[0].Value.ToString();
 textBox4.Text = dataGridView1.Rows[secili].Cells[1].Value.ToString();
 textBox5.Text = dataGridView1.Rows[secili].Cells[2].Value.ToString();
 textBox7.Text = dataGridView1.Rows[secili].Cells[3].Value.ToString();
 comboBox3.Text = dataGridView1.Rows[secili].Cells[4].Value.ToString();
 textBox8.Text = dataGridView1.Rows[secili].Cells[5].Value.ToString();
 pictureBox1.ImageLocation = dataGridView1.Rows[secili].Cells[7].Value.ToString();
 dateTimePicker1.Text = dataGridView1.Rows[secili].Cells[6].Value.ToString();

&nbsp;

}

private void button1_Click_1(object sender, EventArgs e)
 {
 if (textBox1.Text == "admin" && textBox2.Text == "123")
 {

Form2 frm = new Form2();
 frm.Show();
 this.Hide();
 }
 else
 {
 }

}

private void button2_Click_1(object sender, EventArgs e)
 {
 goster1();
 }

private void timer1_Tick(object sender, EventArgs e)
 {
 textBox9.Text = textBox9.Text.Substring(1) + textBox9.Text.Substring(0, 1);
 }

}
}
<pre>

Form2(Kullanıcı Girişi)

2.834 defa okundu.

3 yorum

  1. Melda YEŞİL Yanıtla

    çok güzel olmuş.yapanın eline sağlık takip etmeye devam edeceğim sizi. :-* bu programı mail adresime atarsanız sevinirim

Bir Cevap Yazın

E-posta hesabınız yayımlanmayacak. Gerekli alanlar * ile işaretlenmişlerdir