prasanna p

prasanna p

  • 1.3k
  • 470
  • 103.9k

Check Id exists in websevice method content

Jul 14 2019 6:04 AM
Hi Friends,
 
I am storing web sevice method Json content into Dictionary object.I am inserting data into sqlserver database Table.When I am running service again previous content need not be inseted into the database.For this I am checking max id of invoic number and looping object and comparing both id's. and again for insertion I am using for each loop.
 
It is correct approach I am doing please tell me the simplest way to do this.
 
Json data :
 
{"Result":{"tblDsr":[{"Store_Name":"S Foods",
"Void_date_Time":"2018-09-23T00:00:00","Invoice_Number":119,"Total_Amount":150.0000,"Total_Tax":0.0000},
{"Store_Name":"S Foods","Void_date_Time":"2018-09-24T00:00:00",
]"Invoice_Number":133,"Total_Amount":220.0000,"Total_Tax":0.0000}]}

Answers (1)