Exemplo n.º 1
0
        private void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e)
        {
            DataGridView dgv = sender as DataGridView;

            if (dgv == null)
            {
                return;
            }
            foreach (DataGridViewRow row in dgv.SelectedRows)
            {
                int         idanunt = Convert.ToInt32(row.Cells["ID"].Value.ToString());
                AnouncePage a       = new AnouncePage(crtUsr, idanunt, true);//id anunt ev driv corespunzator
                a.Show();
            }
        }
Exemplo n.º 2
0
        private void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e)
        {
            var          dbContext = new OLXDataContext();
            DataGridView dgv       = sender as DataGridView;

            if (dgv == null)
            {
                return;
            }
            foreach (DataGridViewRow row in dgv.SelectedRows)
            {
                int idanunt = Convert.ToInt32(row.Cells["ID_ANUNT"].Value.ToString());

                bool IStheCreator = false;
                if (dbContext.spVerificaUserToAnounce(idanunt).ToString() == Program.OLXusername)
                {
                    IStheCreator = true;
                }

                AnouncePage a = new AnouncePage(row.Cells["ID_PROPRIETAR"].Value.ToString(), idanunt, IStheCreator);//id anunt ev driv corespunzator
                a.Show();
            }
        }