TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
mike idowu
1.3k
448
63.9k
ASP.NET MVC - Prevent duplicate field in EXCEL data upload
Dec 18 2017 9:12 AM
I have this Model Class
public COUNTRIES()
{
public int COUNTRY_ID { get; set; }
public string COUNTRY_CODE { get; set; }
public string COUNTRY_NAME { get; set; }
}
Table Sample
Excel Sample
I want to perform batch upload of data from Excel with all the fields above and save into the database. I want the code to use the field
COUNTRY_CODE
as the
UniqueIdentifier
.
It will iterate through the Excel Sheet to check if COUNTRY_CODE exists in the database.
The application will save the one that are not in existence using COUNTRY_CODE
It will show the user the list of COUNTRY_CODE that exists in the database.
it will ask if the user wants to proceed: those to update and those to skip.
The user will be able to select the ones he wants to update from the last.
The application will save the selected ones and discard the unselected one.
Please how do I go about it.
The code I have written will only upload and save, but will not treat duplicates.
Reply
Answers (
1
)
Error 1 'SmartGridViewUtility.Suggestion' does not contain a
converting innerxml data to json