Click here to Skip to main content
15,922,574 members
Home / Discussions / C#
   

C#

 
AnswerRe: Generic class Pin
Josh Smith21-Jun-06 10:52
Josh Smith21-Jun-06 10:52 
GeneralRe: Generic class Pin
torontomouse21-Jun-06 16:43
torontomouse21-Jun-06 16:43 
GeneralRe: Generic class Pin
Josh Smith24-Jun-06 15:33
Josh Smith24-Jun-06 15:33 
AnswerRe: retrieving command line arguments from a file Pin
Judah Gabriel Himango21-Jun-06 11:57
sponsorJudah Gabriel Himango21-Jun-06 11:57 
QuestionHow can I send to back a mdi child window? Pin
User 309585921-Jun-06 10:43
User 309585921-Jun-06 10:43 
Questiondata unbinding relate...urgnt plzz Pin
r_e_h_a_n21-Jun-06 10:33
r_e_h_a_n21-Jun-06 10:33 
AnswerRe: data unbinding relate...urgnt plzz Pin
Edbert P21-Jun-06 14:50
Edbert P21-Jun-06 14:50 
QuestionBiztalk 2004: How to pass database facts from C# code? Pin
pankazmittal21-Jun-06 10:25
pankazmittal21-Jun-06 10:25 
<code>
Hi

Tools: C#, .NET 1.1 and Biztalk 2004

I want to execute a policy rule which gets fired based on some input xml and database facts. I am able to pass the input xml facts but how to I pass the database facts information before executing policy. Basically, by passing "Role" information, I want to get "Salary" values which are stored in a database table.

Following is the code snippet:


--------------------------------------------------------------
Input XML:

<ns0:EmpInfo xmlns:ns0="http://EmployeeInfo.EmpInfo">
<Emp>
<Salary></Salary>
<Role>Manager</Role>
</Emp>
<Emp>
<Salary></Salary>
<Role>CIO</Role>
</Emp>
</ns0:EmpInfo>

--------------------------------------------------------------

----------------------------
public string Execute(string sRequestXML, out string sResponseXML, out string sErrorMsg)
{
sResponseXML = string.Empty;
sErrorMsg = string.Empty;
DebugTrackingInterceptor dti = new DebugTrackingInterceptor(@"C:\Biztalk\projects\EmployeeInfo\XSDs\jit.txt");

//create an instance of the XML object
XmlDocument xd1 = new XmlDocument();
xd1.Load(@"C:\Biztalk\projects\EmployeeInfo\XSDs\Copy of EmpInfo_output.xml");

TypedXmlDocument doc1 = new TypedXmlDocument("EmpInfo",xd1);
// create the array of short-term facts
object[] shortTermFacts = new object[1];
shortTermFacts[0] = doc1;

Policy policy = null;
// now execute to see what happens
try
{

//Console.WriteLine("Grabbing the policy ...");
policy = new Policy("EmpInfo");
policy.Execute(shortTermFacts, dti);

FileInfo finfo = new FileInfo(@"C:\Biztalk\projects\EmployeeInfo\XSDs\ProcessedRFP.xml");
StreamWriter writer = finfo.CreateText();
writer.Write(doc1.Document.OuterXml);
writer.Close();

}
catch (Exception ex)
{
FileInfo finfoError = new FileInfo(@"C:\Biztalk\projects\EmployeeInfo\XSDs\Error.xml");
StreamWriter writerError = finfoError.CreateText();
writerError.Write(ex.Message);
writerError.Close();
}

dti.CloseTraceFile ();

policy = null;
return "PASS";

}


</code>
QuestionSQL Express 2005 Dumper for SQL Server 2005 Pin
emran83421-Jun-06 10:14
emran83421-Jun-06 10:14 
AnswerRe: SQL Express 2005 Dumper for SQL Server 2005 Pin
Mark Tutt21-Jun-06 10:50
Mark Tutt21-Jun-06 10:50 
QuestionData Adapter passing by reference to stored procedure Pin
leckey21-Jun-06 9:07
leckey21-Jun-06 9:07 
AnswerRe: Data Adapter passing by reference to stored procedure Pin
Not Active21-Jun-06 9:25
mentorNot Active21-Jun-06 9:25 
GeneralRe: Data Adapter passing by reference to stored procedure [modified] Pin
leckey21-Jun-06 9:28
leckey21-Jun-06 9:28 
GeneralRe: Data Adapter passing by reference to stored procedure Pin
ashishinfra21-Jun-06 20:07
ashishinfra21-Jun-06 20:07 
AnswerRe: Data Adapter passing by reference to stored procedure Pin
Josh Smith21-Jun-06 9:43
Josh Smith21-Jun-06 9:43 
GeneralRe: Data Adapter passing by reference to stored procedure Pin
leckey21-Jun-06 9:47
leckey21-Jun-06 9:47 
GeneralRe: Data Adapter passing by reference to stored procedure Pin
Josh Smith21-Jun-06 10:06
Josh Smith21-Jun-06 10:06 
GeneralRe: Data Adapter passing by reference to stored procedure Pin
leckey21-Jun-06 10:17
leckey21-Jun-06 10:17 
GeneralRe: Data Adapter passing by reference to stored procedure Pin
Josh Smith21-Jun-06 10:25
Josh Smith21-Jun-06 10:25 
GeneralRe: Data Adapter passing by reference to stored procedure Pin
leckey21-Jun-06 10:39
leckey21-Jun-06 10:39 
GeneralRe: Data Adapter passing by reference to stored procedure Pin
Josh Smith21-Jun-06 10:44
Josh Smith21-Jun-06 10:44 
QuestionPaint Event Handler Pin
ZeAugusto21-Jun-06 7:23
ZeAugusto21-Jun-06 7:23 
AnswerRe: Paint Event Handler Pin
Josh Smith21-Jun-06 7:25
Josh Smith21-Jun-06 7:25 
GeneralRe: Paint Event Handler Pin
ZeAugusto21-Jun-06 7:42
ZeAugusto21-Jun-06 7:42 
GeneralRe: Paint Event Handler [modified] Pin
led mike21-Jun-06 8:01
led mike21-Jun-06 8:01 

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.