2 Replies - 580 Views - Last Post: 17 August 2017 - 08:00 PM Rate Topic: -----

#1 Respuzy  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 17-August 17

c# Extract New Addition from Gridview

Posted 17 August 2017 - 06:22 AM

In sql i have a table called PFMembers that keeps members of a provident fund and their ids, eg a table with name Bob with User ID 1 and Lisa with ID 2 say the next month i am supplied a list that contains same list of members (in my PFMembers) plus additional new members eg Rich with user ID 3 which are not registered in my PFMember table , (due to size of the list i may not know these new names). in my c# program, i have two gridviews, one will display the upload from excel which will contain both members registered in my PFMember and the new additional members (Bob,Lisa,Rich), my question is i want to display in the 2nd gridview those new additional members (Rich). (this new members are no where in an sql table but just displayed in a gridview)

Is This A Good Question/Topic? 0
  • +

Replies To: c# Extract New Addition from Gridview

#2 modi123_1  Icon User is online

  • Suitor #2
  • member icon



Reputation: 13398
  • View blog
  • Posts: 53,475
  • Joined: 12-June 08

Re: c# Extract New Addition from Gridview

Posted 17 August 2017 - 06:45 AM

I would figure you should be able to use the linq 'EXCEPT' to get the differences between two lists.
https://msdn.microso...(v=vs.110).aspx
Was This Post Helpful? 0
  • +
  • -

#3 Skydiver  Icon User is online

  • Code herder
  • member icon

Reputation: 5825
  • View blog
  • Posts: 19,844
  • Joined: 05-May 12

Re: c# Extract New Addition from Gridview

Posted 17 August 2017 - 08:00 PM

Why is the source of truth the Excel file that gets pasted into your application? Why would you believe the spread sheet that adds Rich as User ID 3? What if the spreadsheet says that Bob is now User ID 3 and Rich is User ID 1?
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1