public void OpenConnection(string connectionString)
{
connect = new SqlConnection(connectionString);
connect.Open();
}
public void CloseConnection()
{
connect.Close();
}
}
Satr qo`shish metodini yaratish
Oldingi misoldagi Inventory jadvaliga yangi satr(yozuv qo`shish) uchun SQL tilidagi Insert operatoridan foydalanamiz va buning uchun quyidagi metodi yaratamiz:
Mavjud satrni tahrirlash(o`zgartirish)
MB da oldindan mavjud ma`lumotlarni o`zgartirishni amalga oshiruvchi metodni yaratamiz: