private void Frm_Kvarovi_Load(object sender, EventArgs e)
        {
            //get all Kvarovi
            Kvarovi.KvarsDataTable dtKvarovi = new Kvarovi.KvarsDataTable();

            DAKvarovi.GetKvarovi(dtKvarovi);

            dataGridKvarovi.DataSource = dtKvarovi;
        }
        public static void GetKvarovi(Kvarovi.KvarsDataTable dtKvarovi)
        {
            //open connection
            SqlConnection cn = Connection.GetConnection();

            if (cn.State == System.Data.ConnectionState.Closed)
            {
                cn.Open();
            }

            try
            {
                SqlCommand cmd = new SqlCommand("usp_Kvarovi", cn);
                cmd.CommandType = System.Data.CommandType.StoredProcedure;

                SqlDataAdapter adapter = new SqlDataAdapter(cmd);
                adapter.Fill(dtKvarovi);
            }
            finally
            {
            }
        }