Esempio n. 1
0
        public void RemoveTest()
        {
            certificatePolicies target = new certificatePolicies(testData1);
            CertPolicy          Policy = new CertPolicy()
            {
                Oid = "1.2.860.0.1311.1.3", Cps = "", Name = "", Unotice = ""
            };

            target.Remove(Policy);
            Assert.AreEqual("CertificatePolicies: 1.2.860.0.1311.1.1", target.CertificatePolicies.ToString());
        }
Esempio n. 2
0
        private void butRemove_Click(object sender, EventArgs e)
        {
            // Easiest to reload the dataset, rather than fiddling around removing
            int index = Convert.ToInt32((string)dgv.SelectedRows[0].Cells[0].Value);

            cp.Remove(cp.CertPolicies[index - 1]);

            ds.Tables["policies"].Clear();
            // Reload the dataset
            for (int i = 0; i < cp.CertPolicies.Count; i++)
            {
                updateDataSet(cp.CertPolicies[i], i);
            }
        }