예제 #1
0
        private void girilen_sifre_Karsilastir()
        {
            SQLiteCommand sifre_Getir = new SQLiteCommand("SELECT k_pass, k_dep FROM kullanici WHERE k_id = @k_id", frmAnaForm.sql_Baglanti);

            sifre_Getir.Parameters.AddWithValue("@k_id", cmb_id.SelectedItem.ToString());

            frmAnaForm.sql_Baglanti.Open();
            SQLiteDataReader sifre_Oku = sifre_Getir.ExecuteReader();

            while (sifre_Oku.Read())
            {
                if (sifre_Oku["k_pass"].ToString() == txt_pass.Text)
                {
                    frmAnaForm frmAna = ParentForm as frmAnaForm;
                    frmAna.kullanici_StripStatus_degis = cmb_id.SelectedItem.ToString();

                    departman(sifre_Oku["k_dep"].ToString());

                    this.Hide();
                }
                else
                {
                    txt_pass.Text = "";
                }
            }

            sifre_Oku.Close();
            frmAnaForm.sql_Baglanti.Close();
        }
예제 #2
0
        private void departman(string strDep)
        {
            frmAnaForm frmAna = ParentForm as frmAnaForm;

            switch (strDep)
            {
            case "Resepsiyon":
                frmAna.departman_StripStatus_degis  = strDep;
                frmAna.rezervasyon_MenuItem.Enabled = true;
                frmAna.m_giris_MenuItem.Enabled     = true;
                frmAna.m_cikis_MenuItem.Enabled     = true;
                frmAna.anaFormu_geriGetir();
                break;

            case "Restoran":
                frmAna.departman_StripStatus_degis = strDep;
                frmAna.restoran_MenuItem.Enabled   = true;
                break;

            case "Yonetim":
                frmAna.departman_StripStatus_degis = strDep;
                frmAna.yonetim_MenuItem.Enabled    = true;
                break;
            }
        }
예제 #3
0
 public frmMRezervasyon(frmAnaForm frmAnaForm)
 {
     InitializeComponent();
     this.frmAnaForm = frmAnaForm;
 }
예제 #4
0
 public frmSiparis(frmAnaForm frmAnaForm)
 {
     InitializeComponent();
     this.frmAnaForm = frmAnaForm;
 }
예제 #5
0
 public frmChekOut(frmAnaForm frmAnaForm)
 {
     InitializeComponent();
     this.frmAnaForm = frmAnaForm;
 }
예제 #6
0
 public frmYonetici(frmAnaForm frmAnaForm)
 {
     InitializeComponent();
     this.frmAnaForm = frmAnaForm;
 }
예제 #7
0
 public frmRestoran(frmAnaForm frmAnaForm)
 {
     InitializeComponent();
     this.frmAnaForm = frmAnaForm;
 }