public static bool QC_RemoveAttachementFromCase(string caseName)
        {
            string          caseID  = string.Empty;
            MatchCollection vMatchs = Regex.Matches(caseName, @"(\d+)");

            if (vMatchs.Count >= 1)
            {
                caseID = vMatchs[vMatchs.Count - 1].Value; //get the last one, which should be the case ID
            }
            else
            {
                //error happens, no case ID found
                return(false);
            }

            TestConfigFile tConfig         = new TestConfigFile();
            bool           success         = false;
            bool           isRemoveSuccess = false;

            success = LoadConfigFile(ref tConfig, "TestUtilityConfig.xml");
            if (success)
            {
                AutotestIntsys.QCOTAClass qcOnline = new AutotestIntsys.QCOTAClass(tConfig);

                if (qcOnline.Connect())
                {
                    QCOperation.QCAttachment taa = new QCOperation.QCAttachment();
                    isRemoveSuccess = (bool)taa.RemoveAttachment(qcOnline.getTDConn(), "TEST", caseID);
                    qcOnline.DisConnect();
                }

                return(isRemoveSuccess);
            }
            else
            {
                return(false);
            }
        }
        public static bool QC_RemoveAttachementFromCase(string caseName)
        {
            string caseID = string.Empty;
            MatchCollection vMatchs = Regex.Matches(caseName, @"(\d+)");
            if (vMatchs.Count >= 1)
            {
                caseID = vMatchs[vMatchs.Count - 1].Value; //get the last one, which should be the case ID
            }
            else
            {
                //error happens, no case ID found
                return false;
            }

            TestConfigFile tConfig = new TestConfigFile();
            bool success = false;
            bool isRemoveSuccess = false;

            success = LoadConfigFile(ref tConfig, "TestUtilityConfig.xml");
            if (success)
            {
                AutotestIntsys.QCOTAClass qcOnline = new AutotestIntsys.QCOTAClass(tConfig);

                if (qcOnline.Connect())
                {
                    QCOperation.QCAttachment taa = new QCOperation.QCAttachment();
                    isRemoveSuccess = (bool)taa.RemoveAttachment(qcOnline.getTDConn(), "TEST", caseID);
                    qcOnline.DisConnect();
                }

                return isRemoveSuccess;
            }
            else
            {
                return false;
            }
        }