Personel Kaydı ve Maaş Hesaplama C#

Personel Kaydı ve Maaş Hesaplama C#personel

[code language=”CSharp”]
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}

private void button1_Click(object sender, EventArgs e)
{
listBox1.Items.Add(textBox1.Text.PadRight(15, ‘ ‘) + textBox2.Text.PadRight(15, ‘ ‘) + textBox3.Text.PadRight(15, ‘ ‘) + textBox4.Text.PadRight(15, ‘ ‘));
listBox1.Font = new Font("Courier New", 10, FontStyle.Regular);
}

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

private void button3_Click(object sender, EventArgs e)
{
Close();
}

private void button4_Click(object sender, EventArgs e)
{
string ad;
string[] str;
ad = textBox1.Text;
str = ad.Split(‘ ‘);

if (str.Length == 1)
MessageBox.Show("Lütfen Soyadı Giriniz");
else
textBox1.Text = str[0] + " " + str[1].ToUpper();
}

private void button5_Click(object sender, EventArgs e)
{
string b;
b = textBox2.Text;
textBox2.Text = b.ToUpper(); //metni büyütüyor
}

private void button6_Click(object sender, EventArgs e)
{
int gun, yev, mas;
gun = Convert.ToInt32(textBox5.Text);
yev = Convert.ToInt32(textBox6.Text);
mas = gun * yev;
MessageBox.Show(" Maaşınız " + mas + " TL");
}

private void Form1_Load(object sender, EventArgs e)
{
label5.Text = string.Format("Bugün Ayın {0:f}", DateTime.Now);
}

private void textBox3_KeyPress(object sender, KeyPressEventArgs e)
{
if ((char.IsDigit(e.KeyChar) == false) && (e.KeyChar != (char)08))
e.Handled = true;
}

private void textBox6_KeyPress(object sender, KeyPressEventArgs e)
{
if ((char.IsDigit(e.KeyChar) == false) && (e.KeyChar != (char)08))
e.Handled = true;
}
}[/code]

Projeyi İNDİR

Yorumlar 2

  • if ((char.IsDigit(e.KeyChar) == false) && (e.KeyChar != (char)08))
    e.Handled = true;
    bu komut ve
    if ((char.IsDigit(e.KeyChar) == false) && (e.KeyChar != (char)08))
    e.Handled = true;
    bu komut yanlış oluyor

  • mehmet :
    Kodlarda herhangi bir sıkıntı yok.Kodu hangi olaya yazdığına dikkat et.
    yukarıdaki Projeyi İNDİR linkinden projeyi indirip inceleyebilirsin.

Bir yanıt yazın

E-posta adresiniz yayınlanmayacak. Gerekli alanlar * ile işaretlenmişlerdir