Пример #1
0
        private void Vhod_Click(object sender, RoutedEventArgs e)
        {
            string pw          = "";
            string rol         = "";
            int    idSotrudnik = Convert.ToInt32(cmbSotrudnik.SelectedValue);

            using (CRM_magEntities contextDB = new CRM_magEntities())
            {
                pw = (((from st in contextDB.Sotrudniki
                        where (st.id_sotrudnik == idSotrudnik)
                        select new { st.parol }).FirstOrDefault()).parol).ToString();
                rol = (((from st in contextDB.Sotrudniki
                         where (st.id_sotrudnik == idSotrudnik)
                         select new { st.rol }).FirstOrDefault()).rol).ToString();
            }

            //if (pw == parolBox.Password.ToString())
            //{
            if (rol == "л")
            {
                TekushOstatkiPoSkladu lg = new TekushOstatkiPoSkladu();
                lg.Show();
            }
            else if (rol == "д")
            {
                MainWindow mw = new MainWindow(idSotrudnik);
                mw.Show();
            }
            else
            {
                Rukovodstvo r = new Rukovodstvo(idSotrudnik);
                r.Show();
            }
            //}
            this.Close();
        }
Пример #2
0
        private void btnLogistika_Click(object sender, RoutedEventArgs e)
        {
            TekushOstatkiPoSkladu lg = new TekushOstatkiPoSkladu();

            lg.Show();
        }
Пример #3
0
        private void miOstatkiPoSkladu_Click(object sender, RoutedEventArgs e)
        {
            TekushOstatkiPoSkladu tops = new TekushOstatkiPoSkladu();

            tops.Show();
        }