Answered

Return DataTable from DLL Components

Hi,

I have one DLL file which returns number of rows and columns. I mean a table in particular. (Whether it would be a DataTable object or array of String, Integer etc. Any thing can work)

Now the question is I want to get these values into bizagi and store it into a Master entity.

Is there any possibility to do this.

Thank you.

Comments (1)

photo
1

I found my answer:

  1. var connectToMadacto = new ConnectToMadactoDatabase(); //ConnectToMadactoDatabase is my class name

    var footwork = connectToMadacto.FootworkDataTable( Me.Case.WorkingCredential.UserProperties["staffId"] ); // FootworkDataTable is my function name

    if (footwork.Rows.Count > 0) {

    Me.deleteAllCollectionItems("entryExitPersonel.MadaktoFootworks");

    for(var Counter=0; Counter < footwork.Rows.Count; Counter++)

    {

    var madaktoFootwork = Me.newCollectionItem("entryExitPersonel.MadaktoFootworks");

    madaktoFootwork.setXPath("PersonId",<Case.CreatorUser>);

    madaktoFootwork.setXPath("OrginalDate",CHelper.ToInt(footwork.Rows[Counter]["OrginalDate"]));

    madaktoFootwork.setXPath("GregorianConvertedDate",footwork.Rows[Counter]["GregorianConvertedDate"]);

    madaktoFootwork.setXPath("PersianConvertedDate",footwork.Rows[Counter]["PersianConvertedDate"].toString());

    if(CHelper.IsNull(footwork.Rows[Counter]["EnterTime1"]))

    //if (footwork.Rows[Counter]["EnterTime1"].toString() !== "")

    madaktoFootwork.setXPath("EnterTime1","Incomplete traffic");

    else

    madaktoFootwork.setXPath("EnterTime1",footwork.Rows[Counter]["EnterTime1"].toString());

    if(CHelper.IsNull(footwork.Rows[Counter]["ExitTime1"]))

    madaktoFootwork.setXPath("ExitTime1","Incomplete traffic");

    else

    madaktoFootwork.setXPath("ExitTime1",footwork.Rows[Counter]["ExitTime1"].toString());

    }

    }