Click here to Skip to main content
15,860,972 members
Home / Discussions / C#
   

C#

 
AnswerRe: Parentheses vs curly brackets Pin
BillWoodruff26-Dec-17 15:31
professionalBillWoodruff26-Dec-17 15:31 
GeneralRe: Parentheses vs curly brackets Pin
User9874326-Dec-17 18:10
professionalUser9874326-Dec-17 18:10 
AnswerRe: Parentheses vs curly brackets Pin
Nathan Minier27-Dec-17 6:32
professionalNathan Minier27-Dec-17 6:32 
GeneralRe: Parentheses vs curly brackets Pin
User9874327-Dec-17 9:03
professionalUser9874327-Dec-17 9:03 
GeneralRe: Parentheses vs curly brackets Pin
Nathan Minier27-Dec-17 9:10
professionalNathan Minier27-Dec-17 9:10 
QuestionSerialize class with multiple different schemas Pin
hpjchobbes26-Dec-17 2:53
hpjchobbes26-Dec-17 2:53 
AnswerRe: Serialize class with multiple different schemas Pin
BillWoodruff26-Dec-17 5:25
professionalBillWoodruff26-Dec-17 5:25 
GeneralRe: Serialize class with multiple different schemas Pin
hpjchobbes27-Dec-17 3:20
hpjchobbes27-Dec-17 3:20 
The API that I am using takes an XML string. The XML string is based on what request I am trying to do. So, if I have an instance of a customer in my application that does not yet exist in the API software, I create an AddRq XML string, which has all of the fields for the customer:
<CustomerAddRq>
  <CustomerAdd>
    <Name>John Smith</Name>
    <IsActive>1</IsActive>
    ...
  </CustomerAdd>
<CustomerAddRq>
Once I process this Add request, I get the ID associated with it, which I save in my custom object. If I then decide I want to update the customer record, I need to pass an slightly different XML string:
<CustomerModRq>
  <CustomerMod>
    <ID>456</ID>
    <Name>John H. Smith</Name>
    <IsActive>1</IsActive>
    ...
  </CustomerMod>
</CustomerModRq>
In my application, I still have just the one instance of this customer. Also, if I am wanting to delete this customer from the API software, I would pass this request:
<CustomerDelRq>
  <CustomerDel>
    <ID>456</ID>
  </CustomerDel>
</CustomerDelRq>
In each of these cases I have to be specific about which fields get included in the request or it will be rejected. If I were to include any other fields besides the ID in the delete request, the entire request is rejected and ignored. There's also some other factors based on the version of the API that might be in use. For example, they added a feature for tracking Currency in version 12, but if my customer is still using version 11, I need to never include the Currency field in my Add or Mod request or the entire request is rejected.
GeneralRe: Serialize class with multiple different schemas Pin
Pete O'Hanlon27-Dec-17 4:05
subeditorPete O'Hanlon27-Dec-17 4:05 
AnswerRe: Serialize class with multiple different schemas Pin
jschell26-Dec-17 7:28
jschell26-Dec-17 7:28 
AnswerRe: Serialize class with multiple different schemas Pin
Gerry Schmitz26-Dec-17 12:49
mveGerry Schmitz26-Dec-17 12:49 
GeneralRe: Serialize class with multiple different schemas Pin
hpjchobbes27-Dec-17 3:26
hpjchobbes27-Dec-17 3:26 
GeneralRe: Serialize class with multiple different schemas Pin
Gerry Schmitz28-Dec-17 6:28
mveGerry Schmitz28-Dec-17 6:28 
QuestionType Casting from OleDb Value Types Returns Invalid Cast Exception Pin
User9874325-Dec-17 23:09
professionalUser9874325-Dec-17 23:09 
AnswerRe: Type Casting from OleDb Value Types Returns Invalid Cast Exception Pin
Gerry Schmitz26-Dec-17 12:28
mveGerry Schmitz26-Dec-17 12:28 
GeneralRe: Type Casting from OleDb Value Types Returns Invalid Cast Exception Pin
User9874326-Dec-17 12:52
professionalUser9874326-Dec-17 12:52 
GeneralRe: Type Casting from OleDb Value Types Returns Invalid Cast Exception Pin
User9874326-Dec-17 13:02
professionalUser9874326-Dec-17 13:02 
QuestionAwait/Async Question Pin
Kevin Marois24-Dec-17 10:51
professionalKevin Marois24-Dec-17 10:51 
AnswerRe: Await/Async Question Pin
Dave Kreskowiak24-Dec-17 15:15
mveDave Kreskowiak24-Dec-17 15:15 
GeneralRe: Await/Async Question Pin
Kevin Marois24-Dec-17 15:22
professionalKevin Marois24-Dec-17 15:22 
QuestionGetting a list of Key pressed Pin
Kenneth Haugland22-Dec-17 9:52
mvaKenneth Haugland22-Dec-17 9:52 
AnswerRe: Getting a list of Key pressed Pin
Kenneth Haugland23-Dec-17 5:10
mvaKenneth Haugland23-Dec-17 5:10 
AnswerRe: Getting a list of Key pressed Pin
Gerry Schmitz23-Dec-17 5:58
mveGerry Schmitz23-Dec-17 5:58 
GeneralRe: Getting a list of Key pressed Pin
Kenneth Haugland23-Dec-17 10:14
mvaKenneth Haugland23-Dec-17 10:14 
GeneralRe: Getting a list of Key pressed Pin
Gerry Schmitz23-Dec-17 18:38
mveGerry Schmitz23-Dec-17 18:38 

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.