Ejemplo n.º 1
0
        private async void button4_Click(object sender, EventArgs e)
        {
            if (txtSlidePanelTitle.Text != "Users")
            {
                txtSlidePanelTitle.Text      = "Users";
                lblManageBtnSHeader.Text     = "Manage User / Workplace";
                lblManageBtnSHeader.Location = new Point(60, 385);

                panelAddDelEd.Visible = false;
                UC_KorisniciEditDelete uc_korisniciEditDelete = new UC_KorisniciEditDelete();
                Helper.DodajKontrolu(uc_korisniciEditDelete, "UC_Edit_Delete_Korisnici", new Point(20, 450), panel3);

                //Resizisng additional controls (20,500)->(20,450)


                await uc_korisniciEditDelete.LoadDGV();

                uc_korisniciEditDelete.LoadCMBs();
                UC_KorisniciEdit uc_korisniciEdit = new UC_KorisniciEdit();
                Helper.DodajKontrolu(uc_korisniciEdit, "UC_Edit_Korisnici", new Point(550, 450), panel3);


                if (Hidden)
                {
                    timer1.Start();
                }
                return;
            }
            else
            {
                timer1.Start();
            }
        }
Ejemplo n.º 2
0
        //___DELETING___
        private async void btnDelete_Click(object sender, EventArgs e)
        {
            WindowState = FormWindowState.Maximized;

            if (ProvjeriHeader("Manage Partners"))
            {
                if (ProvjeriKontrolu("UC_Delete_Partner"))
                {
                    return;
                }

                uc_partneri_delete = new UC_PartneriDelete();
                //testMetodaDGV(uc_partneri_delete, "UC_Delete_Partner", new Point(20, 500));
                Helper.DodajKontrolu(uc_partneri_delete, "UC_Delete_Partner", new Point(20, 450), panel3);//500->450

                uc_partneri_delete.dataGridView1.DataSource = await _serviceP.Get <List <Partner> >(new PartneriSearchRequest { VrstaPartneraId = VrstaPartneraID });

                uc_partneri_delete.dataGridView1.CellContentClick += delegate(object sen, DataGridViewCellEventArgs er)
                {
                    UC_Delete_Partner(sender, er, uc_partneri_delete);
                };
                return;
            }
            if (ProvjeriHeader("Manage Users"))
            {
                UC_KorisniciEditDelete uc_korisniciEditDelete = new UC_KorisniciEditDelete();
                //testMetodaDGV(uc_korisniciEditDelete, "UC_Delete_Partner", new Point(20, 500));
                Helper.DodajKontrolu(uc_korisniciEditDelete, "UC_Delete_Partner", new Point(20, 450), panel3);//500->450

                uc_korisniciEditDelete.dataGridView1.DataSource = await _serviceKorisnici.Get <List <Korisnik> >(null);

                uc_korisniciEditDelete.dataGridView1.CellContentClick += delegate(object sen, DataGridViewCellEventArgs er)
                {
                    //UC_Delete_Partner(sender, er, uc_partneri_delete);
                };
                return;
            }

            if (ProvjeriKontrolu("UC_Delete"))
            {
                return;
            }

            uc_PoslovnicaDelete = new UC_PoslovniceDelete();
            //testMetodaDGV(uc_PoslovnicaDelete, "UC_Delete", new Point(20, 500));
            Helper.DodajKontrolu(uc_PoslovnicaDelete, "UC_Delete", new Point(20, 450), panel3);//500->450

            uc_PoslovnicaDelete.DataSource = await _servicePoslovnica.Get <List <Poslovnica> >(null);

            uc_PoslovnicaDelete.dataGridView1.ClearSelection();

            uc_PoslovnicaDelete.dataGridView1.CellContentClick += delegate(object sen, DataGridViewCellEventArgs er)
            {
                UC_Delete_Poslovnica(sender, er, uc_PoslovnicaDelete);
            };
        }
Ejemplo n.º 3
0
        private async void GetBrojNeregistrovanihKorisnika()
        {
            UC_KorisniciEditDelete uc_korisniciEditDelete = new UC_KorisniciEditDelete();
            int brKor = await uc_korisniciEditDelete.GetBrojKorisnika();

            if (brKor > 0)
            {
                txtNotifikacija.Visible = true;
                txtNotifikacija.Text    = brKor.ToString();
            }
            else
            {
                txtNotifikacija.Visible = false;
            }
        }