public bool UpdateKullanici(cCalisan c)
        {
            bool          sonuc = false;
            SqlConnection conn  = new SqlConnection(cGenel.connStr);
            SqlCommand    comm  = new SqlCommand("update calisanKullanici set calisanID=@calisanID,kadi=@kadi,sifre=@sifre where calisanKullanici=@calisanKullanici", conn);

            comm.Parameters.AddWithValue("@calisanKullanici", c._calisanKullanici);
            comm.Parameters.AddWithValue("@calisanID", c._calisanID);
            comm.Parameters.AddWithValue("@kadi", c._kadi);
            comm.Parameters.AddWithValue("@sifre", c._sifre);
            if (conn.State == ConnectionState.Closed)
            {
                conn.Open();
            }
            try
            {
                sonuc = Convert.ToBoolean(comm.ExecuteNonQuery());
            }
            catch (SqlException ex)
            {
                string hata = ex.Message;
            }
            finally { conn.Close(); }
            return(sonuc);
        }
        public bool CalisanBilgileriGuncelle(cCalisan c)
        {
            bool          sonuc = false;
            SqlConnection conn  = new SqlConnection(cGenel.connStr);
            SqlCommand    comm  = new SqlCommand("update calisan set calisanPozisyonID=@calisanPozisyonID,subeID=@subeID,ehliyetSinifi=@ehliyetSinifi,ehliyetAlisTarihi=@ehliyetAlisTarihi,telefon=@telefon,mail=@mail,adresID=@adresID,maas=@maas where calisanID=@calisanID", conn);

            comm.Parameters.Add("@calisanID", SqlDbType.Int).Value              = c._calisanID;
            comm.Parameters.Add("@calisanPozisyonID", SqlDbType.Int).Value      = c._calisanPozisyonID;
            comm.Parameters.Add("@subeID", SqlDbType.Int).Value                 = c._subeID;
            comm.Parameters.Add("@ehliyetSinifi", SqlDbType.VarChar).Value      = c._ehliyetSinifi;
            comm.Parameters.Add("@ehliyetAlisTarihi", SqlDbType.DateTime).Value = Convert.ToDateTime(c._ehliyetAlisTarihi);
            comm.Parameters.Add("@telefon", SqlDbType.VarChar).Value            = c._telefon;
            comm.Parameters.Add("@mail", SqlDbType.VarChar).Value               = c._mail;
            comm.Parameters.Add("@adresID", SqlDbType.Int).Value                = c._adresID;
            comm.Parameters.Add("@maas", SqlDbType.Decimal).Value               = c._maas;
            if (conn.State == ConnectionState.Closed)
            {
                conn.Open();
            }
            try
            {
                sonuc = Convert.ToBoolean(comm.ExecuteNonQuery());
            }
            catch (SqlException ex)
            {
                string hata = ex.Message;
            }
            finally { conn.Close(); }
            return(sonuc);
        }
        public bool CalisanEkle(cCalisan c)
        {
            bool          sonuc = false;
            SqlConnection conn  = new SqlConnection(cGenel.connStr);
            SqlCommand    comm  = new SqlCommand("insert into calisan(calisanPozisyonID,calisanTCKNO,subeID,ad,soyad,cinsiyet,dogumTarihi,ehliyetSinifi,ehliyetAlisTarihi,telefon,mail,adresID,girisTarihi,maas) values(@calisanPozisyonID,@calisanTCKNO,@subeID,@ad,@soyad,@cinsiyet,@dogumTarihi,@ehliyetSinifi,@ehliyetAlisTarihi,@telefon,@mail,@adresID,@girisTarihi,@maas) ", conn);

            comm.Parameters.Add("@calisanPozisyonID", SqlDbType.Int).Value      = c._calisanPozisyonID;
            comm.Parameters.Add("@calisanTCKNO", SqlDbType.VarChar).Value       = c._calisanTCKNO;
            comm.Parameters.Add("@subeID", SqlDbType.Int).Value                 = c._subeID;
            comm.Parameters.Add("@ad", SqlDbType.VarChar).Value                 = c._ad;
            comm.Parameters.Add("@soyad", SqlDbType.VarChar).Value              = c._soyad;
            comm.Parameters.Add("@cinsiyet", SqlDbType.VarChar).Value           = c._cinsiyet;
            comm.Parameters.Add("@dogumTarihi", SqlDbType.DateTime).Value       = Convert.ToDateTime(c._dogumTarihi);
            comm.Parameters.Add("@ehliyetSinifi", SqlDbType.VarChar).Value      = c._ehliyetSinifi;
            comm.Parameters.Add("@ehliyetAlisTarihi", SqlDbType.DateTime).Value = Convert.ToDateTime(c._ehliyetAlisTarihi);
            comm.Parameters.Add("@telefon", SqlDbType.VarChar).Value            = c._telefon;
            comm.Parameters.Add("@mail", SqlDbType.VarChar).Value               = c._mail;
            comm.Parameters.Add("@adresID", SqlDbType.Int).Value                = c._adresID;
            comm.Parameters.Add("@girisTarihi", SqlDbType.DateTime).Value       = Convert.ToDateTime(c._girisTarihi);
            comm.Parameters.Add("@maas", SqlDbType.Decimal).Value               = c._maas;
            if (conn.State == ConnectionState.Closed)
            {
                conn.Open();
            }
            try
            {
                sonuc = Convert.ToBoolean(comm.ExecuteNonQuery());
            }
            catch (SqlException ex)
            {
                string hata = ex.Message;
            }
            finally { conn.Close(); }
            return(sonuc);
        }
        private void btnSil_Click(object sender, EventArgs e)
        {
            bool sonuc = false;

            if (txtCalisanId.Text.Trim() != "")
            {
                if (MessageBox.Show("Kullanıcıyı Silmek İstiyormusunz?", "SİLİNSİN Mİ?", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
                {
                    cCalisan c = new cCalisan();
                    sonuc = c.KullaniciSil(Convert.ToInt32(txtCalisanId.Text));
                    if (sonuc)
                    {
                        MessageBox.Show("Kullanıcı Bilgileri Silindi!", "Bilgi");
                        this.Close();
                    }
                    else
                    {
                        MessageBox.Show("Kullanıcı Bilgileri Silinemedi", "Hata");
                    }
                }
            }
            else
            {
                MessageBox.Show("Kullanıcı Seçmelisiniz!", "Bilgi");
            }
        }
        public bool BeniHatırlaUserKaydet(cCalisan c)
        {
            StreamWriter UserEkle = new StreamWriter("SifreKartlari.txt", true);

            UserEkle.WriteLine(c._kadi.ToString());
            UserEkle.Close();
            return(true);
        }
Beispiel #6
0
        private void btnGiris_Click(object sender, EventArgs e)
        {
            this.Focus();
            cSt.frm(this);
            hatirla.cookiesGetir(txtKullaniciAdi, txtSifre);
            SqlConnection conn = new SqlConnection(cGenel.connStr);
            SqlCommand    comm = new SqlCommand("select calisanKullanici.calisanID,calisanPozisyonID,kadi,sifre from calisanKullanici inner join calisan on calisanKullanici.calisanID = calisan.calisanID where kadi=@kadi and sifre=@sifre and calisanKullanici.durum=1", conn);

            comm.Parameters.AddWithValue("@kadi", txtKullaniciAdi.Text);
            comm.Parameters.AddWithValue("@sifre", txtSifre.Text);
            if (conn.State == ConnectionState.Closed)
            {
                conn.Open();
            }
            try
            {
                if (txtKullaniciAdi.Text != "" && txtSifre.Text != "")
                {
                    SqlDataReader dr = comm.ExecuteReader();
                    if (dr.Read())
                    {
                        if (cbHatirla.Checked == true)
                        {
                            cCalisan c = new cCalisan();
                            c.Kadi = txtKullaniciAdi.Text;
                            hatirla.cookiesKaydet(txtKullaniciAdi.Text, txtSifre.Text);
                        }
                        else
                        {
                            hatirla.cookiesSil();
                        }
                        cGenel.kullaniciID = Convert.ToInt32(dr["calisanID"]);
                        if (Convert.ToInt32(dr["calisanPozisyonID"]) < 3)
                        {
                            frmYonetim frm = new frmYonetim();
                            frm.ShowDialog();
                            dr.Close();
                        }
                        else
                        {
                            MessageBox.Show("Yanlış Giriş Yaptınız!! Tekrar Deneyiniz");
                            txtKullaniciAdi.Clear(); txtSifre.Clear();
                        }
                    }
                    else
                    {
                        MessageBox.Show("Boş alan Bırakmayınız!!");
                    }
                }
            }
            catch (SqlException ex)
            {
                string hata = ex.Message;
            }
            finally { conn.Close(); }
        }
Beispiel #7
0
        private void btnCalisanGetir_Click(object sender, EventArgs e)
        {
            cCalisan c = new cCalisan();

            dgvCalisanlar.DataSource       = c.Calisanlistele(txtTarih.Text);
            dgvCalisanlar.Columns[0].Width = 20;
            dgvCalisanlar.Columns[1].Width = 70;
            dgvCalisanlar.Columns[2].Width = 60;
            dgvCalisanlar.Columns[3].Width = 60;
        }
        void tasarimIslem()
        {
            if (cCalisan.islem == Convert.ToInt32(cCalisan.islemler.frmCalisan_Detay))
            {
                btn.Visible       = false;
                lblMesaj.Text     = "Detaylı Çalışan Bilgileri";
                txtCalisanNO.Text = Convert.ToString(frmCalisanListe.aktarCalisanID);
                bilgiaktar();
                kullaniciGetir();
            }

            else if (cCalisan.islem == Convert.ToInt32(cCalisan.islemler.frmCalisan_CalisanEkle))
            {
                btn.Text      = "Kaydet";
                lblMesaj.Text = "Yeni Çalışan Kaydı...";
                mtbTckno.Focus();
                gbUyelik.Visible = false;
                cCalisan cal = new cCalisan();
                txtCalisanNO.Text = cal.SonIDBul().ToString();
            }
            else if (cCalisan.islem == Convert.ToInt32(cCalisan.islemler.frmCalisan_CalisanBilgileriDegistir))
            {
                btn.Text          = "Güncelle";
                lblMesaj.Text     = "Çalışan Bilgilerini Güncelle...";
                txtCalisanNO.Text = Convert.ToString(frmCalisanListe.aktarCalisanID);
                bilgiaktar();
                kullaniciGetir();
                mtbTckno.ReadOnly = true; txtAd.ReadOnly = true; txtSoyad.ReadOnly = true; gbCinsiyet.Enabled = false;
                dtpGiris.Enabled  = false;
            }
            else if (cCalisan.islem == Convert.ToInt32(cCalisan.islemler.frmCalisan_CalisanSil))
            {
                btn.Text          = "Sil";
                lblMesaj.Text     = "Çalışan Silme İşlemi";
                txtCalisanNO.Text = Convert.ToString(frmCalisanListe.aktarCalisanID);
                bilgiaktar();
                kullaniciGetir();
                btn.Enabled = true;
            }
            else if (cCalisan.islem == Convert.ToInt32(cCalisan.islemler.frmCalisan_Profil))
            {
                btn.Text          = "Güncelle";
                lblMesaj.Text     = "Profil Bilgilerini Güncelle...";
                txtCalisanNO.Text = Convert.ToString(cGenel.kullaniciID);
                bilgiaktar();
                kullaniciGetir();
                txtMaas.ReadOnly = true; cbPozisyon.Enabled = false; cbSubeAd.Enabled = false;
            }
        }
 private void btnKaydet_Click(object sender, EventArgs e)
 {
     if (txtUser.Text.Trim() != "" && txtUserPass.Text.Trim() != "")
     {
         bool     sonuc = false;
         cCalisan c     = new cCalisan();
         c.CalisanID = Convert.ToInt32(txtCalisanId.Text);
         c.Kadi      = txtUser.Text;
         c.Sifre     = txtUserPass.Text;
         sonuc       = c.InsertKullanici(c);
         if (sonuc)
         {
             MessageBox.Show("kullanıcı eklenmiştir");
             this.Close();
         }
         else
         {
             MessageBox.Show("Boş alan bırakmayınız");
             txtUser.Focus();
         }
     }
 }
        public bool InsertKullanici(cCalisan c)
        {
            bool          sonuc = false;
            SqlConnection conn  = new SqlConnection(cGenel.connStr);
            SqlCommand    comm  = new SqlCommand("insert into calisanKullanici(calisanID,kadi,sifre) values(@calisanID,@kadi,@sifre);Select Scope_IDENTITY()", conn);

            comm.Parameters.AddWithValue("@calisanID", c._calisanID);
            comm.Parameters.AddWithValue("@kadi", c._kadi);
            comm.Parameters.AddWithValue("@sifre", c._sifre);
            if (conn.State == ConnectionState.Closed)
            {
                conn.Open();
            }
            try
            {
                sonuc = Convert.ToBoolean(comm.ExecuteNonQuery());
            }
            catch (SqlException ex)
            {
                string hata = ex.Message;
            }
            finally { conn.Close(); }
            return(sonuc);
        }
        private void btn_Click(object sender, EventArgs e)
        {
            if (cCalisan.islem == Convert.ToInt32(cCalisan.islemler.frmCalisan_CalisanEkle))
            {
                #region Ekleme
                bool sonuc = false;
                if (txtAd.Text.Trim() == "" || txtSoyad.Text.Trim() == "" || mtbTckno.Text != "")
                {
                    if (txtSehirID.Text != "" && txtIlceID.Text != "" && txtMahalleID.Text != "")
                    {
                        cAdres a = new cAdres();
                        a.SehirID   = Convert.ToInt32(txtSehirID.Text);
                        a.IlceID    = Convert.ToInt32(txtIlceID.Text);
                        a.MahalleID = Convert.ToInt32(txtMahalleID.Text);
                        a.Aciklama  = txtAciklama.Text;
                        int adresID = a.InsertAdres(a);
                        txtAdresID.Text = Convert.ToString(adresID);

                        if (txtPozisyonID.Text != "" && txtSubeID.Text != "")
                        {
                            if (adresID > 0)
                            {
                                cCalisan c = new cCalisan();
                                c.CalisanPozisyonID = Convert.ToInt32(txtPozisyonID.Text);
                                c.CalisanTCKNO      = mtbTckno.Text;
                                c.SubeID            = Convert.ToInt32(txtSubeID.Text);
                                c.Ad    = txtAd.Text;
                                c.Soyad = txtSoyad.Text;
                                if (rbBay.Checked == true)
                                {
                                    c.Cinsiyet = "Bay";
                                }
                                else
                                {
                                    c.Cinsiyet = "Bayan";
                                }
                                c.DogumTarihi = dtpDogumTarihi.Value;
                                if (rbEhVar.Checked == true)
                                {
                                    c.EhliyetSinifi     = cbEhliyetSinifi.Text;
                                    c.EhliyetAlisTarihi = dtpAlisTarihi.Value;
                                }
                                else if (rbEhYok.Checked == true)
                                {
                                    c.EhliyetSinifi     = "";
                                    c.EhliyetAlisTarihi = Convert.ToDateTime("01/01/1800 00:00:00");
                                }
                                Regex reg = new Regex(@"^([\w\.\-]+)@([\w\-]+)((\.(\w){2,3})+)$");
                                if (txtEposta.Text != "")
                                {
                                    if (!reg.IsMatch(txtEposta.Text))
                                    {
                                        MessageBox.Show("Email Geçersiz!");
                                        txtEposta.Focus(); txtEposta.Clear();
                                        return;
                                    }
                                    else
                                    {
                                        c.Mail = txtEposta.Text;
                                    }
                                }
                                else
                                {
                                    c.Mail = "";
                                }
                                if (txtTelefon.Text.Trim() != "")
                                {
                                    c.Telefon = txtTelefon.Text;
                                }
                                else
                                {
                                    MessageBox.Show("Telefon Numarasını Kontrol Ediniz"); txtTelefon.Focus(); return;
                                }
                                c.AdresID     = adresID;
                                c.GirisTarihi = dtpGiris.Value;
                                if (txtMaas.Text == "")
                                {
                                    MessageBox.Show("Maaş bilgisi Giriniz"); txtMaas.Focus(); return;
                                }
                                else
                                {
                                    c.Maas = Convert.ToDecimal(txtMaas.Text);
                                }
                                sonuc = c.CalisanEkle(c);
                                if (sonuc)
                                {
                                    if (c.CalisanPozisyonID < 4)
                                    {
                                        cCalisan ca = new cCalisan();
                                        ca.CalisanID = Convert.ToInt32(txtCalisanNO.Text);
                                        ca.Kadi      = txtSoyad.Text + txtPozisyonID.Text;
                                        ca.Sifre     = "12345";
                                        sonuc        = ca.InsertKullanici(ca);
                                        MessageBox.Show("Kayıt Başarılı", "Bilgi");
                                        this.Close();
                                    }
                                }
                                else
                                {
                                    MessageBox.Show("kayıt hatalı!!", "Hata");
                                    Temizle();
                                }
                            }
                        }
                        else
                        {
                            MessageBox.Show("Departman Bilgileri Boş Bırakılamaz !!", "Hata");
                        }
                    }
                    else
                    {
                        MessageBox.Show(" Adres Boş Bırakılamaz!!", "Hata");
                    }
                }
                else
                {
                    MessageBox.Show("Kişisel Bilgiler Boş Bırakılamaz");
                    Temizle();
                }
                #endregion
            }

            else if (cCalisan.islem == Convert.ToInt32(cCalisan.islemler.frmCalisan_CalisanBilgileriDegistir))
            {
                #region Güncelleme
                bool sonuc = false;
                if (txtAd.Text.Trim() != "" && txtSoyad.Text.Trim() != "" && mtbTckno.Text != "")
                {
                    if (txtSehirID.Text != "" && txtIlceID.Text != "" && txtMahalleID.Text != "")
                    {
                        cAdres a = new cAdres();
                        a.SehirID   = Convert.ToInt32(txtSehirID.Text);
                        a.IlceID    = Convert.ToInt32(txtIlceID.Text);
                        a.MahalleID = Convert.ToInt32(txtMahalleID.Text);
                        a.Aciklama  = txtAciklama.Text;
                        a.AdresID   = Convert.ToInt32(txtAdresID.Text);
                        if (a.UpdateAdres(a))
                        {
                            if (txtPozisyonID.Text != "" && txtSubeID.Text != "")
                            {
                                cCalisan c = new cCalisan();
                                c.CalisanID         = Convert.ToInt32(txtCalisanNO.Text);
                                c.CalisanPozisyonID = Convert.ToInt32(txtPozisyonID.Text);
                                c.SubeID            = Convert.ToInt32(txtSubeID.Text);
                                if (rbEhVar.Checked == true)
                                {
                                    c.EhliyetSinifi     = cbEhliyetSinifi.Text;
                                    c.EhliyetAlisTarihi = dtpAlisTarihi.Value;
                                }
                                else if (rbEhYok.Checked == true)
                                {
                                    c.EhliyetSinifi     = "";
                                    c.EhliyetAlisTarihi = Convert.ToDateTime("01/01/1800 00:00:00");
                                }
                                if (txtTelefon.Text.Trim() != "")
                                {
                                    c.Telefon = txtTelefon.Text;
                                }
                                else
                                {
                                    MessageBox.Show("Telefon Numarasını Kontrol Ediniz"); txtTelefon.Focus(); return;
                                }
                                Regex reg = new Regex(@"^([\w\.\-]+)@([\w\-]+)((\.(\w){2,3})+)$");
                                if (txtEposta.Text != "")
                                {
                                    if (!reg.IsMatch(txtEposta.Text))
                                    {
                                        MessageBox.Show("Hatalı email girişi!");
                                        txtEposta.Focus(); txtEposta.Clear();
                                        return;
                                    }
                                    else
                                    {
                                        c.Mail = txtEposta.Text;
                                    }
                                }
                                else
                                {
                                    c.Mail = "";
                                }
                                c.AdresID = Convert.ToInt32(txtAdresID.Text);
                                if (txtMaas.Text == "")
                                {
                                    MessageBox.Show("Maaş bilgisi Giriniz"); txtMaas.Focus(); return;
                                }
                                else
                                {
                                    c.Maas = Convert.ToDecimal(txtMaas.Text);
                                }
                                sonuc = c.CalisanBilgileriGuncelle(c);

                                if (sonuc)
                                {
                                    MessageBox.Show("Güncelleme İşlemi Başarılı", "Bilgi");
                                    this.Close();
                                }
                                else
                                {
                                    MessageBox.Show("Güncelleme Başarısız", "Hata");
                                    this.Close();
                                }
                            }
                            else
                            {
                                MessageBox.Show("Departman Bilgileri Boş Bırakılamaz!!");
                            }
                        }
                    }
                    else
                    {
                        MessageBox.Show(" Adres Boş Bırakılamaz!!", "Hata");
                    }
                }
                else
                {
                    MessageBox.Show("Kişisel Bilgiler Boş Bırakılamaz");
                    Temizle();
                }
                #endregion
            }
            else if (cCalisan.islem == Convert.ToInt32(cCalisan.islemler.frmCalisan_CalisanSil))
            {
                #region Silme
                bool sonuc = false;
                if (txtCalisanNO.Text != "" && txtAd.Text.Trim() != "")
                {
                    if (MessageBox.Show(txtAd.Text + " " + txtSoyad.Text + " " + "adlı Calışanı Silmek İstiyormusunz?", "SİLİNSİN Mİ?", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
                    {
                        cCalisan c = new cCalisan();
                        txtCikis.Text = DateTime.Now.ToShortDateString();
                        sonuc         = c.CalisanSil(Convert.ToInt32(txtCalisanNO.Text));
                        if (sonuc)
                        {
                            if (Convert.ToInt32(txtPozisyonID.Text) < 4)
                            {
                                cCalisan ca = new cCalisan();
                                ca.CalisanID = Convert.ToInt32(txtCalisanNO.Text);
                                ca.Kadi      = txtUser.Text;
                                ca.Sifre     = txtUserPswd.Text;
                                sonuc        = ca.KullaniciSil(Convert.ToInt32(txtCalisanNO.Text));
                                MessageBox.Show("Çalışan Bilgileri Silindi!", "Bilgi");
                                this.Close();
                            }
                        }
                        else
                        {
                            MessageBox.Show("Çalışan Bilgileri Silinemedi", "Hata");
                            this.Close();
                        }
                    }
                }
                #endregion
            }

            else if (cCalisan.islem == Convert.ToInt32(cCalisan.islemler.frmCalisan_Profil))
            {
                #region Profil
                bool sonuc = false;
                if (txtAd.Text.Trim() != "" && txtSoyad.Text.Trim() != "" && mtbTckno.Text != "")
                {
                    if (txtSehirID.Text != "" && txtIlceID.Text != "" && txtMahalleID.Text != "")
                    {
                        cAdres a = new cAdres();
                        a.SehirID   = Convert.ToInt32(txtSehirID.Text);
                        a.IlceID    = Convert.ToInt32(txtIlceID.Text);
                        a.MahalleID = Convert.ToInt32(txtMahalleID.Text);
                        a.Aciklama  = txtAciklama.Text;
                        a.AdresID   = Convert.ToInt32(txtAdresID.Text);
                        if (a.UpdateAdres(a))
                        {
                            cCalisan c = new cCalisan();
                            c.CalisanID         = Convert.ToInt32(txtCalisanNO.Text);
                            c.CalisanPozisyonID = Convert.ToInt32(txtPozisyonID.Text);
                            c.SubeID            = Convert.ToInt32(txtSubeID.Text);
                            if (rbEhVar.Checked == true)
                            {
                                c.EhliyetSinifi     = cbEhliyetSinifi.Text;
                                c.EhliyetAlisTarihi = dtpAlisTarihi.Value;
                            }
                            else if (rbEhYok.Checked == true)
                            {
                                c.EhliyetSinifi     = "";
                                c.EhliyetAlisTarihi = Convert.ToDateTime("01/01/1800 00:00:00");
                            }
                            if (txtTelefon.Text.Trim() != "")
                            {
                                c.Telefon = txtTelefon.Text;
                            }
                            else
                            {
                                MessageBox.Show("Telefon Numarasını Kontrol Ediniz"); txtTelefon.Focus(); return;
                            }
                            Regex reg = new Regex(@"^([\w\.\-]+)@([\w\-]+)((\.(\w){2,3})+)$");
                            if (txtEposta.Text != "")
                            {
                                if (!reg.IsMatch(txtEposta.Text))
                                {
                                    MessageBox.Show("Hatalı email girişi!");
                                    txtEposta.Focus(); txtEposta.Clear();
                                    return;
                                }
                                else
                                {
                                    c.Mail = txtEposta.Text;
                                }
                            }
                            else
                            {
                                c.Mail = "";
                            }
                            c.AdresID = Convert.ToInt32(txtAdresID.Text);
                            if (txtMaas.Text == "")
                            {
                                MessageBox.Show("Maaş bilgisi Giriniz"); txtMaas.Focus(); return;
                            }
                            else
                            {
                                c.Maas = Convert.ToDecimal(txtMaas.Text);
                            }
                            sonuc = c.CalisanBilgileriGuncelle(c);
                            if (sonuc)
                            {
                                cCalisan ca = new cCalisan();
                                ca.CalisanID = Convert.ToInt32(txtCalisanNO.Text);
                                ca.Kadi      = txtUser.Text;
                                ca.Sifre     = txtUserPswd.Text;
                                sonuc        = ca.UpdateKullanici(ca);
                                MessageBox.Show("Güncelleme İşlemi Başarılı", "Bilgi");
                                this.Close();
                            }
                            else
                            {
                                MessageBox.Show("Güncelleme Başarısız", "Hata");
                            }
                        }
                    }
                    else
                    {
                        MessageBox.Show(" Adres Boş Bırakılamaz!!", "Hata");
                    }
                }
                else
                {
                    MessageBox.Show("Kişisel Bilgiler Boş Bırakılamaz");
                    Temizle();
                }
                #endregion
            }
        }