Пример #1
0
        public PanelUser()
            : base()
        {
            m_arr_origTable = new DataTable[(int)ID_Table.Count];
            m_arr_editTable = new DataTable[(int)ID_Table.Count];
            db_sostav       = new DB_Sostav_TEC();

            InitializeComponent();

            m_AllUnits      = HUsers.GetTableProfileUnits;
            dgvProfile      = new DataGridView_Prop_Text_Check(m_AllUnits);
            dgvProfile.Dock = DockStyle.Fill;
            this.Controls.Add(this.dgvProfile, 7, 6); this.SetColumnSpan(this.dgvProfile, 13); this.SetRowSpan(this.dgvProfile, 13);

            dgvProp.EventCellValueChanged += new StatisticCommon.DataGridView_Prop_ComboBoxCell.DataGridView_Prop_ValuesCellValueChangedEventHandler(this.dgvProp_EndCellEdit);

            dgvProfile.EventCellValueChanged += new StatisticCommon.DataGridView_Prop_Text_Check.DataGridView_Prop_ValuesCellValueChangedEventHandler(this.dgvProfile_EndCellEdit);

            fillDataTable();
            resetDataTable();

            treeView_Users.Update_tree(m_arr_editTable[(int)ID_Table.User], m_arr_editTable[(int)ID_Table.Role]);

            treeView_Users.GetID    += new TreeView_Users.intGetID(this.GetNextID);
            treeView_Users.EditNode += new TreeView_Users.EditNodeEventHandler(this.get_operation_tree);
            treeView_Users.Report   += new TreeView_Users.ReportEventHandler(this.tree_report);
        }
Пример #2
0
        private void InitializeComponent()
        {
            Control ctrl = null;

            this.SuspendLayout();

            //Добавить кропки
            INDEX_CONTROL i = INDEX_CONTROL.BUTTON_SAVE;

            for (i = INDEX_CONTROL.BUTTON_SAVE; i < (INDEX_CONTROL.BUTTON_BREAK + 1); i++)
            {
                addButton(i.ToString(), (int)i, m_arButtonText[(int)i]);
            }
            //TreeView
            ctrl      = new TreeView_Users(false);
            ctrl.Name = INDEX_CONTROL.TREE_DICT_ITEM.ToString();
            ctrl.Dock = DockStyle.Fill;
            this.Controls.Add(ctrl, 1, 0);
            this.SetColumnSpan(ctrl, 6); this.SetRowSpan(ctrl, 13);

            //DGV
            ctrl      = new DataGridView_Prop_Text_Check();
            ctrl.Name = INDEX_CONTROL.DGV_DICT_PROP.ToString();
            ctrl.Dock = DockStyle.Fill;
            this.Controls.Add(ctrl, 7, 0);
            this.SetColumnSpan(ctrl, 6); this.SetRowSpan(ctrl, 10);
            addLabelDesc("PANEL_DESC");
            this.ResumeLayout();

            ((Button)Controls.Find(INDEX_CONTROL.BUTTON_SAVE.ToString(), true)[0]).Enabled = false;

            //Обработчика нажатия кнопок
            ((Button)Controls.Find(INDEX_CONTROL.BUTTON_SAVE.ToString(), true)[0]).Click  += new System.EventHandler(this.btnSave_Click);
            ((Button)Controls.Find(INDEX_CONTROL.BUTTON_BREAK.ToString(), true)[0]).Click += new System.EventHandler(this.btnBreak_Click);

            ((DataGridView_Prop_Text_Check)Controls.Find(INDEX_CONTROL.DGV_DICT_PROP.ToString(), true)[0]).EventCellValueChanged += new DataGridView_Prop.DataGridView_Prop_ValuesCellValueChangedEventHandler(this.dgvProp_CellEndEdit);
        }