|
Apologies for the shouting but this is important.
When answering a question please:
- Read the question carefully
- Understand that English isn't everyone's first language so be lenient of bad spelling and grammar
- If a question is poorly phrased then either ask for clarification, ignore it, or mark it down. Insults are not welcome
- If the question is inappropriate then click the 'vote to remove message' button
Insults, slap-downs and sarcasm aren't welcome. Let's work to help developers, not make them feel stupid..
cheers,
Chris Maunder
The Code Project Co-founder
Microsoft C++ MVP
|
|
|
|
|
For those new to message boards please try to follow a few simple rules when posting your question.- Choose the correct forum for your message. Posting a VB.NET question in the C++ forum will end in tears.
- Be specific! Don't ask "can someone send me the code to create an application that does 'X'. Pinpoint exactly what it is you need help with.
- Keep the subject line brief, but descriptive. eg "File Serialization problem"
- Keep the question as brief as possible. If you have to include code, include the smallest snippet of code you can.
- Be careful when including code that you haven't made a typo. Typing mistakes can become the focal point instead of the actual question you asked.
- Do not remove or empty a message if others have replied. Keep the thread intact and available for others to search and read. If your problem was answered then edit your message and add "[Solved]" to the subject line of the original post, and cast an approval vote to the one or several answers that really helped you.
- If you are posting source code with your question, place it inside <pre></pre> tags. We advise you also check the "Encode "<" (and other HTML) characters when pasting" checkbox before pasting anything inside the PRE block, and make sure "Use HTML in this post" check box is checked.
- Be courteous and DON'T SHOUT. Everyone here helps because they enjoy helping others, not because it's their job.
- Please do not post links to your question into an unrelated forum such as the lounge. It will be deleted. Likewise, do not post the same question in more than one forum.
- Do not be abusive, offensive, inappropriate or harass anyone on the boards. Doing so will get you kicked off and banned. Play nice.
- If you have a school or university assignment, assume that your teacher or lecturer is also reading these forums.
- No advertising or soliciting.
- We reserve the right to move your posts to a more appropriate forum or to delete anything deemed inappropriate or illegal.
cheers,
Chris Maunder
The Code Project Co-founder
Microsoft C++ MVP
|
|
|
|
|
Here are the constraints that I am facing
Can only use SQL Server
Cannot use Entity Framework or Dapper
Can only use .NET Framework (can't use any Python or JS)
What I am working on is a project for a factory I work for is that I am digitizing our quality inspections, of which there are numerous. The first step is that I created some models to that are used to create a Quality Inspection plan, which are here below:
public class QualityInspection
{
public int Id;
public string Name;
public double Frequency;
public List<InspectionSection> Sections;
}
public class InspectionSection
{
public int Id;
public int InspectionId;
public string Name;
public List<InspectionPoint> Points;
}
public class InspectionPoint
{
public int Id;
public int SectionId;
public string Name;
public List<NonConformance> InspectionResults;
}
public class NonConformance
{
public int Id;
public string Name;
public List<NonConformanceLevel> Level;
}
public enum NonConformanceLevel
{
None,
Minor,
Major
}
This is an example of a dummy inspections plan:
QualityInspection inspection = new QualityInspection()
{
Id = 1,
Name = "FgInspection",
Frequency = 2,
Sections.AddRange(new[]
{
new InspectionSection() {
Id = 1,
InspectionId = 1,
Name = "Packaging",
Points.AddRange(new[]
{
new InspectionPoint()
{
Id = 1,
SectionId = 1,
Name = "Seals",
InspectionResults.AddRange(new[]
{
new NonConformance() {Id = 1, Name = "Torn", Level = NonConformanceLevel.Minor},
new NonConformance() {Id = 2, Name = "None", Level = NonConformanceLevel.None})
});
},
new InspectionPoint()
{
Id = 2,
SectionId = 1,
Name = "Dates",
InspectionResults.AddRange(new[]
{
new NonConformance() {Id = 3, Name = "Smudged", Level = NonConformanceLevel.Minor},
new NonConformance() {Id = 4, Name = "None", Level = NonConformanceLevel.None})
});
}
});
}
}),
});
};
To clarify, saving this inspection is NOT THE ISSUE. This is able to be saved to a SQL table without a problem.
Let's use the "Packaging" section as an example here. The user pulls up this Inspection to fill out. The page displays Two dropdowns: one for "Seals" Inspection Point and one for "Dates" Inspection Point. The "Seals" dropdown displays the two NonConformances as options to select. The user hits a Submit button to submit the choices for the dropdown.
This is where I run into a problem. This Inspection Plan is created by a USER in a different portion of the app. As such, I don't have a table so save the "Seals" or "Dates" data, because the user created those fields when they created the inspection plan. In essence I am trying to save the RESULTS of an a user created inspection plan.
|
|
|
|
|
i have already C# login app code ,so now i need to create the system tray for that login app
so i need to know which library will support for this ,and now i am doing in windows.
|
|
|
|
|
|
Hello, I have a question. Can I design programs with a graphical interface in C#, Dot Net Core technology, and these programs work on the DOS operating system, such as Norton Ghost Bragg? Thank you.
|
|
|
|
|
No. DOS does not support .NET, C#, or have a GUI!
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
"Common sense is so rare these days, it should be classified as a super power" - Random T-shirt
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
Unless you could port this project[^] to work on it.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
I can't be the only one that is curious to know what "Norton Ghost Bragg" is?
|
|
|
|
|
No, you are not.
"the debugger doesn't tell me anything because this code compiles just fine" - random QA comment
"Facebook is where you tell lies to your friends. Twitter is where you tell the truth to strangers." - chriselst
"I don't drink any more... then again, I don't drink any less." - Mike Mullikins uncle
|
|
|
|
|
I suspect he means "Norton Ghost[^] Backup" a DOS based app that later moved a Windows front end that created bootable DOS images to do the actual work, apparently.
It finally died from terminal apathy on the market side in 2013. A stake was driven through the source code and it was ritually be-header filed.
We shall not see it's like again. Hopefully.
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
"Common sense is so rare these days, it should be classified as a super power" - Random T-shirt
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
So they just want to run that automatically?
It has a UI, at least usage examples I saw show that. Which means one can write a C# app to feed UI events to it.
|
|
|
|
|
No, I think he wants to run actual C#, GUI apps under DOS ... Ghost was an abortion of a "conversion" which just provided a Windows front end that generated a bootable DOS floppy to do the backup - Windows was not involved at all by that stage!
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
"Common sense is so rare these days, it should be classified as a super power" - Random T-shirt
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
I’m writing my main project in c++ but in order to get better at c++ I need to improve my c# skills. My question is what should a person learn after getting comfortable with variables, lists and classes in C#. I remember seeing helper constructs that make certain operations when dealing with lists easier but at that time I could not understand them. What would be your recommendation for let’s say top four things to know after learning the basics in C#?
|
|
|
|
|
I doubt that learning C# can help with learning C++.
|
|
|
|
|
With c# you learn about the type of problems a programmer has to deal with and an easy and friendly way to solve them. I had been alternating from one language to the other since I started programming, this is how I got better at c++.
At the end of the day why I want to improve my c# skills doesn’t matter
|
|
|
|
|
If you want to improve your C# skills then randomly asking "what should I learn next" isn't the best way: there is just too much stuff in there.
At it's heart, C# is a pretty simple language, but it's tightly integrated with the .NET framework which is frankly enormous. While variables and classes are part of C#, Lists and such like aren't - they are part of the framework. And while C# and C++ look pretty similar they really aren't, they are very different languages, which can use the same framework but don't have to - C++ doesn't need to use .NET at all!
So "learning C# to get better at C++" isn't really a brilliant idea because you are learning stuff that isn't relevant and may not be transferable.
It may be easier to learn how to think like a developer in C# because it's a lot more forgiving and the .NET framework adds a hugely rich set of support classes but learning specific features isn't the way to do it as they are probably not transferable to "vanilla" C++
What I'd suggest is this: if you want to learn a language then go on a course, or get a book and learn that language. Don't try to learn "X" in the hope it'll make "Y" work as well because it won't - like learning to fly a drone won't teach you to fly a helicopter!
That applies to C# and C++.
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
"Common sense is so rare these days, it should be classified as a super power" - Random T-shirt
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
I understand, C# is not just a beginners language it’s a language used for serious things.
I’m looking to learn the features with a general purpose scope
|
|
|
|
|
Then you want to learn "patterns"; not languages.
The architect learns about windows and doors before flying butresses.
"Before entering on an understanding, I have meditated for a long time, and have foreseen what might happen. It is not genius which reveals to me suddenly, secretly, what I have to say or to do in a circumstance unexpected by other people; it is reflection, it is meditation." - Napoleon I
|
|
|
|
|
A lot of C# features are probably there for dealing with specific tasks ( “link” is for working with databases, etc. ) But I’m sure there are also features useful for any type of project too
>Then you want to learn patterns.
I can’t imagine a learning resource that teaches abstract programming rules.
|
|
|
|
|
You don't need wood and bricks to learn about windows.
"Before entering on an understanding, I have meditated for a long time, and have foreseen what might happen. It is not genius which reveals to me suddenly, secretly, what I have to say or to do in a circumstance unexpected by other people; it is reflection, it is meditation." - Napoleon I
|
|
|
|
|
Calin Negru wrote: “link” is for working with databases, etc.
linq (spelling) was not added to deal with databases. It was added as a result of a surge of interest, or at least perceived interest, in functional programming.
Then someone decided it would be a 'good' idea to use linq to access databases.
They were wrong.
They were not also the first ones to think that a generic in language source would somehow be better for database access. Long before that C++ (or maybe java) had an alternative in the language (sort of) for SQL. But it never took off. Probably for the similar reasons as it made simple problems simpler (which was never a complaint) but complex problems either difficult or even impossible to deal with.
|
|
|
|
|
LINQ doesn't "do databases"; it does "data models". The "source" of the model varies: database; objects; XML. An architecture that allows for "new" types of sources. Most issues are due to not understanding the client / server relationship and the purpose of stored procedures.
"Before entering on an understanding, I have meditated for a long time, and have foreseen what might happen. It is not genius which reveals to me suddenly, secretly, what I have to say or to do in a circumstance unexpected by other people; it is reflection, it is meditation." - Napoleon I
|
|
|
|
|
Gerry Schmitz wrote: LINQ doesn't "do databases"; it does "data models". The "source" of the model varies: database; objects; XML
No idea how that changes what I said.
Gerry Schmitz wrote: Most issues are due to not understanding the client / server relationship and the purpose of stored procedures.
I can't speak as to the source of of your "most" comment. But I can speak as to the problems I found of which I do not believe any had to do with stored procedures.
|
|
|
|
|
Gerry, jschell
The problem is I’m not programming a server or a client or anything that has to do with databases. Besides there is nothing in c++ like it AFAICT
I’ve had a brief contact with C# list accessories ( the stuff used to interact with a list in different ways) it seems like that’s what I’m looking for. C++ vector has some of those things too.
|
|
|
|