nole19
Connection property has not been initialized
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Microsoft.Data.SqlClient;
using System.Configuration;
namespace AutiKlijent
{
internal class Konekcija
{
public static readonly string konekcioniString = ConfigurationManager.ConnectionStrings["AutiDB"].ConnectionString;
public static void TestKonekcije()
{
using SqlConnection konekcija = new(konekcioniString);
konekcija.Open();
}
}
}
22 replies
Connection property has not been initialized
private void textBoxPretraziMarke_TextChanged(object sender, EventArgs e)
{
PrimeniPretragu();
}
private void NadjiModelMarke()
{
int tekuciRed = dataGridViewMarke.CurrentRow.Index;
int MarkaID = (int)dataGridViewMarke.Rows[tekuciRed].Cells[0].Value;
podaciModela.DataSource = ModelDAO.UcitajModel(MarkaID);
dataGridViewModel.DataSource = podaciModela;
}
private void dataGridViewMarke_SelectionChanged(object sender, EventArgs e)
{
NadjiModelMarke();
}
}
}
22 replies