Tag Archives: Window Application
How to implement Window Authentication Functionality to a C# Desktop Application
1) Get currently logged in user details: We can achieve this by using the WindowsIdentity class of System.Security.Principal namespace. This class provides a static method, getCurrent(), which return a object of WindowsIdentity. 2) Validate windows credentials provided by user:(Ask User … Continue reading
Writing to an ms access database using C# Window Application
Please try below code to write in MS ACCESS databse using C# Window Application: System.Data.OleDb.OleDbConnection conn = new System.Data.OleDb.OleDbConnection(@”Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Users\amar\Documents\Database1.accdb”); conn.Open(); using (System.Data.OleDb.OleDbCommand cmd = new System.Data.OleDb.OleDbCommand()) { cmd.Connection = conn; cmd.CommandText = “Insert Into Employee (UserName, fname, sname, email) … Continue reading
How to get date value form one form to another form using C# in Window Application
Create a constructor on form2 with input parameter as date time. And when you create object of form2 in form1 just pass the date value using C# in window application. form1 coding: DateTime objdate = dateTimePicker1.Value; form2 objform2= new form2(objdate) … Continue reading