Note that there are some explanatory texts on larger screens.

plurals
  1. POC# Script Error Object Does not Contains Definition for Property
    primarykey
    data
    text
    <p>I am trying to create a list of members against whom I would be running comparison operation with multiple values</p> <p>Here's my code </p> <pre><code>HashSet&lt;string&gt; respCodeList = new HashSet&lt;string&gt; { "051", "052", "055", "056", "058", "059", "061", "063", "064" }; if (respCodeList.Contains(object.Property)) </code></pre> <p>I am getting error in if statement :</p> <blockquote> <p>'object' does not contain a definition for 'Property' </p> </blockquote> <p>Found this way of doing comparison through google, but not sure why this error is coming up</p> <p>Complete Code:</p> <pre><code>/* Microsoft SQL Server Integration Services Script Component * Write scripts using Microsoft Visual C# 2008. * ScriptMain is the entry point class of the script.*/ using System; using Microsoft.SqlServer.Dts.Pipeline.Wrapper; using Microsoft.SqlServer.Dts.Runtime.Wrapper; using System.Collections.Generic; [Microsoft.SqlServer.Dts.Pipeline.SSISScriptComponentEntryPointAttribute] public class ScriptMain : UserComponent { public override void PreExecute() { base.PreExecute(); /* Add your code here for preprocessing or remove if not needed */ } public override void PostExecute() { base.PostExecute(); /* Add your code here for postprocessing or remove if not needed You can set read/write variables here, for example: Variables.MyIntVar = 100 */ } public override void Input0_ProcessInputRow(Input0Buffer Row) { string TermnLn = Row.TermnLn; string TransTypeCode = Row.TransTypeCode; string ReversalReason = Row.ReversalReason; string TransResponseCode = Row.TransResponseCode; string CardIssuerLn = Row.CardIssuerLn; string transType = Row.TransTypeCode; int origTransAmount = (int)Row.origTransAmount; int actualTransAmount = (int)Row.actualTransAmount; HashSet&lt;string&gt; respCodeList = new HashSet&lt;string&gt; { "051", "052", "055", "056", "058", "059", "061", "063", "064" }; if (TransTypeCode == "10") // IF IT IS WITHDRAWAL { if (TermnLn== "PRO1") // CHECK FOR AXIS TERMINAL { if (ReversalReason == "00") //IT IS NOT A REVERSAL { if (respCodeList.Contains(Row.TransResponseCode)) { Row.CashDispensed = origTransAmount/100; //cash dispense } } else { if (respCodeList.Contains(Row.TransResponseCode)) { Row.CashDispensed =(actualTransAmount/100 - origTransAmount/100); //cash dispense } } } if (TermnLn!= "PRO1" &amp;&amp; CardIssuerLn == "PRO1") // CHECK FOR NON AXIS TERMINAL { if (ReversalReason == "00") //IT IS NOT A REVERSAL { if (respCodeList.Contains(Row.TransResponseCode)) { Row.CashDispensed = origTransAmount / 100; //cash dispense non axis } } else { if (respCodeList.Contains(Row.TransResponseCode)) { Row.CashDispensed = (actualTransAmount / 100 - origTransAmount / 100); //cash dispense } } } } if (ReversalReason == "00") //IT IS NOT A REVERSAL { if (respCodeList.Contains(Row.TransResponseCode)) { Row.SuccessTransOrigAmt = origTransAmount / 100; //SuccessTransOrigAmt } } if (ReversalReason != "00" &amp;&amp; ReversalReason != " ") { if (transType == "0420" || transType == "0412" || transType == "0430") { if (origTransAmount == actualTransAmount) { Row.ReversalAmount = origTransAmount / 100; //ReversalAmount } else { Row.ReversalAmount = (actualTransAmount / 100 - origTransAmount / 100); //ReversalAmount } } } } } </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload