private void dgv_CellClick(object sender, DataGridViewCellEventArgs e)
        {
            if (e.RowIndex == -1)
            {
                return;
            }

            if (e.ColumnIndex == 7)
            {
                decimal  u;
                DateTime d;
                decimal.TryParse(dgv.CurrentRow.Cells["Ukupno"].FormattedValue.ToString(), out u);
                DateTime.TryParse(dgv.CurrentRow.Cells["datum"].FormattedValue.ToString(), out d);

                Salda_konti.frmUnosSaldaKonti sk = new Salda_konti.frmUnosSaldaKonti();
                sk._dokumenat = "ULAZNA FAKTURA";
                sk._broj      = dgv.CurrentRow.Cells["broj"].FormattedValue.ToString();
                //sk._id_ducan = dgv.CurrentRow.Cells["id_ducan"].FormattedValue.ToString();
                //sk._id_kasa = dgv.CurrentRow.Cells["id_kasa"].FormattedValue.ToString();
                sk._iznos        = u;
                sk._id_partner   = dgv.CurrentRow.Cells["sifra_partner"].FormattedValue.ToString();
                sk._id_skladiste = "";
                sk._godina       = d.Year.ToString();
                sk.ShowDialog();
                pictureBox1_Click(sender, e);

                return;
            }
        }
        private void dataGridView1_CellClick(object sender, DataGridViewCellEventArgs e)
        {
            if (e.RowIndex == -1)
            {
                return;
            }

            if (e.ColumnIndex == 8)
            {
                decimal  u;
                DateTime d;
                decimal.TryParse(dataGridView1.CurrentRow.Cells["fakturni_iznos"].FormattedValue.ToString(), out u);
                DateTime.TryParse(dataGridView1.CurrentRow.Cells["datum"].FormattedValue.ToString(), out d);

                Salda_konti.frmUnosSaldaKonti sk = new Salda_konti.frmUnosSaldaKonti();
                sk._dokumenat    = "KALKULACIJA";
                sk._broj         = dataGridView1.CurrentRow.Cells["broj"].FormattedValue.ToString();
                sk._id_ducan     = "";
                sk._id_kasa      = "";
                sk._iznos        = u;
                sk._id_partner   = dataGridView1.CurrentRow.Cells["id_partner"].FormattedValue.ToString();
                sk._id_skladiste = dataGridView1.CurrentRow.Cells["id_skladiste"].FormattedValue.ToString();
                sk._godina       = d.Year.ToString();
                sk.ShowDialog();
                pictureBox1_Click(sender, e);

                return;
            }
        }
        private void dgv_CellClick(object sender, DataGridViewCellEventArgs e)
        {
            if (e.RowIndex == -1)
            {
                return;
            }

            if (dgv.Columns[e.ColumnIndex].Name == "placeno")
            {
                //}
                //if(e.ColumnIndex==9)
                //{
                decimal  u;
                DateTime d;
                decimal.TryParse(dgv.CurrentRow.Cells["Ukupno"].FormattedValue.ToString(), out u);
                DateTime.TryParse(dgv.CurrentRow.Cells["datum"].FormattedValue.ToString(), out d);

                Salda_konti.frmUnosSaldaKonti sk = new Salda_konti.frmUnosSaldaKonti();
                sk._dokumenat    = "FAKTURA";
                sk._broj         = dgv.CurrentRow.Cells["broj"].FormattedValue.ToString();
                sk._id_ducan     = dgv.CurrentRow.Cells["id_ducan"].FormattedValue.ToString();
                sk._id_kasa      = dgv.CurrentRow.Cells["id_kasa"].FormattedValue.ToString();
                sk._iznos        = u;
                sk._id_partner   = dgv.CurrentRow.Cells["dgv_partner"].FormattedValue.ToString();
                sk._id_skladiste = "";
                sk._godina       = d.Year.ToString();
                sk.ShowDialog();
                pictureBox1_Click(sender, e);
                //fillDataGrid();
                return;
            }

            try
            {
                if (dgv.Rows.Count >= 1)
                {
                    string br = dgv.CurrentRow.Cells["broj"].FormattedValue.ToString();

                    fillDataGrid_stavke(br, dgv.CurrentRow.Cells["id_ducan"].FormattedValue.ToString(), dgv.CurrentRow.Cells["id_kasa"].FormattedValue.ToString());
                }
            }
            catch { }
        }