Salakhosh
Salakhosh
CC#
Created by Salakhosh on 7/14/2023 in #help
❔ if I create Var p=new dynamicParameter() and p.add(“@X”,null) would it give me an error?
Help please as there is a bug where X is not null the API get connected to database and retrieve data while in null part it doesn’t (keep in mind that I handled null in sql )
3 replies
CC#
Created by Salakhosh on 6/27/2023 in #help
❔ can someone please help me make a 4 day road map before my internship starts?
Hello, so I landed this internship where the current goal is to build a system using WPF. I had a task before hand and I was able to do it ( it was to write a system where you import excel file and display it to WPF and then save it to database)[ I googled a lot but understood what I was writing ]. Recruiter knows that I have no knowledge in C# and I want to leave a good impression from beginning. Can someone please help me what should I study? We are using WPF with MVVM and Team foundation system. Thanks in advance
16 replies
CC#
Created by Salakhosh on 6/22/2023 in #help
❔ fastest way to add a datatable to database
Hello, so I was doing a task and my final step was adding a datatable to a database. I did connections and everything and I for loop over every element in data table and added it to database.( I never worked with C# so I don’t really know much about its classes) .Recruiter told me there is a faster way. Can someone please help me with code ? (assume I have DataTable dataTable with all the data and I want to import it into database with features (EmployeeID, Name,Date)
10 replies
CC#
Created by Salakhosh on 6/21/2023 in #help
❔ There is a DevExpress GridControl and i want to find a way to loop over its rows
Can someone help me find online how to do this thing. i want to loop over its data so that i can add it to the database. Thanks in advance
7 replies
CC#
Created by Salakhosh on 6/21/2023 in #help
Does anyone know how to import datatable into an SQL Server?
I have this task to import excel file to grid control and what i did was use oledb to parse excel file to datatable and then bind it to GridControl. How can i then import this datatable to an sql server? thanks in advance
2 replies
CC#
Created by Salakhosh on 6/21/2023 in #help
How can i import excel file to dataTable using C#(WPF application) and oledb.
Hello so i have task where i have to browse an excel file and import its data to a data table but when im using oledb and reach query part it give me that Sheet1 doesnt exist and honestly idk what should i write. This is what i reached so far private void Browse_Click(object sender, RoutedEventArgs e) { OpenFileDialog ofd = new OpenFileDialog(); ofd.Filter = "Excel Files|xlsx,xls"; if (ofd.ShowDialog() == System.Windows.Forms.DialogResult.OK) { PathBox.Text = ofd.FileName; string path = ofd.FileName; string connectionString = $"Provider=Microsoft.ACE.OLEDB.12.0;Data Source={path};Extended Properties='Excel 12.0 Xml;HDR=YES;'"; using (OleDbConnection connection = new OleDbConnection(connectionString)) { connection.Open(); DataTable dataTable = new DataTable(); // Assuming the data is in the first worksheet string query = "SELECT * FROM [Sheet1$]"; using (OleDbDataAdapter adapter = new OleDbDataAdapter(query, connection)) { adapter.Fill(dataTable); } connection.Close(); } }
1 replies
CC#
Created by Salakhosh on 6/20/2023 in #help
❔ How to import Excel File with row header to GridControl using C#. WPF application
Hello, can someone please help me write the code? I added a button that can browse and get path for excel file. The name of gridcontrol is Grids. And assume the code is written in button class
35 replies