How to identify which button was clicked in a table VB.NET [closed] - wpf

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 4 days ago.
Improve this question
I have a table where the last column are Delete buttons, so that when I click one of them it should change the value of another column in the table.(I have to get the value of the first column of the row to make these changes). The problem I have is that all the buttons have the same name and so I don't know how to identify which button was clicked to make the changes in the right row.
I can't give the buttons different names because there are 100+ rows in this table.
I am working with xaml, WPF , vb .net
Could someone help me? Thank you!

Related

How to capture column changes into new columns in a SQL Server table? [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 2 days ago.
Improve this question
I have a SQL Server table. I need to keep track of 3 columns in that table. Whenever a change happens in one of those columns, the historic information present in that column needs to be moved to a separate column. Every time the change happened, the history column should keep track of all the changes that are being done on that column. May I know how to implement this process?
Example;
ORIGINAL TABLE VIEW:
enter image description here
CHANGE1 TABLE VIEW:
enter image description here
CHANGE2 TABLE VIEW:
enter image description here
CHANGE3 TABLE VIEW:
enter image description here
I read few docs online and they said that I need to enable track changes of SQL database and establish track changes on the table that I need to work with. After that I do not know what to do.
Do I need to write a code that concatenates the data present in the original columns to HIST columns? If so, How can I do it when the changes happen at random point of day? (If I follow this, is there a point to enable change tracking?)

Employee Hierarchy at different levels [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
I have 5 tables in my database called Employee, Company, Team, Locations and Position. Now Positions are assigned to employee on each of these levels i.e. to Company, Team and Location. To resolve this I have created 3 tables called CompanyPosition, TeamPosition and LocationPosition. An employee can hold multiple positions in each of these level i.e I can be a CEO, MD at company level etc.
Now I have a situation that in each of these position tables an employee can hold multiple positions and he will reports to someone holding multiple positions, but to only one of position at a time.
I am thinking of creating a new column called ReportstoPositionId in each of these tables CompanyPosition, TeamPosition and LocationPosition to solve this problem.
Can anyone suggest me that I am going in right direction or it can have some problem now or in furture.

Database design for relationships [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I have 3 tables
Table1: Plant Table
PlantId(Primary key)
Plantname
and some other fields
Table2 :Inputfiles
Plantname,Filename
PlantId(foreign key) references PlantId(Plant)
Table 3; InputData
Id.
and other fields
I need to design it such a way that one plant can have many inpufiles So this is a 1-m between Plant Table and Inputfiles tables
Now when the user selects a inputfile from table2, all the data related to the input file is stored in Inputdata table3.
What should be the relation between table2(input files) and table3(inputdata)
Thank you
sun
A 1-1 relationship should exist between inputfiles and inputdata.
Based on your description of the problem, I would have inputfiles have the inputdata.id as a foreign key.

Database design questions, what do you think? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 8 years ago.
Improve this question
I have the following entities in my system: COMPANY, POSITION, APPLICANTS. There is many to many relationships between POSITION and APPLICANTS, but the current model does not show that there is many to many relationships between COMPANY and APPLICANTS.
Does it make sense to you to have a join table foo that has the company_id, position_id and applicant_id or i should have a table that joins COMPANY and POSITION and another that joins POSITION and APPLICANTS?
I don't think so. You can get APPLICANT for a given COMPANY via JOIN with POSITION.
I think a relationship between a COMPANY and an individual becomes significant when they shift from APPLICANT to EMPLOYEE. I would not model it as you propose.

related categories - database design [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 7 months ago.
Improve this question
I'm looking for a little database design advice...
I have a spreadsheet with a few columns in it. Column 1 being a list of categories and the rest being related categories(to the category in column 1). I'm trying to figure out what the best way to setup the tables would be... My thought so far is to have a table that just lists the categories then have a table with 2 columns that holds the id of the category and the id of a related category.... Would this be the best way to do this? Any better ideas?
A self referencing table (parentId to childId) is how most people implement a hierarchical structure like the one you are describing.
Your way is the best. Academics would call it resolving a reflexive many-to-many relationship with an associative entity, but it's nothing more than what you described.
m:n relations should always (maybe there are exceptions) be made with extra table for relations. So it should be the most flexible solution

Resources