Click here to Skip to main content
15,867,929 members
Home / Discussions / C#
   

C#

 
AnswerRe: Process.Start() Default Browser and Detect Close Pin
Richard Andrew x646-Jun-23 14:56
professionalRichard Andrew x646-Jun-23 14:56 
GeneralRe: Process.Start() Default Browser and Detect Close Pin
Kevin Marois6-Jun-23 17:07
professionalKevin Marois6-Jun-23 17:07 
AnswerRe: Process.Start() Default Browser and Detect Close Pin
Richard Deeming6-Jun-23 21:46
mveRichard Deeming6-Jun-23 21:46 
AnswerRe: Process.Start() Default Browser and Detect Close Pin
jschell7-Jun-23 5:23
jschell7-Jun-23 5:23 
QuestionI've fumbled and bumbled my way though being able to read an rtsp stream, I've learned how to capture frames and Pin
Vượng Phát Nội thất4-Jun-23 16:37
Vượng Phát Nội thất4-Jun-23 16:37 
AnswerRe: I've fumbled and bumbled my way though being able to read an rtsp stream, I've learned how to capture frames and Pin
Pete O'Hanlon4-Jun-23 21:13
subeditorPete O'Hanlon4-Jun-23 21:13 
GeneralRe: I've fumbled and bumbled my way though being able to read an rtsp stream, I've learned how to capture frames and Pin
Richard Deeming4-Jun-23 21:42
mveRichard Deeming4-Jun-23 21:42 
QuestionSaving Data from a dynamically created form Pin
Member 136122631-Jun-23 11:41
Member 136122631-Jun-23 11:41 
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:

C#
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:

C#
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.
AnswerRe: Saving Data from a dynamically created form Pin
Gerry Schmitz1-Jun-23 16:21
mveGerry Schmitz1-Jun-23 16:21 
GeneralRe: Saving Data from a dynamically created form Pin
Member 136122632-Jun-23 3:42
Member 136122632-Jun-23 3:42 
GeneralRe: Saving Data from a dynamically created form Pin
Gerry Schmitz2-Jun-23 4:39
mveGerry Schmitz2-Jun-23 4:39 
QuestionRe: Saving Data from a dynamically created form Pin
Ralf Meier2-Jun-23 4:40
professionalRalf Meier2-Jun-23 4:40 
AnswerRe: Saving Data from a dynamically created form Pin
jschell2-Jun-23 11:32
jschell2-Jun-23 11:32 
AnswerRe: Saving Data from a dynamically created form Pin
OriginalGriff2-Jun-23 19:56
mveOriginalGriff2-Jun-23 19:56 
Questionimplementing the system tray for my C# login app Pin
Shylaja D30-May-23 23:49
Shylaja D30-May-23 23:49 
GeneralRe: implementing the system tray for my C# login app Pin
harold aptroot31-May-23 0:13
harold aptroot31-May-23 0:13 
QuestionHello, 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. Pin
Hero2016 Elmaghraby30-May-23 6:39
Hero2016 Elmaghraby30-May-23 6:39 
AnswerRe: 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. Pin
OriginalGriff30-May-23 6:42
mveOriginalGriff30-May-23 6:42 
GeneralRe: 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. Pin
Richard Deeming30-May-23 21:07
mveRichard Deeming30-May-23 21:07 
AnswerRe: 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. Pin
jschell31-May-23 5:34
jschell31-May-23 5:34 
GeneralRe: 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. Pin
jeron131-May-23 5:43
jeron131-May-23 5:43 
GeneralRe: 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. Pin
OriginalGriff31-May-23 6:24
mveOriginalGriff31-May-23 6:24 
GeneralRe: 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. Pin
jschell1-Jun-23 6:11
jschell1-Jun-23 6:11 
GeneralRe: 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. Pin
OriginalGriff1-Jun-23 6:26
mveOriginalGriff1-Jun-23 6:26 
QuestionC# features Pin
Calin Negru25-May-23 7:31
Calin Negru25-May-23 7:31 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.