public static string ProcessWorkflow(Int32 workflow_id, Int32 userID)
        {
            qDbs_SQLcode  sql           = new qDbs_SQLcode();
            qPtl_Workflow c_workflow    = new qPtl_Workflow(workflow_id);
            string        returnMessage = string.Empty;

            if (c_workflow.WorkflowActionType == "sql")
            {
                // get sql and then replace the parameters
                string finalSql = c_workflow.SQL;

                // replace values
                finalSql = finalSql.Replace("{UserID}", Convert.ToString(userID));

                if (c_workflow.ReferenceID > 0)
                {
                    finalSql = finalSql.Replace("{ReferenceID}", Convert.ToString(c_workflow.ReferenceID));
                }

                if (c_workflow.WorkflowActionReferenceID > 0)
                {
                    finalSql = finalSql.Replace("{WorkflowActionReferenceID}", Convert.ToString(c_workflow.WorkflowActionReferenceID));
                }

                returnMessage = sql.ExecuteSQL(finalSql);
            }

            return(returnMessage);
        }
        public static string ProcessWorkflow(Int32 workflow_id, Int32 userID)
        {
            qDbs_SQLcode sql = new qDbs_SQLcode();
            qPtl_Workflow c_workflow = new qPtl_Workflow(workflow_id);
            string returnMessage = string.Empty;

            if (c_workflow.WorkflowActionType == "sql")
            {
                // get sql and then replace the parameters
                string finalSql = c_workflow.SQL;

                // replace values
                finalSql = finalSql.Replace("{UserID}", Convert.ToString(userID));

                if (c_workflow.ReferenceID > 0)
                    finalSql = finalSql.Replace("{ReferenceID}", Convert.ToString(c_workflow.ReferenceID));

                if (c_workflow.WorkflowActionReferenceID > 0)
                    finalSql = finalSql.Replace("{WorkflowActionReferenceID}", Convert.ToString(c_workflow.WorkflowActionReferenceID));

                returnMessage = sql.ExecuteSQL(finalSql);
            }

            return returnMessage;
        }