C# da listbox Kodları

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;

namespace textbox2
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
string a;

private void button1_Click(object sender, EventArgs e)
{
a = Convert.ToString(textBox1.Text);
listBox1.Items.Add(a + ” ” + dateTimePicker1.Value.ToString());

textBox1.Clear();
}

private void button2_Click(object sender, EventArgs e)
{
listBox1.Items.Remove(listBox1.SelectedItem);
}

private void button3_Click(object sender, EventArgs e)
{
listBox1.Items.Clear();
}
}
}

C# da e-okul Sisteminin Kodları

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.SqlClient;

namespace e_okul

{

public partial class Form1 : Form

{

public Form2 frm2;

public Form3 frm3;

public Form1()

{

InitializeComponent();

frm2 = new Form2();

frm3 = new Form3();

}

private void button1_Click(object sender, EventArgs e)

{

if (textBox1.Text == “admin” && textBox2.Text == “1234″)

{

frm2.Show();

this.Hide();

}

else if (textBox1.Text == “ogrenci” && textBox2.Text == “1234″)

{

frm3.Show();

this.Hide();

}

else

MessageBox.Show(“Kullanıcı Adı Veya Şifre Yanlış”);

}

private void    kuladiTextBox_TextChanged(object sender, EventArgs e)

{

}

private void Form1_Load(object sender, EventArgs e)

{

this.AcceptButton = button1;

}

}

}