Exemple #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            Asset oAsset = new Asset(0, dsnAsset, dsn);
            // 7,1,1675,713,5778,2,47
            DataSet       dsAssets       = oAsset.GetServerOrBladeAvailable(7, 1, 1675, 713, 5778, 2, 47);
            ServiceEditor oServiceEditor = new ServiceEditor(0, dsnServiceEditor);
            DataSet       dsAssetsManual = oServiceEditor.APGetSerials();

            for (int ii = 0; ii < dsAssets.Tables[0].Rows.Count; ii++)
            {
                DataRow  drAsset        = dsAssets.Tables[0].Rows[ii];
                string   strSerial      = drAsset["serial"].ToString();
                bool     boolIsManual   = false;
                DataView dvAssetsManual = dsAssetsManual.Tables[0].DefaultView;
                dvAssetsManual.RowFilter = "serial = '" + strSerial + "'";
                if (dvAssetsManual.Count > 0)
                {
                    Response.Write("delete asset " + strSerial + "<br/>");
                    dsAssets.Tables[0].Rows.Remove(drAsset);
                    ii--;
                }
            }


            //strResult = "";
            //strError = "";
            //oMnemonic = new Mnemonic(0, dsn);
            //oServer = new Servers(0, dsn);
            //oForecast = new Forecast(0, dsn);
            //oRequest = new Requests(0, dsn);
            //oProject = new Projects(0, dsn);
            //oOrganization = new Organizations(0, dsn);
            //oUser = new Users(0, dsn);
            //intEnvironment = 999;
            //oAD = new AD(0, dsn, intEnvironment);
            //oVar = new Variables(intEnvironment);
            //oFunction = new Functions(0, dsn, intEnvironment);
            //oAccountRequest = new AccountRequest(0, dsn);
            //oOnDemand = new OnDemand(0, dsn);
            //strMnemonicCode = "XQM";
            //strMnemonicName = "TESTING CLEARVIEW";
            //strOrganizationCode = "CVW";
            //intServer = 11424;
            //intAnswer = Int32.Parse(oServer.Get(intServer, "answerid"));
            //intRequest = oForecast.GetRequestID(intAnswer, true);
            //intProject = oRequest.GetProjectNumber(intRequest);
            //intOrganization = Int32.Parse(oProject.Get(intProject, "organization"));
            //strIP = "10.33.253.246";
            //strDomain = "PNCNT";
            //strScripts = Request.PhysicalApplicationPath + "scripts\\";
            ////strName = "WDRDP300A";
            //strName = "WCXQM203D";

            //Response.Write(oFunction.PingName(strName));
        }