C# Ögrenci Not Ver Programi

C# Ögrenci Not Ver Programi

12. July 2009

Read this article in your language IT | EN | DE | ES

Merhaba Arkadaşlar Uzun bir aradan sonra sizlere kısa ve anlamlı bir  projeye başlamak istiyorum  bu projemde

basitbir ögrenci not ekleme programı  nasıl yaparız   onu görelim 

programda basitlikten önçe genelde kontrol  yapılarını nasıl kullanırız  onu örnek aldım  işlemlerimize başlıyalım;

 

  Projemizin Ana Görünümü 

  En alt kaynak  kodlarına  ulaşabilirsiniz

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 ArrayList
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        //Dizilerimizi Ekleyelim
        string[] Ogrenci;
        string[] not;
        // bu işlemde txt index of
        private void button1_Click(object sender, EventArgs e)
        {


//bu işlemde tanımlamış oldugum  YaziFormatim() method  istemiş olduğumuz format'tan farklıysa false dönecektir 

           if (!YaziFormatim())
            {
                MessageBox.Show("Geçersiz Karakter", "Uyarı", MessageBoxButtons.OK, MessageBoxIcon.Stop);
                txtadi.Focus();
                txtadi.Text = "";
            }
            OgrenciEkle();
        }
        // İstediğimiz şekilde  kontrolümüzü saglıyalım  şimdi bunun için bir
        private void Form1_Load(object sender, EventArgs e)
        {
            // dizim boyutunu  veriyorum 
            // not bir dizi  tanımlıyorsam  deger her zaman 0 başlar
            Ogrenci = new string[0];
            not = new string[0];
        }
        void OgrenciEkle()
        {
            // ögrenci ekle method
            Array.Resize(ref Ogrenci, Ogrenci.Length + 1);
            Ogrenci[Ogrenci.Length - 1] = txtadi.Text;
        }
        void listeyiver()
        {
            /// listbox listeyi  göster method
            listBox1.Items.Clear();
            for (int i = 0; i < Ogrenci.Length; i++)
            {
                listBox1.Items.Add(Ogrenci[i] + " " + not[i]);
            }
        }
        void NotEkle()
        {
            // not ekle method
            Array.Resize(ref not, not.Length + 1);
            not[not.Length - 1] = txtnot.Text;
        }
        private void btnliste_Click(object sender, EventArgs e)
        {
            // listeyiver method cagırıyorum
            listeyiver();
        }
        private void btnnot_Click(object sender, EventArgs e)
        {
            // nor ver method cagırıyorum
            NotEkle();
        }
// burda  bool bir tip  tanımlıyoruz  bool  tipler genelde  true yada false döner ,
        bool YaziFormatim()
        {
            bool sonuc = false;
            if (txtadi.Text.IndexOf(',') > -1)
            {
                sonuc = true;
            }
            return sonuc;
        }
    }
}


Evet Arkadaşlar bir makkalenin daha  sonuna gelmiş olduk  yeni makkale görüşmek üzere herkeze başarılar

Saygılarımla Orhan Türk 

ArrayList.rar (39,22 kb)

FacebookDigg It!DZone It!StumbleUponTechnoratiRedditDel.icio.usNewsVineFurlBlinkList

C# , Tüm Projelerim

Comments

5/22/2010 1:31:21 AM #
I am not much of a guy who thinks in so deeply about web design but I think your post had some valid points in it. Like designers are forced to design stuff within the limited code available and not go beyond it, their innovation is somewhat limited but still I think Web Design won't die! I agree that Amazon and other some big sites won't have a blog but now a days it's very important to have some sort of option available so people can quickly communicate their thoughts. I think Amazon if wants to shift it to that, they can get a customized CMS for themselves.
5/29/2010 10:57:13 AM #
Hello
You should check this out
http://www.youtube.com/watch?v=dTPv7JzIWFI

Add comment


(Will show your Gravatar icon)

  Country flag

biuquote
  • Comment
  • Preview
Loading



Sayfa 0.03125 saniyede yuklendi.