I am creating a winform app that accepts a name and position as input and upon clicking the submit button generates a barcode of that name and prints that on the entered position in a pdf file(generates this as well). The app is giving me error on Environment.Exit(1) - Error Creating Window...
I am creating a pdf using PDFsharp and saving it automatically on button click-
// Save the document...
string filename = "Barcode.pdf";
document.Save(@"E:\" + filename);
MessageBox.Show("PDF saved successfully!");
Instead of automatically saving it by...
Good evening,
I get an error on this line :
command.Parameters.AddWithValue("@chambreCat", Convert.ToInt32(cbAdminCat.Text));
I want to be able to convert my character string to INT otherwise I could not insert the value into the database if it is not an integer.
Here is the code for my...
Hello, When I display all the agents in my listBox I get the right number of agents but not the right information. I get the result from the attachment.
And here is the code of my function:
public static List<Utilisateur> GetTousLesAgents()
{
List<Utilisateur> ListeUsers =...
Hello,
I get an encoding related error when I want to check if my database connection is working when I press the "Connection" button on my form.
The error is on "conn.Open();".
I have attached my static class which contains the function for connection and the code where I call my function...
namespace SafeHaven
{
public class Class
{
public string Name { get; set; }
public string Description { get; set; }
public decimal Balance { get; set; }
public int Amount { get; set; } = 0;
public void MakeCharacteristics() { }
public...
Hello,
I have a console app that calls an API and gets a response in JSON
I'd like to the "upload" this json into an existing SQL Server Table.
Is this possible?
Hello Everyone,
I am writing unit test cases(using xunit) for DAL methods(which are calling stored procedures and some direct sql commands and not returning methods). How can I mock the results coming from db in unit tests.
public class Notification : Base, INotificationBal
{
public void...
Hello Everyone,
I am using visual studio 2022 professional. Used Xunit, wrote unit cases in the project. How can I see the code coverage percentage.
Please suggest me.
Thanks
Hello Everyone,
Can someone suggest me to create unit test project with mocked dependency injection & other dependencies used in business logic with sample reference.
Thanks
Sam
Hi Guys,
I want to create my own mp4 class to modify file details(Title,comments,author etc.), but I don't know how to start. Could you expert help me? thank you.
Hello!!! :)
I am trying to make a custom UITypeEditor with a dialog box which will import .svg files into a project or will select one from those already imported, like the Select Resource Dialog Box does with other files.
I have managed to make it get the .svg file from a file and then place...
Hi Gents,
I have a specific requirement is to get a valid stream(which will be further operate) from given zip path?
The situation is use a support code snippet to determine given path is xml/zip file(one of these files inside zip is xml which what I want), if it's a xml then easily get a...
Is there a way to know if these 2 lines have the same size in pixels aka length? What code should I use to determine if they have the same length or not?
Just because these perpendicular lines created with ASCII, they differ in length size according to whether they were put next to one another...
The user enters integers from the keyboard (numbers are entered alternately,
the user enters a number and presses "Enter"). The sequence of numbers ends
by entering the value "0". Count the number of even and odd numbers,
number of positive and negative.
Requirements
1. set Unicode encoding for...
If anyone can help me, I'm not able to convert the txt to include in the list
string thePath = @"C:\Spectrum.txt";
string seq = File.ReadAllText(thePath);
//read the numbers by line
string[] text = Regex.Split(seq, "\t");
List<(double mz, double intensity)> ions = new List<(double mz...
Hi Everyone,
I am glad to be on this forum with you all, it is always a source of great content and amazing advice.
Speaking of which, I wanted to make a quick announcement as I am pretty sure it will be of great interest and value to some of you guys.
OpenSilver 1.1 has now been released...
It's been weeks of searching everywhere but couldn't find any help and finally i'm posting my query here.
I'm not finding a way to integrate Skype Personal (Not Skype Business/Lync) in my c# application. I just want to receive Skype messages on my application from the skype installed on the...
Hello everybody,
I would need some help, I'm creating a program, and through the datagridview function I get the data from the mysql database, but I need to be able to add buttons (with images) on some lines.
at this moment it adds the button on all lines
Example:
If the event has associated a...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.