Example #1
0
        private void buttonInapoi_Click(object sender, EventArgs e)
        {
            Meniu meniu = new Meniu();

            this.Hide();
            meniu.Show();
        }
Example #2
0
        private void buttonLogare_Click(object sender, EventArgs e)
        {
            string conString = @"Provider = Microsoft.ACE.OLEDB.12.0; Data Source = Logare.accdb";
            string comanda   = "Select Count(*) from Logare where NumeUtilizator=? and [Parola]=?";

            using (OleDbConnection con = new OleDbConnection(conString))
                using (OleDbCommand cmd = new OleDbCommand(comanda, con))
                {
                    con.Open();
                    cmd.Parameters.AddWithValue("@p1", tbUser.Text);
                    cmd.Parameters.AddWithValue("@p2", tbParola.Text);
                    if (tbUser.Text == "" || tbParola.Text == "")
                    {
                        MessageBox.Show("Userul si parola trebuie completate!");
                        return;
                    }
                    int rez = (int)cmd.ExecuteScalar();
                    if (rez > 0)
                    {
                        this.Hide();
                        Meniu meniu = new Meniu();
                        meniu.ShowDialog();
                    }
                    else
                    {
                        MessageBox.Show("Username sau parola gresita!");

                        tbParola.Clear();
                    }
                }
        }
Example #3
0
        public lvJoburi(Meniu meniu)
        {
            this.meniu = meniu;
            InitializeComponent();
            foreach (Job j in this.meniu.ListaJoburi)
            {
                ListViewItem liviJ = new ListViewItem(j.DenumireJob);
                liviJ.SubItems.Add(j.ExperientaNecesara.ToString());
                liviJ.SubItems.Add(j.SalariuMax.ToString());
                liviJ.SubItems.Add(j.SalariuMin.ToString());

                this.lviJoburi.Items.Add(liviJ);
            }
        }
Example #4
0
        public VizualizareCursuri(Meniu meniu)
        {
            this.meniu = meniu;
            InitializeComponent();
            foreach (Curs c in this.meniu.ListaCursuri)
            {
                ListViewItem livi = new ListViewItem(c.IDCurs.ToString());
                livi.SubItems.Add(c.DenumireCurs);
                livi.SubItems.Add(c.DenumireDepartament);
                livi.SubItems.Add(c.NrOre.ToString());

                this.lvCursuri.Items.Add(livi);
            }
        }
Example #5
0
        public VizualizareAngajati(Meniu meniu)
        {
            this.meniu = meniu;
            InitializeComponent();
            ListView liv = new ListView();

            foreach (Persoana p in this.meniu.ListaAngajati)
            {
                ListViewItem liviCnp = new ListViewItem(p.Cnp);
                liviCnp.SubItems.Add(p.Nume);
                liviCnp.SubItems.Add(p.Prenume);
                liviCnp.SubItems.Add(p.DataAngajare.ToString());
                liviCnp.SubItems.Add(p.Experienta.ToString());
                liviCnp.SubItems.Add(p.Salariu.ToString());
                liviCnp.SubItems.Add(p.Departament);
                liviCnp.SubItems.Add(p.Studii);
                this.lvAngajati.Items.Add(liviCnp);
            }
        }
Example #6
0
        public GestionareInformatii(Meniu m)
        {
            InitializeComponent();
            meniu             = m;
            nrobs             = 2;
            x                 = new string[] { "Femei", "Barbati" };
            y                 = new int[] { 0, 0 };
            this.ResizeRedraw = true;

            //imi iau angajatii dupa prima cifra a cnp-ului
            foreach (Persoana p in this.meniu.ListaAngajati)
            {
                if (p.Cnp[0] == '2' || p.Cnp[0] == '6')
                {
                    y[0]++;
                }
                else
                {
                    y[1]++;
                }
            }
        }
Example #7
0
 public AdaugareAngajat(Meniu meniu)
 {
     this.meniu = meniu;
     InitializeComponent();
 }
Example #8
0
 public AdaugareJob(Meniu meniu)
 {
     this.meniu = meniu;
     InitializeComponent();
 }