GetInstanceProcessByID() public method

Gets the instance process by ID.
public GetInstanceProcessByID ( System.Int64 AtulInstanceProcessID ) : DataTable
AtulInstanceProcessID System.Int64 The atul instance process ID.
return System.Data.DataTable
コード例 #1
0
ファイル: AtulRest.svc.cs プロジェクト: godaddy/ATUL
 /// <summary>
 /// Gets the instance process by ID.
 /// </summary>
 /// <param name="AtulInstanceProcessID">The atul instance process ID.</param>
 /// <returns></returns>
 public string GetInstanceProcessByID(Int64 AtulInstanceProcessID)
 {
     DataTable returnTable = new DataTable();
     Atul_v1Data adb = new Atul_v1Data();
     returnTable = adb.GetInstanceProcessByID(AtulInstanceProcessID);
     return JsonMethods.GetJSONString(returnTable);
 }
コード例 #2
0
ファイル: AtulRest.svc.cs プロジェクト: godaddy/ATUL
 /// <summary>
 /// Gets the instance process by ID.
 /// </summary>
 /// <param name="AtulInstanceProcessID">The atul instance process ID.</param>
 /// <returns></returns>
 public string GetInstanceProcessByID(string AtulInstanceProcessID)
 {
     DataTable returnTable = new DataTable();
     Atul_v1Data adb = new Atul_v1Data();
     returnTable = adb.GetInstanceProcessByID(Convert.ToInt32(AtulInstanceProcessID));
     return JsonMethods.GetJSONString(returnTable);
 }
コード例 #3
0
ファイル: AtulBusinessLogic.cs プロジェクト: godaddy/ATUL
        /// <summary>
        /// Gets the instance detail.
        /// </summary>
        /// <param name="AtulInstanceProcessID">The atul instance process ID.</param>
        /// <returns></returns>
        public string GetInstanceDetail(string AtulInstanceProcessID)
        {
            DataSet dsInstanceDetail = new DataSet("Instance");
            Atul_v1Data adb = new Atul_v1Data();
            DataTable instanceDT = new DataTable("instanceDT");

            DataTable processDT = new DataTable("processDT");
            DataTable subProcessDT = new DataTable("subProcessDT");
            DataTable activityDT = new DataTable("activity");
            DataTable flexfieldDT = new DataTable("flexfield");
            DataTable flexfieldstorageDT = new DataTable("flexfieldstorage");
            //Get The Instance
            instanceDT = adb.GetInstanceProcessByID(Convert.ToInt64(AtulInstanceProcessID));

            //Get The Process
            processDT = adb.GetProcessByID(Convert.ToInt64(instanceDT.Rows[0]["AtulProcessID"].ToString()));

            //Get The Subprocesses
            subProcessDT = adb.GetInstanceSubProcessByID(Convert.ToInt64(AtulInstanceProcessID));

            //Get The SubProcess Activities
            activityDT = adb.GetInstanceProcessActivity(Convert.ToInt64(AtulInstanceProcessID));

            //Get flexfields
            //flexfieldDT = adb.FlexFieldGetByInstanceProcessID(Convert.ToInt64(AtulInstanceProcessID));

            //Get flexfieldstorage
            //flexfieldstorageDT = adb.FlexFieldStorageGetByProcessID(Convert.ToInt64(AtulInstanceProcessID));

            //Make it into one godawful mega dataset
            dsInstanceDetail.Tables.Add(instanceDT);
            dsInstanceDetail.Tables.Add(processDT);
            dsInstanceDetail.Tables.Add(subProcessDT);
            dsInstanceDetail.Tables.Add(activityDT);
            dsInstanceDetail.Tables.Add(flexfieldDT);
            dsInstanceDetail.Tables.Add(flexfieldstorageDT);

            //Convert the whole dataset to XML
            //We do this to avoid the "culture" circular reference and to remove
            //datatypes efficiently
            XmlDocument doc = new XmlDocument();
            doc.LoadXml(dsInstanceDetail.GetXml());
            // Convert XML to a JSON string
            string JSON = JsonMethods.XmlToJSON(doc);

            // Replace \ with \\ because string is being decoded twice
            // JSON = JSON.Replace(@"\", @"\\");
            //this.ProcessCurrentSubProcessActor(Convert.ToInt64(AtulInstanceProcessID));
            return JSON;
        }