コード例 #1
0
        private void RelatedListView_SelectedIndexChanged(object sender, EventArgs e)
        {
            var link = sender as LinkButton;

            RelatedListView.SelectedIndex = Convert.ToInt32(link.CommandArgument);

            var row = RelatedListView.SelectedRow;

            var titles = new StringBuilder();

            for (int i = 2; i < row.Cells.Count; i++)
            {
                titles.Append(row.Cells[i].Text).Append(" ~ ");
            }



            var constrName = OpenedRelation.SystemName;

            OpenedRelation.Card.DependencyRelations.RelationTableTitleAttributes[constrName] = titles.ToString();


            OpenedRelation.Value = titles.ToString();

            DataBaseReader.FillRelation(OpenedRelation, Convert.ToInt32(RelatedListView.SelectedDataKey["objID"]));

            DisplayRelatedList = false;

            OpenedRelationSystemName = null;

            RecreateChildControls();
        }
コード例 #2
0
ファイル: events.cs プロジェクト: KeyEugene/ProjectMonitoring
        private void RelationClearedButton_Click(object sender, EventArgs e)
        {
            if (sender is IButtonControl)
            {
                var constraintName = (sender as IButtonControl).CommandArgument;

                OpenedRelationSystemName = constraintName;

                foreach (var card in Cards.Values)
                {
                    SaveState(card);
                }
                OpenedRelationEntityID = (sender as IButtonControl).CommandName;

                DataBaseReader.GetRelations(OpenedRelation);

                OpenedRelation.Card.DependencyRelations.RelationTableTitleAttributes[constraintName] = "";

                OpenedRelation.Value = "";

                DataBaseReader.FillRelation(OpenedRelation, -1);

                OpenedRelationSystemName = null;

                OpenedRelationEntityID = null;

                RecreateChildControls();
            }

            RecreateChildControls();
        }