TurkHackTeam Yönetici Takip Programı Yapımı

S0N3KRON

Yeni üye
26 May 2024
7
28
localhost/\127.0.0.1
Selamlar,

Bugün sizlere forum için yapmış olduğum TurkHackTeam Yönetici Takip Programını tanıtacağım.


5aE7rL.png

Programda C# ve Sql Server Kullanıldı.
5aE7rL.png

Öncelikle yapmamız gereken SQL serverı projemize bağlamak.
Ben bu işlemleri tekrarlamamak için bir class oluşturdum.

pixkpr8.PNG

Kendi sql bağlantınızı karaladığım yere yazabilirsiniz.


ky2lu8m.PNG


SQL server da proje için açmış olduğum tablolar.
5aE7rL.png
ANASAYFA TASARIMI
2fx0knx.PNG

Anasayfayı DevExpressin bize sağlamış olduğu eklentileri kullanarak kendim için revize ettim.

5aE7rL.png
ANASAYFA KODLARI​
Kod:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace Otomasyon
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }
        Frmkullanici fr;
        Frmudy fr1;
        Frmarge fr2;
        Frmmod fr3;
        Frmblue fr4;
        Frmistihbarat fr5;
        Frmanka fr6;
        Frmtasarım fr7;
        Frmbasın fr8;
        private void barButtonItem7_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            if (fr6 == null || fr6.IsDisposed)
            {
                fr6 = new Frmanka();
                fr6.MdiParent = this;
                fr6.Show();
            }
        }

        private void barButtonItem9_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            if (fr8 == null || fr8.IsDisposed)
            {
                fr8 = new Frmbasın();
                fr8.MdiParent = this;
                fr8.Show();
            }
        }

        private void Form1_Load(object sender, EventArgs e)
        {

        }
        
        private void barButtonItem1_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            if (fr == null || fr.IsDisposed)
            {
                fr = new Frmkullanici();
                fr.MdiParent = this;
                fr.Show();
            }
        }
        
        private void btnudy_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            if (fr1 == null || fr1.IsDisposed)
            {
                fr1 = new Frmudy();
                fr1.MdiParent = this;
                fr1.Show();
            }
        }

        private void btnarge_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            if (fr2 == null || fr2.IsDisposed)
            {
                fr2 = new Frmarge();
                fr2.MdiParent = this;
                fr2.Show();
            }
        }

        private void btnmod_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            if (fr3 == null || fr3.IsDisposed)
            {
                fr3 = new Frmmod();
                fr3.MdiParent = this;
                fr3.Show();
            }
        }

        private void btnblue_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            if (fr4 == null || fr4.IsDisposed)
            {
                fr4 = new Frmblue();
                fr4.MdiParent = this;
                fr4.Show();
            }
        }

        private void btnistihbarat_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            if (fr5 == null || fr5.IsDisposed)
            {
                fr5 = new Frmistihbarat();
                fr5.MdiParent = this;
                fr5.Show();
            }
        }

        private void btntasarim_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            if (fr7 == null || fr7.IsDisposed)
            {
                fr7 = new Frmtasarım();
                fr7.MdiParent = this;
                fr7.Show();
            }
        }

        private void Form1_FormClosed(object sender, FormClosedEventArgs e)
        {
        }
    }
}

Sayfayı açmak için butona tıkladığımızda bir daha aynı sayfa açılmasın ve sayfayı tekrar açmak için yazmış olduğum kodlar yukardaki gibidir.
5aE7rL.png


ÜDY SAYFA TASARIMI VE KAYNAK KODLARI
4x6kabq.PNG


5aE7rL.png

ÜST DÜZEY YÖNETİM SAYFASI KAYNAK KODLARI
Kod:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Data.SqlClient;

namespace Otomasyon
{
    public partial class Frmudy : Form
    {
        public Frmudy()
        {
            InitializeComponent();
        }
        sqlbaglantisi bgl = new sqlbaglantisi();

        void listele()
        {
            DataTable dt = new DataTable();
            SqlDataAdapter da = new SqlDataAdapter("Select * From ÜDY", bgl.baglanti());
            da.Fill(dt);
            gridControl1.DataSource = dt;
        }

        private void simpleButton1_Click(object sender, EventArgs e)
        {
            //Verileri Kaydetme
            SqlCommand komut = new SqlCommand("insert into ÜDY (KULLANICIADI,RÜTBE,GÖREVLENDİRME) values (@p1,@p2,@p3)", bgl.baglanti());
            komut.Parameters.AddWithValue("@p1", txtkullanici.Text);//kullanıcıadı
            komut.Parameters.AddWithValue("@p2", comboBox1.Text);//rütbe
            komut.Parameters.AddWithValue("@p3", richTextBox1.Text); //görevlendirme
            komut.ExecuteNonQuery();
            bgl.baglanti().Close();
            MessageBox.Show("Kullanıcı Sisteme Eklendi!", "Bilgi", MessageBoxButtons.OK, MessageBoxIcon.Information);
            listele();
        }

        private void Frmudy_Load(object sender, EventArgs e)
        {
            listele();
        }

        private void btnsil_Click(object sender, EventArgs e)
        {
            SqlCommand komutsil = new SqlCommand("Delete From ÜDY where KULLANICIADI=@p1", bgl.baglanti());
            komutsil.Parameters.AddWithValue("@p1", txtkullanici.Text);
            komutsil.ExecuteNonQuery();
            bgl.baglanti().Close();
            MessageBox.Show("Kullanıcı Sistemden Silindi!", "Bilgi", MessageBoxButtons.OK, MessageBoxIcon.Error);
            listele();
        }

        private void gridView1_FocusedRowChanged(object sender, DevExpress.XtraGrid.Views.Base.FocusedRowChangedEventArgs e)
        {
            DataRow dr = gridView1.GetDataRow(gridView1.FocusedRowHandle);
            txtkullanici.Text = dr["KULLANICIADI"].ToString();
            comboBox1.Text = dr["RÜTBE"].ToString();
            richTextBox1.Text = dr["GÖREVLENDİRME"].ToString();
        }

        private void btnguncelle_Click(object sender, EventArgs e)
        {
            SqlCommand komut = new SqlCommand("update ÜDY set KULLANICIADI=@p1, RÜTBE=@p2, GÖREVLENDİRME=@p3 where KULLANICIADI=@p1", bgl.baglanti());
            komut.Parameters.AddWithValue("@p1", txtkullanici.Text);
            komut.Parameters.AddWithValue("@p2", comboBox1.Text);
            komut.Parameters.AddWithValue("@p3", richTextBox1.Text);
            komut.ExecuteNonQuery();
            bgl.baglanti().Close();
            MessageBox.Show("Kullanıcı Güncellendi!", "Bilgi", MessageBoxButtons.OK, MessageBoxIcon.Warning);
            listele();
        }
    }
}
Üdy için sadece kullanıcı adı giriş yeri ve rütbesini yazıp kaydedip,silip veya güncelleyebiliriz.

5aE7rL.png


Eski Yöneticiler Sayfası Ve Kaynak Kodları

2wzcjf3.PNG


Kod:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Data.SqlClient;

namespace Otomasyon
{
    public partial class Frmkullanici : Form
    {
        public Frmkullanici()
        {
            InitializeComponent();
        }
        sqlbaglantisi  bgl = new sqlbaglantisi();

        void listele()
        {
            DataTable dt = new DataTable();
            SqlDataAdapter da = new SqlDataAdapter("Select * From kullaniciara", bgl.baglanti());
            da.Fill(dt);
            gridControl1.DataSource = dt;
        }
        private void gridControl1_Click(object sender, EventArgs e)
        {

        }

        private void Frmkullanici_Load(object sender, EventArgs e)
        {
            listele();
        }

        private void simpleButton1_Click(object sender, EventArgs e)
        {
            //Verileri Kaydetme
            SqlCommand komut = new SqlCommand("insert into kullaniciara (KULLANICIAD,TİM,YAŞ,RÜTBE,GİRİŞZAMANI,ÇIKIŞZAMANI,DETAY) values (@p1,@p2,@p3,@p4,@p5,@p6,@p7)", bgl.baglanti());
            komut.Parameters.AddWithValue("@p1", txtkullanici.Text);
            komut.Parameters.AddWithValue("@p2", comboBox2.Text);
            komut.Parameters.AddWithValue("@p3", maskedTextBox1.Text);
            komut.Parameters.AddWithValue("@p4", comboBox1.Text);
            komut.Parameters.AddWithValue("@p5", maskedTextBox2.Text);
            komut.Parameters.AddWithValue("@p6", maskedTextBox3.Text);
            komut.Parameters.AddWithValue("@p7", richTextBox1.Text);
            komut.ExecuteNonQuery();
            bgl.baglanti().Close();
            MessageBox.Show("Kullanıcı Sisteme Eklendi!", "Bilgi", MessageBoxButtons.OK, MessageBoxIcon.Information);
            listele();
        }

        private void btnsil_Click(object sender, EventArgs e)
        {
            SqlCommand komutsil = new SqlCommand("Delete From kullaniciara where KULLANICIAD=@p1", bgl.baglanti());
            komutsil.Parameters.AddWithValue("@p1", txtkullanici.Text);
            komutsil.ExecuteNonQuery();
            bgl.baglanti().Close();
            MessageBox.Show("Kullanıcı Sistemden Silindi!","Bilgi",MessageBoxButtons.OK, MessageBoxIcon.Error);
            listele();
        }

        private void gridView1_FocusedRowChanged(object sender, DevExpress.XtraGrid.Views.Base.FocusedRowChangedEventArgs e)
        {
            DataRow dr = gridView1.GetDataRow(gridView1.FocusedRowHandle);
            txtkullanici.Text = dr["KULLANICIAD"].ToString();
            comboBox2.Text = dr["TİM"].ToString();
            maskedTextBox1.Text = dr["YAŞ"].ToString();
            comboBox1.Text = dr["RÜTBE"].ToString();
            maskedTextBox2.Text = dr["GİRİŞZAMANI"].ToString();
            maskedTextBox3.Text = dr["ÇIKIŞZAMANI"].ToString();
            richTextBox1.Text = dr["DETAY"].ToString();
        }

        private void btnguncelle_Click(object sender, EventArgs e)
        {
            SqlCommand komut = new SqlCommand("update kullaniciara set KULLANICIAD=@p1, TİM=@p2, YAŞ=@p3, RÜTBE=@p4, GİRİŞZAMANI=@p5, ÇIKIŞZAMANI=@p6, DETAY=@p7 where KULLANICIAD=@p1", bgl.baglanti());
            komut.Parameters.AddWithValue("@p1", txtkullanici.Text);
            komut.Parameters.AddWithValue("@p2", comboBox2.Text);
            komut.Parameters.AddWithValue("@p3", maskedTextBox1.Text);
            komut.Parameters.AddWithValue("@p4", comboBox1.Text);
            komut.Parameters.AddWithValue("@p5", maskedTextBox2.Text);
            komut.Parameters.AddWithValue("@p6", maskedTextBox3.Text);
            komut.Parameters.AddWithValue("@p7", richTextBox1.Text);
            komut.ExecuteNonQuery();
            bgl.baglanti().Close();
            MessageBox.Show("Kullanıcı Güncellendi!", "Bilgi", MessageBoxButtons.OK, MessageBoxIcon.Warning);
            listele();


        }

        private void groupControl1_Paint(object sender, PaintEventArgs e)
        {

        }

        private void Frmkullanici_FormClosed(object sender, FormClosedEventArgs e)
        {
        }
    }
}
Burdaki bilgilerin daha fazla olması gerektiğini düşündüğüm için
Rütbesi
Çıkmadan Önceki Tim
Yönetime Giriş Zamanı
Yönetimden Çıkış Zamanı
Çıkma Sebebi (Yönetici Notu)​

5aE7rL.png

TİMLER SAYFASI TASARIMI VE KAYNAK KODLARI​
TASARIM EKİBİ

caiopdx.PNG


5aE7rL.png

MODERASYON EKİBİ



shd8eqk.PNG


5aE7rL.png

İSTİHBARAT EKİBİ​


nwimvxi.PNG


5aE7rL.png

BLUE EKİBİ



2t0cjht.PNG


5aE7rL.png

BASIN MEDYA EKİBİ​


9u1dsz0.PNG


5aE7rL.png


AR-GE EKİBİ

gontyxt.PNG

5aE7rL.png

ANKA EKİBİ



ew71v9f.PNG

KAYNAK KODLARI
Kod:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Data.SqlClient;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace Otomasyon
{
    public partial class Frmarge : Form
    {
        public Frmarge()
        {
            InitializeComponent();
        }

        sqlbaglantisi bgl = new sqlbaglantisi();

        void listele()
        {
            DataTable dt = new DataTable();
            SqlDataAdapter da = new SqlDataAdapter("Select * From ARGE", bgl.baglanti());
            da.Fill(dt);
            gridControl1.DataSource = dt;
        }

        private void gridView1_FocusedRowChanged(object sender, DevExpress.XtraGrid.Views.Base.FocusedRowChangedEventArgs e)
        {
            DataRow dr = gridView1.GetDataRow(gridView1.FocusedRowHandle);
            txtkullanici.Text = dr["KULLANICIADI"].ToString();
            maskedTextBox1.Text = dr["YAŞ"].ToString();
            comboBox1.Text = dr["RÜTBE"].ToString();
            maskedTextBox2.Text = dr["GİRİŞZAMANI"].ToString();
            richTextBox1.Text = dr["YÖNETİCİNOTLARI"].ToString();
            maskedTextBox3.Text = dr["SONTERFİZAMANI"].ToString();
        }

        private void simpleButton1_Click(object sender, EventArgs e)
        {
            //Verileri Kaydetme
            SqlCommand komut = new SqlCommand("insert into ARGE (KULLANICIADI,YAŞ,RÜTBE,GİRİŞZAMANI,YÖNETİCİNOTLARI,SONTERFİZAMANI) values (@p1,@p2,@p3,@p4,@p5,@p6)", bgl.baglanti());
            komut.Parameters.AddWithValue("@p1", txtkullanici.Text); // KULLANICIADI
            komut.Parameters.AddWithValue("@p2", maskedTextBox1.Text); // YAŞ
            komut.Parameters.AddWithValue("@p3", comboBox1.Text); // RÜTBE
            komut.Parameters.AddWithValue("@p4", maskedTextBox2.Text); // GİRİŞZAMANI
            komut.Parameters.AddWithValue("@p5", richTextBox1.Text); // YÖNETİCİNOTLARI
            komut.Parameters.AddWithValue("@p6", maskedTextBox3.Text); // SONTERFİZZAMANI
            komut.ExecuteNonQuery();
            bgl.baglanti().Close();
            MessageBox.Show("Kullanıcı Sisteme Eklendi!", "Bilgi", MessageBoxButtons.OK, MessageBoxIcon.Information);
            listele();
        }

        private void btnsil_Click(object sender, EventArgs e)
        {
            SqlCommand komutsil = new SqlCommand("Delete From ARGE where KULLANICIADI=@p1", bgl.baglanti());
            komutsil.Parameters.AddWithValue("@p1", txtkullanici.Text);
            komutsil.ExecuteNonQuery();
            bgl.baglanti().Close();
            MessageBox.Show("Kullanıcı Sistemden Silindi!", "Bilgi", MessageBoxButtons.OK, MessageBoxIcon.Error);
            listele();
        }

        private void btnguncelle_Click(object sender, EventArgs e)
        {
            SqlCommand komut = new SqlCommand("update ARGE set KULLANICIADI=@p1, YAŞ=@p2, RÜTBE=@p3, GİRİŞZAMANI=@p4, YÖNETİCİNOTLARI=@p5, SONTERFİZAMANI=@p6 where KULLANICIADI=@p1", bgl.baglanti());
            komut.Parameters.AddWithValue("@p1", txtkullanici.Text); // KULLANICIADI
            komut.Parameters.AddWithValue("@p2", maskedTextBox1.Text); // YAŞ
            komut.Parameters.AddWithValue("@p3", comboBox1.Text); // RÜTBE
            komut.Parameters.AddWithValue("@p4", maskedTextBox2.Text); // GİRİŞZAMANI
            komut.Parameters.AddWithValue("@p5", richTextBox1.Text); // YÖNETİCİNOTLARI
            komut.Parameters.AddWithValue("@p6", maskedTextBox3.Text); // SONTERFİZZAMANI
            komut.ExecuteNonQuery();
            bgl.baglanti().Close();
            MessageBox.Show("Kullanıcı Güncellendi!", "Bilgi", MessageBoxButtons.OK, MessageBoxIcon.Warning);
            listele();
        }

        private void Frmarge_Load(object sender, EventArgs e)
        {
            listele();
        }
    }
}

Kodlarda tek değişen şey sayfanın Timine göre Tabloyu değiştirmeniz gerekiyor.
Arge ekibi sql de ARGE tablosunda yer alacak gibi.

İyi Forumlar...

7u7xwqk.png

 

LydexCoding

Moderasyon Ekibi Çaylak
24 May 2024
422
135
:)
Selamlar,

Bugün sizlere forum için yapmış olduğum TurkHackTeam Yönetici Takip Programını tanıtacağım.


5aE7rL.png

Programda C# ve Sql Server Kullanıldı.
5aE7rL.png

Öncelikle yapmamız gereken SQL serverı projemize bağlamak.
Ben bu işlemleri tekrarlamamak için bir class oluşturdum.



pixkpr8.PNG


Kendi sql bağlantınızı karaladığım yere yazabilirsiniz.




ky2lu8m.PNG




SQL server da proje için açmış olduğum tablolar.

5aE7rL.png



ANASAYFA TASARIMI




2fx0knx.PNG





Anasayfayı DevExpressin bize sağlamış olduğu eklentileri kullanarak kendim için revize ettim.



5aE7rL.png






ANASAYFA KODLARI






Kod:
using System;[/B][/CENTER]
[B]
[CENTER]using System.Collections.Generic;

using System.ComponentModel;

using System.Data;

using System.Drawing;

using System.Linq;

using System.Text;

using System.Threading.Tasks;

using System.Windows.Forms;



namespace Otomasyon

{

    public partial class Form1 : Form

    {

        public Form1()

        {

            InitializeComponent();

        }

        Frmkullanici fr;

        Frmudy fr1;

        Frmarge fr2;

        Frmmod fr3;

        Frmblue fr4;

        Frmistihbarat fr5;

        Frmanka fr6;

        Frmtasarım fr7;

        Frmbasın fr8;

        private void barButtonItem7_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)

        {

            if (fr6 == null || fr6.IsDisposed)

            {

                fr6 = new Frmanka();

                fr6.MdiParent = this;

                fr6.Show();

            }

        }



        private void barButtonItem9_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)

        {

            if (fr8 == null || fr8.IsDisposed)

            {

                fr8 = new Frmbasın();

                fr8.MdiParent = this;

                fr8.Show();

            }

        }



        private void Form1_Load(object sender, EventArgs e)

        {



        }

        

        private void barButtonItem1_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)

        {

            if (fr == null || fr.IsDisposed)

            {

                fr = new Frmkullanici();

                fr.MdiParent = this;

                fr.Show();

            }

        }

        

        private void btnudy_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)

        {

            if (fr1 == null || fr1.IsDisposed)

            {

                fr1 = new Frmudy();

                fr1.MdiParent = this;

                fr1.Show();

            }

        }



        private void btnarge_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)

        {

            if (fr2 == null || fr2.IsDisposed)

            {

                fr2 = new Frmarge();

                fr2.MdiParent = this;

                fr2.Show();

            }

        }



        private void btnmod_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)

        {

            if (fr3 == null || fr3.IsDisposed)

            {

                fr3 = new Frmmod();

                fr3.MdiParent = this;

                fr3.Show();

            }

        }



        private void btnblue_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)

        {

            if (fr4 == null || fr4.IsDisposed)

            {

                fr4 = new Frmblue();

                fr4.MdiParent = this;

                fr4.Show();

            }

        }



        private void btnistihbarat_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)

        {

            if (fr5 == null || fr5.IsDisposed)

            {

                fr5 = new Frmistihbarat();

                fr5.MdiParent = this;

                fr5.Show();

            }

        }



        private void btntasarim_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)

        {

            if (fr7 == null || fr7.IsDisposed)

            {

                fr7 = new Frmtasarım();

                fr7.MdiParent = this;

                fr7.Show();

            }

        }



        private void Form1_FormClosed(object sender, FormClosedEventArgs e)

        {

        }

    }

}



Sayfayı açmak için butona tıkladığımızda bir daha aynı sayfa açılmasın ve sayfayı tekrar açmak için yazmış olduğum kodlar yukardaki gibidir.







5aE7rL.png







ÜDY SAYFA TASARIMI VE KAYNAK KODLARI






4x6kabq.PNG




5aE7rL.png





ÜST DÜZEY YÖNETİM SAYFASI KAYNAK KODLARI




Kod:
using System;[/B][/CENTER]
[B]
[CENTER]using System.Collections.Generic;

using System.ComponentModel;

using System.Data;

using System.Drawing;

using System.Linq;

using System.Text;

using System.Threading.Tasks;

using System.Windows.Forms;

using System.Data.SqlClient;



namespace Otomasyon

{

    public partial class Frmudy : Form

    {

        public Frmudy()

        {

            InitializeComponent();

        }

        sqlbaglantisi bgl = new sqlbaglantisi();



        void listele()

        {

            DataTable dt = new DataTable();

            SqlDataAdapter da = new SqlDataAdapter("Select * From ÜDY", bgl.baglanti());

            da.Fill(dt);

            gridControl1.DataSource = dt;

        }



        private void simpleButton1_Click(object sender, EventArgs e)

        {

            //Verileri Kaydetme

            SqlCommand komut = new SqlCommand("insert into ÜDY (KULLANICIADI,RÜTBE,GÖREVLENDİRME) values (@p1,@p2,@p3)", bgl.baglanti());

            komut.Parameters.AddWithValue("@p1", txtkullanici.Text);//kullanıcıadı

            komut.Parameters.AddWithValue("@p2", comboBox1.Text);//rütbe

            komut.Parameters.AddWithValue("@p3", richTextBox1.Text); //görevlendirme

            komut.ExecuteNonQuery();

            bgl.baglanti().Close();

            MessageBox.Show("Kullanıcı Sisteme Eklendi!", "Bilgi", MessageBoxButtons.OK, MessageBoxIcon.Information);

            listele();

        }



        private void Frmudy_Load(object sender, EventArgs e)

        {

            listele();

        }



        private void btnsil_Click(object sender, EventArgs e)

        {

            SqlCommand komutsil = new SqlCommand("Delete From ÜDY where KULLANICIADI=@p1", bgl.baglanti());

            komutsil.Parameters.AddWithValue("@p1", txtkullanici.Text);

            komutsil.ExecuteNonQuery();

            bgl.baglanti().Close();

            MessageBox.Show("Kullanıcı Sistemden Silindi!", "Bilgi", MessageBoxButtons.OK, MessageBoxIcon.Error);

            listele();

        }



        private void gridView1_FocusedRowChanged(object sender, DevExpress.XtraGrid.Views.Base.FocusedRowChangedEventArgs e)

        {

            DataRow dr = gridView1.GetDataRow(gridView1.FocusedRowHandle);

            txtkullanici.Text = dr["KULLANICIADI"].ToString();

            comboBox1.Text = dr["RÜTBE"].ToString();

            richTextBox1.Text = dr["GÖREVLENDİRME"].ToString();

        }



        private void btnguncelle_Click(object sender, EventArgs e)

        {

            SqlCommand komut = new SqlCommand("update ÜDY set KULLANICIADI=@p1, RÜTBE=@p2, GÖREVLENDİRME=@p3 where KULLANICIADI=@p1", bgl.baglanti());

            komut.Parameters.AddWithValue("@p1", txtkullanici.Text);

            komut.Parameters.AddWithValue("@p2", comboBox1.Text);

            komut.Parameters.AddWithValue("@p3", richTextBox1.Text);

            komut.ExecuteNonQuery();

            bgl.baglanti().Close();

            MessageBox.Show("Kullanıcı Güncellendi!", "Bilgi", MessageBoxButtons.OK, MessageBoxIcon.Warning);

            listele();

        }

    }

}






Üdy için sadece kullanıcı adı giriş yeri ve rütbesini yazıp kaydedip,silip veya güncelleyebiliriz.

5aE7rL.png


Eski Yöneticiler Sayfası Ve Kaynak Kodları

2wzcjf3.PNG



Kod:
using System;[/B][/CENTER]
[B]
[CENTER]using System.Collections.Generic;

using System.ComponentModel;

using System.Data;

using System.Drawing;

using System.Linq;

using System.Text;

using System.Threading.Tasks;

using System.Windows.Forms;

using System.Data.SqlClient;



namespace Otomasyon

{

    public partial class Frmkullanici : Form

    {

        public Frmkullanici()

        {

            InitializeComponent();

        }

        sqlbaglantisi  bgl = new sqlbaglantisi();



        void listele()

        {

            DataTable dt = new DataTable();

            SqlDataAdapter da = new SqlDataAdapter("Select * From kullaniciara", bgl.baglanti());

            da.Fill(dt);

            gridControl1.DataSource = dt;

        }

        private void gridControl1_Click(object sender, EventArgs e)

        {



        }



        private void Frmkullanici_Load(object sender, EventArgs e)

        {

            listele();

        }



        private void simpleButton1_Click(object sender, EventArgs e)

        {

            //Verileri Kaydetme

            SqlCommand komut = new SqlCommand("insert into kullaniciara (KULLANICIAD,TİM,YAŞ,RÜTBE,GİRİŞZAMANI,ÇIKIŞZAMANI,DETAY) values (@p1,@p2,@p3,@p4,@p5,@p6,@p7)", bgl.baglanti());

            komut.Parameters.AddWithValue("@p1", txtkullanici.Text);

            komut.Parameters.AddWithValue("@p2", comboBox2.Text);

            komut.Parameters.AddWithValue("@p3", maskedTextBox1.Text);

            komut.Parameters.AddWithValue("@p4", comboBox1.Text);

            komut.Parameters.AddWithValue("@p5", maskedTextBox2.Text);

            komut.Parameters.AddWithValue("@p6", maskedTextBox3.Text);

            komut.Parameters.AddWithValue("@p7", richTextBox1.Text);

            komut.ExecuteNonQuery();

            bgl.baglanti().Close();

            MessageBox.Show("Kullanıcı Sisteme Eklendi!", "Bilgi", MessageBoxButtons.OK, MessageBoxIcon.Information);

            listele();

        }



        private void btnsil_Click(object sender, EventArgs e)

        {

            SqlCommand komutsil = new SqlCommand("Delete From kullaniciara where KULLANICIAD=@p1", bgl.baglanti());

            komutsil.Parameters.AddWithValue("@p1", txtkullanici.Text);

            komutsil.ExecuteNonQuery();

            bgl.baglanti().Close();

            MessageBox.Show("Kullanıcı Sistemden Silindi!","Bilgi",MessageBoxButtons.OK, MessageBoxIcon.Error);

            listele();

        }



        private void gridView1_FocusedRowChanged(object sender, DevExpress.XtraGrid.Views.Base.FocusedRowChangedEventArgs e)

        {

            DataRow dr = gridView1.GetDataRow(gridView1.FocusedRowHandle);

            txtkullanici.Text = dr["KULLANICIAD"].ToString();

            comboBox2.Text = dr["TİM"].ToString();

            maskedTextBox1.Text = dr["YAŞ"].ToString();

            comboBox1.Text = dr["RÜTBE"].ToString();

            maskedTextBox2.Text = dr["GİRİŞZAMANI"].ToString();

            maskedTextBox3.Text = dr["ÇIKIŞZAMANI"].ToString();

            richTextBox1.Text = dr["DETAY"].ToString();

        }



        private void btnguncelle_Click(object sender, EventArgs e)

        {

            SqlCommand komut = new SqlCommand("update kullaniciara set KULLANICIAD=@p1, TİM=@p2, YAŞ=@p3, RÜTBE=@p4, GİRİŞZAMANI=@p5, ÇIKIŞZAMANI=@p6, DETAY=@p7 where KULLANICIAD=@p1", bgl.baglanti());

            komut.Parameters.AddWithValue("@p1", txtkullanici.Text);

            komut.Parameters.AddWithValue("@p2", comboBox2.Text);

            komut.Parameters.AddWithValue("@p3", maskedTextBox1.Text);

            komut.Parameters.AddWithValue("@p4", comboBox1.Text);

            komut.Parameters.AddWithValue("@p5", maskedTextBox2.Text);

            komut.Parameters.AddWithValue("@p6", maskedTextBox3.Text);

            komut.Parameters.AddWithValue("@p7", richTextBox1.Text);

            komut.ExecuteNonQuery();

            bgl.baglanti().Close();

            MessageBox.Show("Kullanıcı Güncellendi!", "Bilgi", MessageBoxButtons.OK, MessageBoxIcon.Warning);

            listele();





        }



        private void groupControl1_Paint(object sender, PaintEventArgs e)

        {



        }



        private void Frmkullanici_FormClosed(object sender, FormClosedEventArgs e)

        {

        }

    }

}







Burdaki bilgilerin daha fazla olması gerektiğini düşündüğüm için

Rütbesi

Çıkmadan Önceki Tim

Yönetime Giriş Zamanı

Yönetimden Çıkış Zamanı

Çıkma Sebebi (Yönetici Notu)





5aE7rL.png





TİMLER SAYFASI TASARIMI VE KAYNAK KODLARI






TASARIM EKİBİ



caiopdx.PNG




5aE7rL.png


MODERASYON EKİBİ






shd8eqk.PNG






5aE7rL.png

İSTİHBARAT EKİBİ






nwimvxi.PNG




5aE7rL.png


BLUE EKİBİ






2t0cjht.PNG






5aE7rL.png

BASIN MEDYA EKİBİ






9u1dsz0.PNG






5aE7rL.png



AR-GE EKİBİ



gontyxt.PNG


5aE7rL.png


ANKA EKİBİ






ew71v9f.PNG





KAYNAK KODLARI




Kod:
using System;[/B][/CENTER]
[B]
[CENTER]using System.Collections.Generic;

using System.ComponentModel;

using System.Data;

using System.Data.SqlClient;

using System.Drawing;

using System.Linq;

using System.Text;

using System.Threading.Tasks;

using System.Windows.Forms;



namespace Otomasyon

{

    public partial class Frmarge : Form

    {

        public Frmarge()

        {

            InitializeComponent();

        }



        sqlbaglantisi bgl = new sqlbaglantisi();



        void listele()

        {

            DataTable dt = new DataTable();

            SqlDataAdapter da = new SqlDataAdapter("Select * From ARGE", bgl.baglanti());

            da.Fill(dt);

            gridControl1.DataSource = dt;

        }



        private void gridView1_FocusedRowChanged(object sender, DevExpress.XtraGrid.Views.Base.FocusedRowChangedEventArgs e)

        {

            DataRow dr = gridView1.GetDataRow(gridView1.FocusedRowHandle);

            txtkullanici.Text = dr["KULLANICIADI"].ToString();

            maskedTextBox1.Text = dr["YAŞ"].ToString();

            comboBox1.Text = dr["RÜTBE"].ToString();

            maskedTextBox2.Text = dr["GİRİŞZAMANI"].ToString();

            richTextBox1.Text = dr["YÖNETİCİNOTLARI"].ToString();

            maskedTextBox3.Text = dr["SONTERFİZAMANI"].ToString();

        }



        private void simpleButton1_Click(object sender, EventArgs e)

        {

            //Verileri Kaydetme

            SqlCommand komut = new SqlCommand("insert into ARGE (KULLANICIADI,YAŞ,RÜTBE,GİRİŞZAMANI,YÖNETİCİNOTLARI,SONTERFİZAMANI) values (@p1,@p2,@p3,@p4,@p5,@p6)", bgl.baglanti());

            komut.Parameters.AddWithValue("@p1", txtkullanici.Text); // KULLANICIADI

            komut.Parameters.AddWithValue("@p2", maskedTextBox1.Text); // YAŞ

            komut.Parameters.AddWithValue("@p3", comboBox1.Text); // RÜTBE

            komut.Parameters.AddWithValue("@p4", maskedTextBox2.Text); // GİRİŞZAMANI

            komut.Parameters.AddWithValue("@p5", richTextBox1.Text); // YÖNETİCİNOTLARI

            komut.Parameters.AddWithValue("@p6", maskedTextBox3.Text); // SONTERFİZZAMANI

            komut.ExecuteNonQuery();

            bgl.baglanti().Close();

            MessageBox.Show("Kullanıcı Sisteme Eklendi!", "Bilgi", MessageBoxButtons.OK, MessageBoxIcon.Information);

            listele();

        }



        private void btnsil_Click(object sender, EventArgs e)

        {

            SqlCommand komutsil = new SqlCommand("Delete From ARGE where KULLANICIADI=@p1", bgl.baglanti());

            komutsil.Parameters.AddWithValue("@p1", txtkullanici.Text);

            komutsil.ExecuteNonQuery();

            bgl.baglanti().Close();

            MessageBox.Show("Kullanıcı Sistemden Silindi!", "Bilgi", MessageBoxButtons.OK, MessageBoxIcon.Error);

            listele();

        }



        private void btnguncelle_Click(object sender, EventArgs e)

        {

            SqlCommand komut = new SqlCommand("update ARGE set KULLANICIADI=@p1, YAŞ=@p2, RÜTBE=@p3, GİRİŞZAMANI=@p4, YÖNETİCİNOTLARI=@p5, SONTERFİZAMANI=@p6 where KULLANICIADI=@p1", bgl.baglanti());

            komut.Parameters.AddWithValue("@p1", txtkullanici.Text); // KULLANICIADI

            komut.Parameters.AddWithValue("@p2", maskedTextBox1.Text); // YAŞ

            komut.Parameters.AddWithValue("@p3", comboBox1.Text); // RÜTBE

            komut.Parameters.AddWithValue("@p4", maskedTextBox2.Text); // GİRİŞZAMANI

            komut.Parameters.AddWithValue("@p5", richTextBox1.Text); // YÖNETİCİNOTLARI

            komut.Parameters.AddWithValue("@p6", maskedTextBox3.Text); // SONTERFİZZAMANI

            komut.ExecuteNonQuery();

            bgl.baglanti().Close();

            MessageBox.Show("Kullanıcı Güncellendi!", "Bilgi", MessageBoxButtons.OK, MessageBoxIcon.Warning);

            listele();

        }



        private void Frmarge_Load(object sender, EventArgs e)

        {

            listele();

        }

    }

}




Kodlarda tek değişen şey sayfanın Timine göre Tabloyu değiştirmeniz gerekiyor.

Arge ekibi sql de ARGE tablosunda yer alacak gibi.



İyi Forumlar...





7u7xwqk.png

Ellerine sağlık hocam, hem tasarım hemde projenin kendisi çok güzel duruyor.
 
Üst

Turkhackteam.org internet sitesi 5651 sayılı kanun’un 2. maddesinin 1. fıkrasının m) bendi ile aynı kanunun 5. maddesi kapsamında "Yer Sağlayıcı" konumundadır. İçerikler ön onay olmaksızın tamamen kullanıcılar tarafından oluşturulmaktadır. Turkhackteam.org; Yer sağlayıcı olarak, kullanıcılar tarafından oluşturulan içeriği ya da hukuka aykırı paylaşımı kontrol etmekle ya da araştırmakla yükümlü değildir. Türkhackteam saldırı timleri Türk sitelerine hiçbir zararlı faaliyette bulunmaz. Türkhackteam üyelerinin yaptığı bireysel hack faaliyetlerinden Türkhackteam sorumlu değildir. Sitelerinize Türkhackteam ismi kullanılarak hack faaliyetinde bulunulursa, site-sunucu erişim loglarından bu faaliyeti gerçekleştiren ip adresini tespit edip diğer kanıtlarla birlikte savcılığa suç duyurusunda bulununuz.