示例#1
0
        //odobrenja pojedinacno
        private void Button6_Click(object sender, EventArgs e)
        {
            BrisiDatagrid();
            Odobrenja od     = new Odobrenja();
            UraStavka stavka = od.OdobrenjaPojedinacno(dataGridView1, datumOdBox, datumDoBox);

            PopuniLabeleZbroja(stavka);
        }
示例#2
0
        //Filter za odobrenja po nazivu dobavljača
        private void TxtDob_KeyUp(object sender, KeyEventArgs e)
        {
            int       column = 0;
            Odobrenja od     = new Odobrenja();
            Filter    filter = new Filter();

            if (dataGridView1.Rows.Count != 0)
            {
                if (dataGridView1.Columns[4].Name == "Naziv_dobavljaca")
                {
                    column = 4;
                }
                if (dataGridView1.Columns[2].Name == "Naziv_dobavljaca")
                {
                    column = 2;
                }

                filter.Filtriraj(txtDob.Text, dataGridView1, column);

                if (column == 4)
                {
                    foreach (DataGridViewRow Myrow in dataGridView1.Rows)
                    {                                                    //Here 2 cell is target value and 1 cell is Volume
                        if (Convert.ToInt32(Myrow.Cells[17].Value) != 0) // Or your condition
                        {
                            Myrow.DefaultCellStyle.BackColor = Color.MistyRose;
                        }
                    }
                    PopuniLabeleZbroja(od.ZbrojiOdobrenja(dataGridView1));
                }

                if (column == 0)
                {
                    PopuniLabeleZbroja(od.ZbrojiOdobrenjaZbirno(dataGridView1));
                }
            }
        }