Пример #1
0
        public bool doesWorkflowExist(String folder, String workflow)
        {
            String folder_name   = "'" + folder + "'";
            String workflow_name = "'" + workflow + "'";

            try
            {
                cn.Open();
                TdCommand cmd = cn.CreateCommand();
                cmd.CommandText = "SELECT count(*) from edw_auv_d.INFA_SESSION_LOG where subject_area = " + folder_name + " and workflow_name =" + workflow_name + ";";

                Int32 count = (Int32)cmd.ExecuteScalar();
                cn.Close();

                if (count > 0)
                {
                    return(true);
                }

                return(false);
            }catch (Exception ex)
            {
                cn.Close();
                MessageBox.Show(ex.Message);
                return(false);
            }
        }