Exemple #1
0
        private void BTServisKapat_Click(object sender, EventArgs e)
        {
            DialogResult result1 = MessageBox.Show("Servisi Kaldırmak İstediğinizden Eminmisiniz ? \nKaldırmanız durumunda Birdaha Değişiklik Yapılamaz !", "Kapatma İşlemi Onayı", MessageBoxButtons.YesNo);

            if (result1.ToString() == "Yes")
            {
                try
                {
                    SqlCommand myCommand = new SqlCommand("update ServisTarihleri Set ServisAcıkVeyaKapalı = '2' , TeslimTarihi = @TesT  where ServisId = @SID ", myConnection);
                    myCommand.CommandType = CommandType.Text;
                    myCommand.Connection  = myConnection;
                    myCommand.Parameters.AddWithValue("@TesT", DTPTeslimTarihi.Value.Date);
                    myCommand.Parameters.AddWithValue("@SID", servisId);

                    myConnection.Open();
                    myCommand.ExecuteNonQuery();
                    myConnection.Close();
                    MessageBox.Show("Servis Başarılı Şekilde Kapatılmıştır !");
                    GelinenTablo = new Form[GelinenTablo.Length];
                    Yönlendirmeler.setgirilenTabloSayısı(0);
                    TitanGiris F = new TitanGiris(GelinenTablo, KullanıcıYetkiSeviyesi);
                    this.SetVisibleCore(false);
                    F.ShowDialog();
                }
                catch (Exception ex)
                {
                    MessageBox.Show("Bir hata oluştu ! Lütfen Bağlantınızı Kontrol Ediniz !");
                }
            }
            else
            {
                MessageBox.Show("Servis Kaldırılmadı Değişiklik yapılabilir !");
            }
        }
Exemple #2
0
        private void BasaDon()
        {
            GelinenTablo = new Form[20];
            Yönlendirmeler.setgirilenTabloSayısı(0);
            TitanGiris giriseDon = new TitanGiris(GelinenTablo, KullanıcıYetkiSeviyesi);

            this.SetVisibleCore(false);
            giriseDon.ShowDialog();
        }
Exemple #3
0
 private void button1_Click(object sender, EventArgs e)
 {
     try
     {
         myConnection.Open();
         SqlDataReader myReader = null;
         CmdEsleme = @"select KullanıcıAdı , Sifre , YetkiDüzeyi from YetkiliKisi where KullanıcıAdı = ( '" + TBUserName.Text.ToString() +
                     "' ) and  Sifre = ( '" + TBSifre.Text.ToString() + "' ) ";
         try
         {
             SqlCommand myCommand = new SqlCommand(CmdEsleme, myConnection);
             myReader = myCommand.ExecuteReader();
             while (myReader.Read())
             {
                 yetkidüzeyi     = myReader["YetkiDüzeyi"].ToString();
                 kullanıcı_Adı   = myReader["KullanıcıAdı"].ToString();
                 kullanıcı_Sifre = myReader["Sifre"].ToString();
             }
             if (kullanıcı_Sifre == TBSifre.Text.ToString() && kullanıcı_Adı == TBUserName.Text.ToString())
             {
                 myConnection.Close();
                 GelinenTablo = new Form[20];
                 TitanGiris titan = new TitanGiris(GelinenTablo, yetkidüzeyi);
                 this.SetVisibleCore(false);
                 Yönlendirmeler.setKullanıcıYetkiSeviyesi(yetkidüzeyi);
                 titan.ShowDialog();
             }
             else
             {
                 myConnection.Close();
                 MessageBox.Show("Kullanici adi veya sifre hatalı!");
             }
         }
         catch (SqlException ex)
         {
             MessageBox.Show("You failed!! " + ex.Message);
         }
     }
     catch (SqlException ex)
     {
         MessageBox.Show("You failed!" + ex.Message);
     }
 }