Form1 de login kısmım var. Giriş yapan kişi kullanıcı ise form3 açılıyor. Form3 üzerinde ise labellar var. (örneğin ad: ---- gibi) ben bu labellara, giren kullanıcıya göre hangi kullanıcı girdiyse ona ait bilgileri labellar üzerine yazdırmak istiyorum. Nasıl yapabilirim? Veri tabanı olarak SQL server kullanıyorum.
A constructor in C# is called when a class or struct is created. Use constructors to set defaults, limit instantiation, and write flexible, easy-to-read code.
learn.microsoft.com
Formu olustururken bunu kullaniyorsun. Asagidaki kodu kullandigina eminim Form3'u acarken. Bu form3'e parametre olarak User'in bilgilerini girmeyi dusundun mu hic?
C#:
Form3 frm = new Form3();
Atiyorum;
C#:
Form3 frm = new Form3(name, surname, userName, mailAddress, dateOfBirth)
Bunun icin de Form3'un constructor'ini soyle degistirmen lazim (Icinde InitializeComponent(); olan fonksiyon);
A constructor in C# is called when a class or struct is created. Use constructors to set defaults, limit instantiation, and write flexible, easy-to-read code.
learn.microsoft.com
Formu olustururken bunu kullaniyorsun. Asagidaki kodu kullandigina eminim Form3'u acarken. Bu form3'e parametre olarak User'in bilgilerini girmeyi dusundun mu hic?
C#:
Form3 frm = new Form3();
Atiyorum;
C#:
Form3 frm = new Form3(name, surname, userName, mailAddress, dateOfBirth)
Bunun icin de Form3'un constructor'ini soyle degistirmen lazim (Icinde InitializeComponent(); olan fonksiyon);
A constructor in C# is called when a class or struct is created. Use constructors to set defaults, limit instantiation, and write flexible, easy-to-read code.
learn.microsoft.com
Formu olustururken bunu kullaniyorsun. Asagidaki kodu kullandigina eminim form3'u acarken. Bu form3'e parametre olarak User'in bilgilerini girmeyi dusundun mu hiç?
C#:
Form3 frm = new Form3();
Atiyorum;
C#:
Form3 frm = new Form3(name, surname, userName, mailAddress, dateOfBirth)
Bunun icin de form3'un constructor'ini soyle degistirmen lazim (ıcinde InitializeComponent(); olan fonksiyon);