コード例 #1
0
        protected void BuildColumnBtn_Click(object sender, EventArgs e)
        {
            Built = true;
            abstractionGrid.Visible = abstractionResults.Visible = false;
            directNone.Visible      = direct.Visible = directGrid.Visible = false;
            indirectNone.Visible    = indirectGrid.Visible = indirect.Visible = false;
            ColumnGrid.Visible      = ColumnResults.Visible = true;
            RowGrid.Visible         = RowResults.Visible = false;
            Trojan.Models.Attribute temp    = new Trojan.Models.Attribute();
            List <Matrix_Cell>      colTrue = new List <Matrix_Cell>();

            using (VirusDescriptionActions usersVirus = new VirusDescriptionActions())
            {
                List <Trojan.Models.Attribute> results = new List <Trojan.Models.Attribute>();
                String virusId = usersVirus.GetVirusId();
                VirusDescriptionActions.VirusDescriptionUpdates[] currentBuild = new VirusDescriptionActions.VirusDescriptionUpdates[DescriptionList.Rows.Count];
                for (int i = 0; i < DescriptionList.Rows.Count; i++)
                {
                    IOrderedDictionary rowValues = new OrderedDictionary();
                    rowValues = GetValues(DescriptionList.Rows[i]);
                    currentBuild[i].AttributeId = Convert.ToInt32(rowValues["AttributeID"]);

                    if (usersVirus.Get_OnOff(virusId, currentBuild[i].AttributeId))
                    {
                        colTrue = scanColumnTrue(currentBuild[i].AttributeId, null);
                        foreach (Matrix_Cell A in colTrue)
                        {
                            temp = getAttribute(A.RowId);
                            if (!results.Contains(temp))
                            {
                                results.Add(temp);
                            }
                            temp = null;
                        }
                    }
                }
                ColumnGrid.DataSource = results;
                ColumnGrid.DataBind();
            }
        }
コード例 #2
0
        protected void BuildColumnBtn_Click(object sender, EventArgs e)
        {
            Built = true;
            abstractionGrid.Visible = abstractionResults.Visible = false;
            directNone.Visible = direct.Visible = directGrid.Visible = false;
            indirectNone.Visible = indirectGrid.Visible = indirect.Visible = false;
            ColumnGrid.Visible = ColumnResults.Visible = true;
            RowGrid.Visible = RowResults.Visible = false;
            Trojan.Models.Attribute temp = new Trojan.Models.Attribute();
            List<Matrix_Cell> colTrue = new List<Matrix_Cell>();
            using (VirusDescriptionActions usersVirus = new VirusDescriptionActions())
            {
                List<Trojan.Models.Attribute> results = new List<Trojan.Models.Attribute>();
                String virusId = usersVirus.GetVirusId();
                VirusDescriptionActions.VirusDescriptionUpdates[] currentBuild = new VirusDescriptionActions.VirusDescriptionUpdates[DescriptionList.Rows.Count];
                for (int i = 0; i < DescriptionList.Rows.Count; i++)
                {
                    IOrderedDictionary rowValues = new OrderedDictionary();
                    rowValues = GetValues(DescriptionList.Rows[i]);
                    currentBuild[i].AttributeId = Convert.ToInt32(rowValues["AttributeID"]);

                    if (usersVirus.Get_OnOff(virusId, currentBuild[i].AttributeId))
                    {
                        colTrue = scanColumnTrue(currentBuild[i].AttributeId, null);
                        foreach (Matrix_Cell A in colTrue)
                        {
                            temp = getAttribute(A.RowId);
                            if(!results.Contains(temp)){
                                results.Add(temp);
                            }
                            temp = null;
                        }
                    }
                }
                ColumnGrid.DataSource = results;
                ColumnGrid.DataBind();
            }
        }