private void AddColumn(object sender, RoutedEventArgs e)
        {
            if (Reporter.ToUser(eUserMsgKey.SaveLocalChanges) == Amdocs.Ginger.Common.eUserMsgSelection.No)
            {
                return;
            }
            AddNewTableColumnPage ANTCP = new AddNewTableColumnPage();

            ANTCP.ShowAsWindow();

            DataSourceTableColumn dsTableColumn = ANTCP.DSTableCol;

            if (dsTableColumn != null)
            {
                SaveTable();
                mDSTableDetails.DSC.AddColumn(mDSTableDetails.Name, dsTableColumn.Name, "Text");

                RefreshGrid();
                mColumnNames.Add(dsTableColumn.Name);
                if (dsTableColumn.Name == "GINGER_USED")
                {
                    grdTableData.btnMarkAll.Visibility = Visibility.Visible;
                    grdTableData.MarkUnMarkAllActive  += MarkUnMarkAllUsed;
                }
            }
        }
Ejemplo n.º 2
0
        private void AddColumn(object sender, RoutedEventArgs e)
        {
            if (Reporter.ToUser(eUserMsgKeys.SaveLocalChanges) == MessageBoxResult.No)
            {
                return;
            }
            AddNewTableColumnPage ANTCP = new AddNewTableColumnPage();

            ANTCP.ShowAsWindow();

            DataSourceTableColumn dsTableColumn = ANTCP.DSTableCol;

            if (dsTableColumn != null)
            {
                SaveTable();
                mDSTableDetails.DSC.AddColumn(mDSTableDetails.Name, dsTableColumn.Name, "Text");

                SetGridView(true);
                SetGridData();
                mColumnNames.Add(dsTableColumn.Name);
                if (dsTableColumn.Name == "GINGER_USED")
                {
                    grdTableData.btnMarkAll.Visibility = Visibility.Visible;
                    grdTableData.MarkUnMarkAllActive  += MarkUnMarkAllUsed;
                }
            }
        }
        private void RemoveColumn(object sender, RoutedEventArgs e)
        {
            if (Reporter.ToUser(eUserMsgKey.SaveLocalChanges) == Amdocs.Ginger.Common.eUserMsgSelection.No)
            {
                return;
            }
            RemoveTableColumnPage RTCP = new RemoveTableColumnPage(mDSTableDetails.DSC.GetColumnList(mDSTableDetails.Name));

            RTCP.ShowAsWindow();

            DataSourceTableColumn dsTableColumn = RTCP.DSTableCol;

            if (dsTableColumn != null)
            {
                SaveTable();
                mDSTableDetails.DSC.RemoveColumn(mDSTableDetails.Name, dsTableColumn.Name);
                SetGridView(true);
                mColumnNames.Remove(dsTableColumn.Name);
                if (dsTableColumn.Name == "GINGER_USED")
                {
                    grdTableData.btnMarkAll.Visibility = Visibility.Collapsed;
                }
            }
        }