コード例 #1
0
        public void grdBase_onSelectedDataRow(object sender, Control.GridView.RowEventArgs e)
        {
            Dictionary <string, object> dataKey = (Dictionary <string, object>)sender;

            addEditSetupPeriodGroup = new AddEditSetupPeriodGroup(dataKey[DataKeyName].ToString());
            this.AddEditTab(string.Format(TabName.Edit, programName), addEditSetupPeriodGroup);
        }
コード例 #2
0
        private void AddEditTab(string TabTitle, AddEditSetupPeriodGroup controlAddEdit)
        {
            if (tabControl1.TabPages.Count == 1 || (tabControl1.TabPages.Count > 1 && base.formBase.ShowConfirmMessage(GeneralMessage.ConfirmNewTab, "Confirm")))
            {
                controlAddEdit.NotifyReturnEvent += new Control.BaseUserControl.NotifyReturnHandler(NotifyReturnEvent);
                tabPageAddEdit = new TabPage();
                tabPageAddEdit.Controls.Clear();
                tabPageAddEdit.Controls.Add(controlAddEdit);
                tabPageAddEdit.Text = TabTitle;
                controlAddEdit.Dock = DockStyle.Fill;

                if (tabControl1.TabPages.Count > 1)
                {
                    tabControl1.TabPages.RemoveAt(1);
                }
                tabControl1.TabPages.Remove(tabPageAddEdit);
                tabControl1.TabPages.Add(tabPageAddEdit);
            }
            tabControl1.SelectedTab = tabPageAddEdit;
        }
コード例 #3
0
 public void grdBase_onAddNewRow(object sender, EventArgs e)
 {
     addEditSetupPeriodGroup = new AddEditSetupPeriodGroup();
     this.AddEditTab(string.Format(TabName.Add, programName), addEditSetupPeriodGroup);
 }
コード例 #4
0
 public void grdBase_onSelectedDataRow(object sender, Control.GridView.RowEventArgs e)
 {
     Dictionary<string, object> dataKey = (Dictionary<string, object>)sender;
     addEditSetupPeriodGroup = new AddEditSetupPeriodGroup(dataKey[DataKeyName].ToString());
     this.AddEditTab(string.Format(TabName.Edit, programName), addEditSetupPeriodGroup);
 }
コード例 #5
0
 public void grdBase_onAddNewRow(object sender, EventArgs e)
 {
     addEditSetupPeriodGroup = new AddEditSetupPeriodGroup();
     this.AddEditTab(string.Format(TabName.Add, programName), addEditSetupPeriodGroup);
 }
コード例 #6
0
        private void AddEditTab(string TabTitle, AddEditSetupPeriodGroup controlAddEdit)
        {
            if (tabControl1.TabPages.Count == 1 || (tabControl1.TabPages.Count > 1 && base.formBase.ShowConfirmMessage(GeneralMessage.ConfirmNewTab, "Confirm")))
            {
                controlAddEdit.NotifyReturnEvent += new Control.BaseUserControl.NotifyReturnHandler(NotifyReturnEvent);
                tabPageAddEdit = new TabPage();
                tabPageAddEdit.Controls.Clear();
                tabPageAddEdit.Controls.Add(controlAddEdit);
                tabPageAddEdit.Text = TabTitle;
                controlAddEdit.Dock = DockStyle.Fill;

                if (tabControl1.TabPages.Count > 1)
                {
                    tabControl1.TabPages.RemoveAt(1);
                }
                tabControl1.TabPages.Remove(tabPageAddEdit);
                tabControl1.TabPages.Add(tabPageAddEdit);
            }
            tabControl1.SelectedTab = tabPageAddEdit;
        }