示例#1
0
    protected void InitializeColumnData(ref DataTable dt)
    {
        try
        {
            string displayName = string.Empty, groupName = string.Empty;
            bool   blnVisible = false, blnSortable = false, blnOrderable = false;

            foreach (DataColumn gridColumn in dt.Columns)
            {
                displayName  = gridColumn.ColumnName;
                blnVisible   = false;
                blnSortable  = false;
                blnOrderable = false;
                groupName    = string.Empty;

                switch (gridColumn.ColumnName)
                {
                case "A":
                    blnVisible = true;
                    break;

                case "ALLOCATIONGROUPID":
                    blnVisible  = false;
                    blnSortable = false;
                    break;

                case "ALLOCATIONGROUP":
                    displayName = "Allocation Group";
                    blnVisible  = true;
                    blnSortable = true;
                    break;

                case "DESCRIPTION":
                    displayName = "Description";
                    blnVisible  = true;
                    blnSortable = true;
                    break;

                case "NOTES":
                    displayName = "Notes";
                    blnVisible  = true;
                    blnSortable = true;
                    break;

                case "PRIORTY":
                    displayName = "Priorty";
                    blnVisible  = true;
                    blnSortable = true;
                    break;

                case "DAILYMEETINGS":
                    displayName = "Daily Meetings";
                    blnVisible  = true;
                    blnSortable = true;
                    break;

                case "ARCHIVE":
                    displayName = "Archive";
                    blnVisible  = true;
                    blnSortable = false;
                    break;

                case "CHILDCOUNT":
                    blnVisible  = false;
                    blnSortable = false;
                    break;
                }

                columnData.Columns.Add(gridColumn.ColumnName, displayName, blnVisible, blnSortable);
                columnData.Columns.Item(columnData.Columns.Count - 1).CanReorder = blnOrderable;
            }

            //Initialize the columnData
            columnData.Initialize(ref dt, ";", "~", "|");

            //Get sortable columns and default column order
            SortableColumns    = columnData.SortableColumnsToString();
            DefaultColumnOrder = columnData.DefaultColumnOrderToString();
            //Sort and Reorder Columns
            columnData.ReorderDataTable(ref dt, ColumnOrder);
            columnData.SortDataTable(ref dt, SortOrder);
            SelectedColumnOrder = columnData.CurrentColumnOrderToString();
        }
        catch (Exception ex)
        {
            LogUtility.LogException(ex);
        }
    }
示例#2
0
    protected void InitializeColumnData(ref DataTable dt)
    {
        try
        {
            string displayName = string.Empty, groupName = string.Empty;
            bool   blnVisible = false, blnSortable = false, blnOrderable = false;

            foreach (DataColumn gridColumn in dt.Columns)
            {
                displayName  = gridColumn.ColumnName;
                blnVisible   = false;
                blnSortable  = false;
                blnOrderable = false;
                groupName    = string.Empty;

                switch (gridColumn.ColumnName)
                {
                case "SR #":
                    blnVisible = true;
                    break;

                case "SRRankID":
                    displayName = "SR Rank";
                    blnVisible  = true;
                    blnSortable = true;
                    break;

                case "Submitted By":
                    blnVisible  = true;
                    blnSortable = true;
                    break;

                case "Submitted Date":
                    blnVisible  = true;
                    blnSortable = true;
                    break;

                case "StatusID":
                    displayName = "Status";
                    blnVisible  = true;
                    blnSortable = true;
                    break;

                case "Reasoning":
                    blnVisible  = true;
                    blnSortable = true;
                    break;

                case "User's Priority":
                    displayName = "User Priority";
                    blnVisible  = true;
                    blnSortable = true;
                    break;

                case "INVPriorityID":
                    displayName = "Investigation Priority";
                    blnVisible  = true;
                    blnSortable = true;
                    break;

                case "System":
                    blnVisible  = true;
                    blnSortable = true;
                    break;

                case "Description":
                    blnVisible  = true;
                    blnSortable = true;
                    break;

                case "TaskData":
                    displayName = "Work Task";
                    blnVisible  = true;
                    blnSortable = true;
                    break;

                case "Sort":
                    blnVisible  = true;
                    blnSortable = true;
                    break;
                }

                columnData.Columns.Add(gridColumn.ColumnName, displayName, blnVisible, blnSortable);
                columnData.Columns.Item(columnData.Columns.Count - 1).CanReorder = blnOrderable;
            }

            //Initialize the columnData
            columnData.Initialize(ref dt, ";", "~", "|");

            //Get sortable columns and default column order
            SortableColumns    = columnData.SortableColumnsToString();
            DefaultColumnOrder = columnData.DefaultColumnOrderToString();
            //Sort and Reorder Columns
            columnData.ReorderDataTable(ref dt, ColumnOrder);
            columnData.SortDataTable(ref dt, SortOrder);
            SelectedColumnOrder = columnData.CurrentColumnOrderToString();
        }
        catch (Exception ex)
        {
            LogUtility.LogException(ex);
        }
    }
示例#3
0
    protected void InitializeColumnData(ref DataTable dt)
    {
        try
        {
            string displayName = string.Empty, groupName = string.Empty;
            bool   blnVisible = false, blnSortable = false, blnOrderable = false;

            foreach (DataColumn gridColumn in dt.Columns)
            {
                displayName  = gridColumn.ColumnName;
                blnVisible   = false;
                blnSortable  = false;
                blnOrderable = false;
                groupName    = string.Empty;

                switch (gridColumn.ColumnName)
                {
                case "X":
                    blnVisible = true;
                    break;

                case "WTS_SYSTEMSUITEID":
                    blnVisible  = false;
                    blnSortable = false;
                    break;

                case "WTS_SYSTEM_SUITE":
                    displayName = "System Suite";
                    blnVisible  = true;
                    blnSortable = true;
                    break;

                case "DESCRIPTION":
                    displayName = "Description";
                    blnVisible  = true;
                    blnSortable = true;
                    break;

                case "Abbreviation":
                    displayName = "Abbreviation";
                    blnVisible  = true;
                    blnSortable = true;
                    break;

                case "Resources":
                    displayName = "Resources";
                    if (cvValue == "2")
                    {
                        blnVisible  = true;
                        blnSortable = true;
                    }
                    break;

                case "Workload Priority":
                    displayName = "Workload Priority";
                    if (cvValue == "2")
                    {
                        blnVisible  = true;
                        blnSortable = true;
                    }
                    break;

                case "System_Count":
                    displayName = "System Count";
                    blnVisible  = false;
                    blnSortable = true;
                    break;

                case "System Added":
                    displayName = "Last System Added";
                    if (cvValue == "0")
                    {
                        blnVisible  = true;
                        blnSortable = true;
                    }
                    break;

                case "System Review":
                    displayName = "Systems Reviewed";
                    if (cvValue == "0")
                    {
                        blnVisible  = true;
                        blnSortable = true;
                    }
                    break;

                case "Resource Added":
                    displayName = "Last Resource Added";
                    if (cvValue == "2")
                    {
                        blnVisible  = true;
                        blnSortable = true;
                    }
                    break;

                case "Resource Review":
                    displayName = "Resources Reviewed";
                    if (cvValue == "2")
                    {
                        blnVisible  = true;
                        blnSortable = true;
                    }
                    break;

                case "SORTORDER":
                    displayName = "Sort Order";
                    blnVisible  = true;
                    blnSortable = true;
                    break;

                case "ARCHIVE":
                    displayName = "Archive";
                    blnVisible  = true;
                    blnSortable = true;
                    break;
                }

                columnData.Columns.Add(gridColumn.ColumnName, displayName, blnVisible, blnSortable);
                columnData.Columns.Item(columnData.Columns.Count - 1).CanReorder = blnOrderable;
            }

            //Initialize the columnData
            columnData.Initialize(ref dt, ";", "~", "|");

            //Get sortable columns and default column order
            SortableColumns    = columnData.SortableColumnsToString();
            DefaultColumnOrder = columnData.DefaultColumnOrderToString();
            //Sort and Reorder Columns
            columnData.ReorderDataTable(ref dt, ColumnOrder);
            columnData.SortDataTable(ref dt, SortOrder);
            SelectedColumnOrder = columnData.CurrentColumnOrderToString();
        }
        catch (Exception ex)
        {
            LogUtility.LogException(ex);
        }
    }
示例#4
0
    protected void InitializeColumnData(ref DataTable dt)
    {
        try
        {
            string displayName = string.Empty, groupName = string.Empty;
            bool   blnVisible = false, blnSortable = false, blnOrderable = false;

            foreach (DataColumn gridColumn in dt.Columns)
            {
                displayName  = gridColumn.ColumnName;
                blnVisible   = false;
                blnSortable  = false;
                blnOrderable = false;
                groupName    = string.Empty;

                switch (gridColumn.ColumnName)
                {
                case "X":
                    displayName = " ";
                    blnVisible  = true;
                    break;

                case "Y":
                    displayName = " ";
                    blnVisible  = true;
                    break;

                case "NewsID":
                    displayName = "NewsID";
                    blnVisible  = false;
                    blnSortable = false;
                    break;

                case "Start_Date":
                    displayName = "Start Date";
                    blnVisible  = true;
                    blnSortable = true;
                    break;

                case "End_Date":
                    displayName = "End Date";
                    blnVisible  = true;
                    blnSortable = true;
                    break;

                case "Summary":
                    displayName = "Summary";
                    blnVisible  = true;
                    blnSortable = true;
                    break;

                case "Bln_Active":
                    displayName = "Active";
                    blnVisible  = true;
                    blnSortable = true;
                    break;

                case "Detail":
                    displayName = "Detail";
                    blnVisible  = true;
                    blnSortable = true;
                    break;

                case "Bln_News":
                    displayName = "Type";
                    blnVisible  = true;
                    blnSortable = true;
                    break;

                case "CREATEDBY":
                    displayName = "CREATED BY";
                    blnVisible  = true;
                    blnSortable = true;
                    break;

                case "CREATEDDATE":
                    displayName = "CREATED DATE";
                    blnVisible  = true;
                    blnSortable = true;
                    break;
                }

                columnData.Columns.Add(gridColumn.ColumnName, displayName, blnVisible, blnSortable);
                columnData.Columns.Item(columnData.Columns.Count - 1).CanReorder = blnOrderable;
            }

            //Initialize the columnData
            columnData.Initialize(ref dt, ";", "~", "|");

            //Get sortable columns and default column order
            SortableColumns    = columnData.SortableColumnsToString();
            DefaultColumnOrder = columnData.DefaultColumnOrderToString();
            //Sort and Reorder Columns
            columnData.ReorderDataTable(ref dt, ColumnOrder);
            columnData.SortDataTable(ref dt, SortOrder);
            SelectedColumnOrder = columnData.CurrentColumnOrderToString();
        }
        catch (Exception ex)
        {
            LogUtility.LogException(ex);
        }
    }
    protected void InitializeColumnData(ref DataTable dt)
    {
        try
        {
            string displayName = string.Empty, groupName = string.Empty;
            bool   blnVisible = false, blnSortable = false, blnOrderable = false;

            foreach (DataColumn gridColumn in dt.Columns)
            {
                displayName  = gridColumn.ColumnName;
                blnVisible   = false;
                blnSortable  = false;
                blnOrderable = false;
                groupName    = string.Empty;

                if (_workloadAllocationID > 0)
                {
                    switch (gridColumn.ColumnName)
                    {
                    case "X":
                        blnVisible = false;
                        break;

                    case "WorkloadAllocation_ContractID":
                        blnVisible  = false;
                        blnSortable = false;
                        break;

                    case "ContractID":
                        blnVisible  = false;
                        blnSortable = false;
                        break;

                    case "CONTRACT":
                        blnVisible  = true;
                        blnSortable = true;
                        break;

                    case "Primary":
                        blnVisible  = true;
                        blnSortable = true;
                        break;

                    case "Description":
                        blnVisible  = true;
                        blnSortable = true;
                        break;

                    case "SORT":
                        displayName = "Sort Order";
                        blnVisible  = true;
                        blnSortable = true;
                        break;

                    case "ARCHIVE":
                        displayName = "Archive";
                        blnVisible  = true;
                        blnSortable = true;
                        break;

                    case "Y":
                        blnVisible = true;
                        break;
                    }
                }
                else if (_contractID > 0)
                {
                    switch (gridColumn.ColumnName)
                    {
                    case "X":
                        blnVisible = false;
                        break;

                    case "WorkloadAllocation_ContractID":
                        blnVisible  = false;
                        blnSortable = false;
                        break;

                    case "WorkloadAllocationID":
                        blnVisible  = false;
                        blnSortable = false;
                        break;

                    case "Abbreviation":
                        displayName = "Abbr.";
                        blnVisible  = true;
                        blnSortable = true;
                        break;

                    case "WorkloadAllocation":
                        displayName = "Workload Allocation";
                        blnVisible  = true;
                        blnSortable = true;
                        break;

                    case "Primary":
                        blnVisible  = true;
                        blnSortable = true;
                        break;

                    case "WorkloadAllocationDescription":
                        displayName = "Workload Allocation Description";
                        blnVisible  = true;
                        blnSortable = true;
                        break;

                    case "SORT":
                        displayName = "Sort Order";
                        blnVisible  = true;
                        blnSortable = true;
                        break;

                    case "ARCHIVE":
                        displayName = "Archive";
                        blnVisible  = true;
                        blnSortable = true;
                        break;

                    case "Y":
                        blnVisible = true;
                        break;
                    }
                }

                columnData.Columns.Add(gridColumn.ColumnName, displayName, blnVisible, blnSortable);
                columnData.Columns.Item(columnData.Columns.Count - 1).CanReorder = blnOrderable;
            }

            //Initialize the columnData
            columnData.Initialize(ref dt, ";", "~", "|");

            //Get sortable columns and default column order
            SortableColumns    = columnData.SortableColumnsToString();
            DefaultColumnOrder = columnData.DefaultColumnOrderToString();
            //Sort and Reorder Columns
            columnData.ReorderDataTable(ref dt, ColumnOrder);
            columnData.SortDataTable(ref dt, SortOrder);
            SelectedColumnOrder = columnData.CurrentColumnOrderToString();
        }
        catch (Exception ex)
        {
            LogUtility.LogException(ex);
        }
    }
示例#6
0
    private void initializeColumnData(ref DataTable dt)
    {
        try
        {
            string displayName = string.Empty, groupName = string.Empty;
            bool   blnVisible = false, isViewable = false, blnSortable = false, blnOrderable = false;
            bool   showWorkItem = (this.WorkItemID == 0), showTestItem = (this.TestItemID == 0);
            //showWorkItem = showTestItem = true;

            foreach (DataColumn gridColumn in dt.Columns)
            {
                displayName  = gridColumn.ColumnName;
                blnVisible   = false;
                blnSortable  = false;
                blnOrderable = true;
                isViewable   = false;
                groupName    = string.Empty;

                switch (gridColumn.ColumnName)
                {
                case "X":
                    displayName  = " ";
                    blnVisible   = true;
                    isViewable   = true;
                    blnSortable  = false;
                    blnOrderable = false;
                    groupName    = "";
                    break;

                case "WorkItem_TestItemID":
                    displayName  = "WorkItem_TestItemID";
                    blnSortable  = blnVisible = false;
                    isViewable   = false;
                    blnOrderable = false;
                    groupName    = "";
                    break;

                case "WorkItem_Number":
                    displayName  = "Primary Task";
                    blnSortable  = blnVisible = true;
                    isViewable   = true;
                    blnOrderable = false;
                    groupName    = "Work Item";
                    break;

                case "WorkItem_WorkType":
                    displayName  = "Work Type";
                    blnSortable  = blnVisible = showWorkItem;
                    isViewable   = true;
                    blnOrderable = true;
                    groupName    = "Work Item";
                    break;

                case "WorkItem_System":
                    displayName  = "System";
                    blnSortable  = blnVisible = showWorkItem;
                    isViewable   = true;
                    blnOrderable = true;
                    groupName    = "Work Item";
                    break;

                case "WorkItem_Title":
                    displayName  = "Work Item";
                    blnVisible   = showWorkItem;
                    blnSortable  = (this.SourceType != "WorkItem");
                    isViewable   = true;
                    blnOrderable = true;
                    groupName    = "Work Item";
                    break;

                case "WorkItem_STATUS":
                    displayName  = "Work Item<br/>Status";
                    blnSortable  = blnVisible = showWorkItem;
                    isViewable   = true;
                    blnOrderable = true;
                    groupName    = "Work Item";
                    break;

                case "WorkItem_Progress":
                    displayName  = "Work Item<br/>Progress";
                    blnSortable  = blnVisible = showWorkItem;
                    isViewable   = true;
                    blnOrderable = true;
                    groupName    = "Work Item";
                    break;

                case "WorkItem_AssignedTo":
                    displayName  = "Work Item<br/>Assigned To";
                    blnSortable  = blnVisible = showWorkItem;
                    isViewable   = true;
                    blnOrderable = true;
                    groupName    = "Work Item";
                    break;

                case "WorkItem_Primary_Resource":
                    displayName  = "Work Item<br/>Primary Resource";
                    blnSortable  = blnVisible = showWorkItem;
                    isViewable   = true;
                    blnOrderable = true;
                    groupName    = "Work Item";
                    break;

                case "WorkItem_Tester":
                    displayName  = "Work Item Tester";
                    blnSortable  = blnVisible = showWorkItem;
                    isViewable   = true;
                    blnOrderable = true;
                    groupName    = "Work Item";
                    break;

                case "TestItem_Number":
                    displayName  = "Test Task";
                    blnSortable  = blnVisible = true;
                    isViewable   = true;
                    blnOrderable = false;
                    groupName    = "Test Item";
                    break;

                case "TestItem_WorkType":
                    displayName  = "Test Task<br/>Type";
                    blnVisible   = true;
                    blnSortable  = showTestItem;
                    isViewable   = false;
                    blnOrderable = false;
                    groupName    = "Test Item";
                    break;

                case "TestItem_Title":
                    displayName  = "Test Task Title";
                    blnSortable  = blnVisible = (this.SourceType == "WorkItem");
                    isViewable   = true;
                    blnOrderable = true;
                    groupName    = "Test Item";
                    break;

                case "TestItem_STATUS":
                    displayName  = "Test Task Status";
                    blnSortable  = blnVisible = showTestItem;
                    isViewable   = true;
                    blnOrderable = true;
                    groupName    = "Test Item";
                    break;

                case "TestItem_Progress":
                    displayName  = "Test Task<br/>Progress";
                    blnSortable  = blnVisible = showTestItem;
                    isViewable   = true;
                    blnOrderable = true;
                    groupName    = "Test Item";
                    break;

                case "TestItem_AssignedTo":
                    displayName  = "Test Task<br/>Assigned To";
                    blnSortable  = blnVisible = showTestItem;
                    isViewable   = true;
                    blnOrderable = true;
                    groupName    = "Test Item";
                    break;

                case "TestItem_Primary_Resource":
                    displayName  = "Test Task<br/>Primary Resource";
                    blnSortable  = blnVisible = showTestItem;
                    isViewable   = true;
                    blnOrderable = true;
                    groupName    = "Test Item";
                    break;

                case "TestItem_Tester":
                    displayName  = "Test Task Tester";
                    blnSortable  = blnVisible = showTestItem;
                    isViewable   = true;
                    blnOrderable = true;
                    groupName    = "Test Item";
                    break;

                case "ARCHIVE":
                    displayName  = "Archive";
                    blnSortable  = blnVisible = true;
                    isViewable   = true;
                    blnOrderable = true;
                    groupName    = "";
                    break;

                case "CreatedBy":
                    displayName  = "Created By";
                    blnSortable  = blnVisible = false;
                    isViewable   = true;
                    blnOrderable = true;
                    groupName    = "";
                    break;

                case "CreatedDate":
                    displayName  = "Created Date";
                    blnSortable  = blnVisible = false;
                    isViewable   = true;
                    blnOrderable = true;
                    groupName    = "";
                    break;

                case "Y":
                    displayName  = "Y";
                    blnVisible   = true;
                    isViewable   = true;
                    blnSortable  = false;
                    blnOrderable = false;
                    groupName    = "";
                    break;
                }

                _columnData.Columns.Add(gridColumn.ColumnName, displayName, blnVisible, blnSortable);
                _columnData.Columns.Item(_columnData.Columns.Count - 1).CanReorder = blnOrderable;
                _columnData.Columns.Item(_columnData.Columns.Count - 1).Viewable   = isViewable;
            }

            //Initialize the columnData
            _columnData.Initialize(ref dt, ";", "~", "|");

            //Get sortable columns and default column order
            SortableColumns    = _columnData.SortableColumnsToString();
            DefaultColumnOrder = _columnData.DefaultColumnOrderToString();
            //Sort and Reorder Columns
            _columnData.ReorderDataTable(ref dt, ColumnOrder);
            _columnData.SortDataTable(ref dt, SortOrder);
            SelectedColumnOrder = _columnData.CurrentColumnOrderToString();
        }
        catch (Exception ex)
        {
            LogUtility.LogException(ex);
        }
    }
示例#7
0
    protected void InitializeColumnData(ref DataTable dt)
    {
        try
        {
            string displayName = string.Empty, groupName = string.Empty;
            bool   blnVisible = false, blnSortable = false, blnOrderable = false;

            foreach (DataColumn gridColumn in dt.Columns)
            {
                displayName  = gridColumn.ColumnName;
                blnVisible   = false;
                blnSortable  = false;
                blnOrderable = false;
                groupName    = string.Empty;

                switch (gridColumn.ColumnName)
                {
                case "Y":
                    displayName = "Breakout";
                    blnVisible  = true;
                    break;

                case "Total Tasks":
                    displayName = "Total Work Tasks";
                    blnVisible  = true;
                    blnSortable = true;
                    break;

                case "Percent Open":
                    displayName = "% Open Work Tasks";
                    blnVisible  = true;
                    blnSortable = true;
                    break;

                case "Percent Closed":
                    displayName = "% Closed Work Tasks";
                    blnVisible  = true;
                    blnSortable = true;
                    break;

                case "Total Closed":
                    blnVisible  = true;
                    blnSortable = true;
                    groupName   = "Closed Work Tasks";
                    break;

                case "Carry-In (Closed)":
                    displayName = "Carry-In";
                    blnVisible  = true;
                    blnSortable = true;
                    groupName   = "Closed Work Tasks";
                    break;

                case "New (Closed)":
                    displayName = "New";
                    blnVisible  = true;
                    blnSortable = true;
                    groupName   = "Closed Work Tasks";
                    break;

                case "Carry-Out (Closed)":
                    displayName = "Carry-Out";
                    blnVisible  = true;
                    blnSortable = true;
                    groupName   = "Closed Work Tasks";
                    break;

                case "Total Open":
                    blnVisible  = true;
                    blnSortable = true;
                    groupName   = "Open Work Tasks";
                    break;

                case "Carry-In (Open)":
                    displayName = "Carry-In";
                    blnVisible  = true;
                    blnSortable = true;
                    groupName   = "Open Work Tasks";
                    break;

                case "New (Open)":
                    displayName = "New";
                    blnVisible  = true;
                    blnSortable = true;
                    groupName   = "Open Work Tasks";
                    break;

                case "Carry-Out (Open)":
                    displayName = "Carry-Out";
                    blnVisible  = true;
                    blnSortable = true;
                    groupName   = "Open Work Tasks";
                    break;

                case "Dev (Resources)":
                    displayName = "Dev";
                    blnVisible  = true;
                    blnSortable = true;
                    groupName   = "Resources";
                    break;

                case "Biz (Resources)":
                    displayName = "Biz";
                    blnVisible  = true;
                    blnSortable = true;
                    groupName   = "Resources";
                    break;

                case "Total Resources":
                    blnVisible  = true;
                    blnSortable = true;
                    groupName   = "Resources";
                    break;

                case "Z":
                    displayName = "&nbsp;";
                    blnVisible  = true;
                    break;
                }

                columnData.Columns.Add(gridColumn.ColumnName, displayName, blnVisible, blnSortable);
                columnData.Columns.Item(columnData.Columns.Count - 1).CanReorder = blnOrderable;
                columnData.Columns.Item(columnData.Columns.Count - 1).GroupName  = groupName;
            }

            //Initialize the columnData
            columnData.Initialize(ref dt, ";", "~", "|");

            //Get sortable columns and default column order
            SortableColumns    = columnData.SortableColumnsToString();
            DefaultColumnOrder = columnData.DefaultColumnOrderToString();
            //Sort and Reorder Columns
            columnData.ReorderDataTable(ref dt, ColumnOrder);
            columnData.SortDataTable(ref dt, SortOrder);
            SelectedColumnOrder = columnData.CurrentColumnOrderToString();
        }
        catch (Exception ex)
        {
            LogUtility.LogException(ex);
        }
    }
示例#8
0
    protected void InitializeColumnData(ref DataTable dt)
    {
        try
        {
            string displayName = string.Empty, groupName = string.Empty;
            bool   blnVisible = false, blnSortable = false, blnOrderable = false;

            foreach (DataColumn gridColumn in dt.Columns)
            {
                displayName  = gridColumn.ColumnName;
                blnVisible   = false;
                blnSortable  = false;
                blnOrderable = false;
                groupName    = string.Empty;

                switch (gridColumn.ColumnName)
                {
                case "X":
                    displayName = "&nbsp;";
                    blnVisible  = true;
                    break;

                case "AOREstimationID":
                    displayName = "AOREstimationID";
                    blnVisible  = false;
                    blnSortable = false;
                    break;

                case "AOREstimationName":
                    displayName = "Name";
                    blnVisible  = true;
                    blnSortable = true;
                    break;

                case "Description":
                    displayName = "Description";
                    blnVisible  = true;
                    blnSortable = false;
                    break;

                case "Notes":
                    displayName = "Notes";
                    blnVisible  = true;
                    blnSortable = false;
                    break;

                case "CreatedBy":
                    displayName = "Created By";
                    blnVisible  = true;
                    blnSortable = true;
                    break;

                case "UpdatedBy":
                    displayName = "Updated By";
                    blnVisible  = true;
                    blnSortable = true;
                    break;

                //case "Archive":
                //    displayName = "Archive";
                //    blnVisible = false;
                //    blnSortable = false;
                //    break;
                case "Y":
                    displayName = "&nbsp;";
                    blnVisible  = true;
                    break;
                }

                _columnData.Columns.Add(gridColumn.ColumnName, displayName, blnVisible, blnSortable);
                _columnData.Columns.Item(_columnData.Columns.Count - 1).CanReorder = blnOrderable;
            }

            //Initialize the columnData
            _columnData.Initialize(ref dt, ";", "~", "|");

            //Get sortable columns and default column order
            SortableColumns    = _columnData.SortableColumnsToString();
            DefaultColumnOrder = _columnData.DefaultColumnOrderToString();
            //Sort and Reorder Columns
            _columnData.ReorderDataTable(ref dt, ColumnOrder);
            _columnData.SortDataTable(ref dt, SortOrder);
            SelectedColumnOrder = _columnData.CurrentColumnOrderToString();
        }
        catch (Exception ex)
        {
            LogUtility.LogException(ex);
        }
    }
示例#9
0
    protected void InitializeColumnData(ref DataTable dt)
    {
        try
        {
            string displayName = string.Empty, groupName = string.Empty;
            bool   blnVisible = false, blnSortable = false, blnOrderable = false;

            foreach (DataColumn gridColumn in dt.Columns)
            {
                displayName  = gridColumn.ColumnName;
                blnVisible   = false;
                blnSortable  = false;
                blnOrderable = false;
                groupName    = string.Empty;

                switch (gridColumn.ColumnName)
                {
                case "Z":
                    displayName = "&nbsp;";
                    blnVisible  = true;
                    break;

                case "X":
                    displayName = "&nbsp;";
                    blnVisible  = true;
                    break;

                case "Contract":
                    displayName = "Contract";
                    blnVisible  = true;
                    blnSortable = true;
                    break;

                case "ContractType":
                    displayName = "Contract Type";
                    blnVisible  = true;
                    blnSortable = true;
                    break;

                case "DESCRIPTION":
                    displayName = "Description";
                    blnVisible  = true;
                    break;

                case "CRReportViews":
                    displayName = "CR Report Views";
                    blnVisible  = true;
                    break;

                //case "WorkRequest_Count":
                //	displayName = "Work Requests";
                //	blnVisible = true;
                //	blnSortable = true;
                //	break;
                case "CRREPORTLASTRUNBY":
                    displayName = "Last CR Report Run By";
                    blnVisible  = true;
                    blnSortable = true;
                    break;

                case "CRREPORTLASTRUNDATE":
                    displayName = "Date of Last CR Report";
                    blnVisible  = true;
                    blnSortable = true;
                    break;

                case "SORT_ORDER":
                    displayName = "Sort Order";
                    blnVisible  = true;
                    blnSortable = true;
                    break;

                case "ARCHIVE":
                    displayName = "Archive";
                    blnVisible  = true;
                    blnSortable = true;
                    break;
                }

                columnData.Columns.Add(gridColumn.ColumnName, displayName, blnVisible, blnSortable);
                columnData.Columns.Item(columnData.Columns.Count - 1).CanReorder = blnOrderable;
            }

            //Initialize the columnData
            columnData.Initialize(ref dt, ";", "~", "|");

            //Get sortable columns and default column order
            SortableColumns    = columnData.SortableColumnsToString();
            DefaultColumnOrder = columnData.DefaultColumnOrderToString();
            //Sort and Reorder Columns
            columnData.ReorderDataTable(ref dt, ColumnOrder);
            columnData.SortDataTable(ref dt, SortOrder);
            SelectedColumnOrder = columnData.CurrentColumnOrderToString();
        }
        catch (Exception ex)
        {
            LogUtility.LogException(ex);
        }
    }
    protected void InitializeColumnData(ref DataTable dt)
    {
        try
        {
            string displayName = string.Empty, groupName = string.Empty;
            bool   blnVisible = false, blnSortable = false, blnOrderable = false;

            foreach (DataColumn gridColumn in dt.Columns)
            {
                displayName  = gridColumn.ColumnName;
                blnVisible   = false;
                blnSortable  = false;
                blnOrderable = false;
                groupName    = string.Empty;

                switch (gridColumn.ColumnName)
                {
                case "X":
                    displayName = "&nbsp;";
                    blnVisible  = true;
                    break;

                case "HardwareType":
                    displayName = "Device Type";
                    blnVisible  = true;
                    blnSortable = true;
                    break;

                case "DeviceSN_Tag":
                    displayName = "Serial Number/Tag";
                    blnVisible  = true;
                    blnSortable = true;
                    break;

                case "DeviceName":
                    displayName = "Device Name";
                    blnVisible  = true;
                    blnSortable = true;
                    break;

                case "Description":
                    displayName = "Description";
                    blnVisible  = true;
                    blnSortable = true;
                    break;

                case "HasDevice":
                    displayName = "Has Device";
                    blnVisible  = true;
                    blnSortable = true;
                    break;
                }

                columnData.Columns.Add(gridColumn.ColumnName, displayName, blnVisible, blnSortable);
                columnData.Columns.Item(columnData.Columns.Count - 1).CanReorder = blnOrderable;
            }

            //Initialize the columnData
            columnData.Initialize(ref dt, ";", "~", "|");

            //Get sortable columns and default column order
            SortableColumns    = columnData.SortableColumnsToString();
            DefaultColumnOrder = columnData.DefaultColumnOrderToString();
            //Sort and Reorder Columns
            columnData.ReorderDataTable(ref dt, ColumnOrder);
            columnData.SortDataTable(ref dt, SortOrder);
            SelectedColumnOrder = columnData.CurrentColumnOrderToString();
        }
        catch (Exception ex)
        {
            LogUtility.LogException(ex);
        }
    }
示例#11
0
    protected void InitializeColumnData(ref DataTable dt)
    {
        try
        {
            string displayName = string.Empty, groupName = string.Empty;
            bool   blnVisible = false, blnSortable = false, blnOrderable = false;

            foreach (DataColumn gridColumn in dt.Columns)
            {
                displayName  = gridColumn.ColumnName;
                blnVisible   = false;
                blnSortable  = false;
                blnOrderable = false;
                groupName    = string.Empty;

                switch (gridColumn.ColumnName)
                {
                case "WTS_RESOURCEID":
                    blnVisible   = false;
                    blnSortable  = false;
                    blnOrderable = false;
                    break;

                case "Membership_UserId":
                    blnVisible   = false;
                    blnSortable  = false;
                    blnOrderable = false;
                    break;

                case "IsRegistered":
                    displayName  = "Registered";
                    blnVisible   = true;
                    blnSortable  = true;
                    blnOrderable = false;
                    break;

                case "IsApproved":
                    displayName  = "Approved";
                    blnVisible   = true;
                    blnSortable  = true;
                    blnOrderable = false;
                    break;

                case "IsLockedOut":
                    displayName  = "Locked";
                    blnVisible   = true;
                    blnSortable  = true;
                    blnOrderable = false;
                    break;

                case "UserName":
                    displayName  = "Username";
                    blnVisible   = true;
                    blnSortable  = true;
                    blnOrderable = false;
                    break;

                case "First_Name":
                    displayName  = "First Name";
                    blnVisible   = true;
                    blnSortable  = true;
                    blnOrderable = false;
                    break;

                case "Last_Name":
                    displayName  = "Last Name";
                    blnVisible   = true;
                    blnSortable  = true;
                    blnOrderable = false;
                    break;

                case "ORGANIZATION":
                    displayName  = "Organization";
                    blnVisible   = true;
                    blnSortable  = true;
                    blnOrderable = false;
                    break;

                case "Roles":
                    displayName  = "Roles";
                    blnVisible   = true;
                    blnSortable  = false;
                    blnOrderable = false;
                    break;

                case "Phone_Office":
                    displayName  = "Phone";
                    blnVisible   = true;
                    blnSortable  = false;
                    blnOrderable = false;
                    break;

                case "Phone_Mobile":
                    displayName  = "Mobile";
                    blnVisible   = false;
                    blnSortable  = false;
                    blnOrderable = false;
                    break;

                case "State":
                    displayName  = "Office Location";
                    blnVisible   = true;
                    blnSortable  = true;
                    blnOrderable = false;
                    break;

                case "Email":
                    displayName  = "Email";
                    blnVisible   = true;
                    blnSortable  = false;
                    blnOrderable = false;
                    break;

                //case "ReceiveSREMail":
                //    displayName = "Recieve SR Report EMail";
                //    blnVisible = true;
                //    blnSortable = false;
                //    blnOrderable = false;
                //    break;
                case "IncludeInSRCounts":
                    displayName  = "Include in SR Counts";
                    blnVisible   = true;
                    blnSortable  = false;
                    blnOrderable = false;
                    break;
                }

                ColumnData.Columns.Add(gridColumn.ColumnName, displayName, blnVisible, blnSortable);
                ColumnData.Columns.Item(ColumnData.Columns.Count - 1).CanReorder = blnOrderable;
            }

            //Initialize the columnData
            ColumnData.Initialize(ref dt, ";", "~", "|");

            //Get sortable columns and default column order
            SortableColumns    = ColumnData.SortableColumnsToString();
            DefaultColumnOrder = ColumnData.DefaultColumnOrderToString();
            //Sort and Reorder Columns
            ColumnData.ReorderDataTable(ref dt, ColumnOrder);
            ColumnData.SortDataTable(ref dt, SortOrder);
            SelectedColumnOrder = ColumnData.CurrentColumnOrderToString();
        }
        catch (Exception ex)
        {
            LogUtility.LogException(ex);
        }
    }
示例#12
0
    protected void InitializeColumnData(ref DataTable dt)
    {
        try
        {
            string displayName = string.Empty, groupName = string.Empty;
            bool   blnVisible = false, blnSortable = false, blnOrderable = false;

            foreach (DataColumn gridColumn in dt.Columns)
            {
                displayName  = gridColumn.ColumnName;
                blnVisible   = false;
                blnSortable  = false;
                blnOrderable = false;
                groupName    = string.Empty;

                switch (gridColumn.ColumnName)
                {
                case "X":
                    displayName = "&nbsp;";
                    blnVisible  = true;
                    break;

                case "ROW_ID":
                    displayName = "NO.";
                    blnVisible  = true;
                    break;

                case "WORKREQUESTID":
                    displayName  = "Request Number";
                    blnVisible   = true;
                    blnSortable  = true;
                    blnOrderable = false;
                    break;

                case "CONTRACT":
                    displayName  = "Contract";
                    blnVisible   = true;
                    blnSortable  = true;
                    blnOrderable = false;
                    break;

                case "ORGANIZATION":
                    displayName  = "Department /<br/>Organization";
                    blnVisible   = true;
                    blnSortable  = true;
                    blnOrderable = false;
                    break;

                case "Request_Type":
                    displayName  = "Request Type";
                    blnVisible   = true;
                    blnSortable  = true;
                    blnOrderable = false;
                    break;

                case "Work_Scope":
                    displayName  = "Scope";
                    blnVisible   = true;
                    blnSortable  = false;
                    blnOrderable = false;
                    break;

                case "TITLE":
                    displayName  = "Title";
                    blnVisible   = true;
                    blnSortable  = true;
                    blnOrderable = false;
                    break;

                case "SR_Count":
                    displayName  = "SRs";
                    blnVisible   = true;
                    blnSortable  = true;
                    blnOrderable = true;
                    break;

                case "WorkItem_Count":
                    displayName  = "Work Items";
                    blnVisible   = true;
                    blnSortable  = true;
                    blnOrderable = true;
                    break;

                case "PRIORITY":
                    displayName  = "Operations<br/>Priority";
                    blnVisible   = true;
                    blnSortable  = true;
                    blnOrderable = false;
                    break;

                case "SME":
                    displayName  = "SME";
                    blnVisible   = true;
                    blnSortable  = true;
                    blnOrderable = false;
                    break;

                case "Lead_Tech_Writer":
                    displayName  = "Lead Tech<br/>Writer";
                    blnVisible   = true;
                    blnSortable  = true;
                    blnOrderable = false;
                    break;

                case "Lead_Resource":
                    displayName  = "Lead Resource";
                    blnVisible   = true;
                    blnSortable  = true;
                    blnOrderable = false;
                    break;

                case "PD2_TDR_Phase":
                    displayName  = "PD2 TDR Phase";
                    blnVisible   = true;
                    blnSortable  = true;
                    blnOrderable = false;
                    break;

                case "My_Role":
                    displayName  = "My Role";
                    blnVisible   = true;
                    blnSortable  = false;
                    blnOrderable = false;
                    break;

                case "Submitted_By":
                    displayName  = "Submitted By";
                    blnVisible   = true;
                    blnSortable  = true;
                    blnOrderable = false;
                    break;
                }

                columnData.Columns.Add(gridColumn.ColumnName, displayName, blnVisible, blnSortable);
                columnData.Columns.Item(columnData.Columns.Count - 1).CanReorder = blnOrderable;
            }

            //Initialize the columnData
            columnData.Initialize(ref dt, ";", "~", "|");

            //Get sortable columns and default column order
            SortableColumns    = columnData.SortableColumnsToString();
            DefaultColumnOrder = columnData.DefaultColumnOrderToString();
            //Sort and Reorder Columns
            columnData.ReorderDataTable(ref dt, ColumnOrder);
            columnData.SortDataTable(ref dt, SortOrder);
            SelectedColumnOrder = columnData.CurrentColumnOrderToString();
        }
        catch (Exception ex)
        {
            LogUtility.LogException(ex);
        }
    }
示例#13
0
    protected void InitializeColumnData_Request(ref DataTable dt)
    {
        try
        {
            string displayName = string.Empty, groupName = string.Empty;
            bool   blnVisible = false, blnSortable = false, blnOrderable = false;

            foreach (DataColumn gridColumn in dt.Columns)
            {
                displayName  = gridColumn.ColumnName;
                blnVisible   = false;
                blnSortable  = false;
                blnOrderable = false;
                groupName    = string.Empty;

                switch (gridColumn.ColumnName)
                {
                case "TypeLabel":
                    groupName   = "Work Requests";
                    displayName = "Request Type";
                    blnVisible  = true;
                    break;

                case "Investigation":
                    groupName   = "Open";
                    displayName = "Investigation";
                    blnVisible  = true;
                    break;

                case "Planning":
                    groupName   = "Open";
                    displayName = "Planning";
                    blnVisible  = true;
                    break;

                case "Investigation_Planning":
                    groupName   = "Open";
                    displayName = "Investigation/Planning";
                    blnVisible  = true;
                    break;

                case "Design":
                    groupName   = "Open";
                    displayName = "Design";
                    blnVisible  = true;
                    break;

                case "Develop":
                    groupName   = "Open";
                    displayName = "Develop";
                    blnVisible  = true;
                    break;

                case "Testing":
                    groupName   = "Open";
                    displayName = "Testing";
                    blnVisible  = true;
                    break;

                case "Deploy":
                    groupName   = "Open";
                    displayName = "Deploy";
                    blnVisible  = true;
                    break;

                case "Review":
                    groupName   = "Open";
                    displayName = "Review";
                    blnVisible  = true;
                    break;
                }

                columnData_Request.Columns.Add(gridColumn.ColumnName, displayName, blnVisible, blnSortable);
                columnData_Request.Columns.Item(columnData_Request.Columns.Count - 1).CanReorder = blnOrderable;
                columnData_Request.Columns.Item(columnData_Request.Columns.Count - 1).GroupName  = groupName;
            }

            //Initialize the columnData
            columnData_Request.Initialize(ref dt, ";", "~", "|");

            //Get sortable columns and default column order
            SortableColumns    = columnData_Request.SortableColumnsToString();
            DefaultColumnOrder = columnData_Request.DefaultColumnOrderToString();
            //Sort and Reorder Columns
            columnData_Request.ReorderDataTable(ref dt, ColumnOrder);
            columnData_Request.SortDataTable(ref dt, SortOrder);
            SelectedColumnOrder = columnData_Request.CurrentColumnOrderToString();
        }
        catch (Exception ex)
        {
            LogUtility.LogException(ex);
        }
    }
示例#14
0
    protected void InitializeColumnData_Workload(ref DataTable dt)
    {
        try
        {
            string displayName = string.Empty, groupName = string.Empty;
            bool   blnVisible = false, blnSortable = false, blnOrderable = false;

            foreach (DataColumn gridColumn in dt.Columns)
            {
                displayName  = gridColumn.ColumnName;
                blnVisible   = false;
                blnSortable  = false;
                blnOrderable = false;
                groupName    = string.Empty;

                switch (gridColumn.ColumnName)
                {
                case "PriorityLabel":
                    displayName = "Priority";
                    groupName   = "Work Tasks";
                    blnVisible  = true;
                    break;

                case "New":
                    displayName = "New";
                    groupName   = "Open";
                    blnVisible  = true;
                    break;

                case "In_Progress":
                    displayName = "In-Progress";
                    groupName   = "Open";
                    blnVisible  = true;
                    break;

                case "Re_Opened":
                    displayName = "Re-Opened";
                    groupName   = "Open";
                    blnVisible  = true;
                    break;

                case "Info_Requested":
                    displayName = "Info Requested";
                    groupName   = "Open";
                    blnVisible  = true;
                    break;

                case "Info Provided":
                    displayName = "Info Provided";
                    groupName   = "Open";
                    blnVisible  = true;
                    break;

                case "Checked_In":
                    displayName = "Checked-In";
                    groupName   = "Open";
                    blnVisible  = true;
                    break;

                case "Deployed":
                    displayName = "Deployed";
                    groupName   = "Awaiting Closure";
                    blnVisible  = true;
                    break;

                case "Closed":
                    displayName = "Closed";
                    groupName   = "Closed";
                    blnVisible  = true;
                    break;

                case "X":
                    displayName = "&nbsp;";
                    blnVisible  = false;
                    break;
                }

                columnData_Workload.Columns.Add(gridColumn.ColumnName, displayName, blnVisible, blnSortable);
                columnData_Workload.Columns.Item(columnData_Workload.Columns.Count - 1).CanReorder = blnOrderable;
                columnData_Workload.Columns.Item(columnData_Workload.Columns.Count - 1).GroupName  = groupName;
            }

            //Initialize the columnData
            columnData_Workload.Initialize(ref dt, ";", "~", "|");

            //Get sortable columns and default column order
            SortableColumns    = columnData_Workload.SortableColumnsToString();
            DefaultColumnOrder = columnData_Workload.DefaultColumnOrderToString();
            //Sort and Reorder Columns
            columnData_Workload.ReorderDataTable(ref dt, ColumnOrder);
            columnData_Workload.SortDataTable(ref dt, SortOrder);
            SelectedColumnOrder = columnData_Workload.CurrentColumnOrderToString();
        }
        catch (Exception ex)
        {
            LogUtility.LogException(ex);
        }
    }
示例#15
0
    protected void InitializeColumnData(ref DataTable dt)
    {
        try
        {
            string displayName = string.Empty, groupName = string.Empty;
            bool blnVisible = false, blnSortable = false, blnOrderable = false;

            foreach (DataColumn gridColumn in dt.Columns)
            {
                displayName = gridColumn.ColumnName;
                blnVisible = false;
                blnSortable = false;
                blnOrderable = false;
                groupName = string.Empty;

                switch (gridColumn.ColumnName)
                {
                    case "X":
                        blnVisible = true;
                        break;
                    case "AOR #":
                        blnVisible = true;
                        blnSortable = true;
                        break;
                    case "AOR Name":
                        blnVisible = true;
                        blnSortable = true;
                        break;
                    case "Description":
                        displayName = "Description";
                        blnVisible = true;
                        blnSortable = true;
                        break;
                    case "Risk":
                        blnVisible = true;
                        blnSortable = true;
                        break;
                    case "Weight":
                        displayName = "Weight (%)";
                        blnVisible = true;
                        blnSortable = true;
                        break;
                    case "Avg. Resources":
                        blnVisible = true;
                        blnSortable = true;
                        break;
                    case "Z":
                        blnVisible = true;
                        break;
                }

                columnData.Columns.Add(gridColumn.ColumnName, displayName, blnVisible, blnSortable);
                columnData.Columns.Item(columnData.Columns.Count - 1).CanReorder = blnOrderable;
            }

            //Initialize the columnData
            columnData.Initialize(ref dt, ";", "~", "|");

            //Get sortable columns and default column order
            SortableColumns = columnData.SortableColumnsToString();
            DefaultColumnOrder = columnData.DefaultColumnOrderToString();
            //Sort and Reorder Columns
            columnData.ReorderDataTable(ref dt, ColumnOrder);
            columnData.SortDataTable(ref dt, SortOrder);
            SelectedColumnOrder = columnData.CurrentColumnOrderToString();

        }
        catch (Exception ex)
        {
            LogUtility.LogException(ex);
        }
    }
    protected void InitializeColumnData(ref DataTable dt)
    {
        try
        {
            string displayName = string.Empty, groupName = string.Empty;
            bool   blnVisible = false, blnSortable = false, blnOrderable = false;

            foreach (DataColumn gridColumn in dt.Columns)
            {
                displayName  = gridColumn.ColumnName;
                blnVisible   = false;
                blnSortable  = false;
                blnOrderable = false;
                groupName    = string.Empty;

                switch (gridColumn.ColumnName)
                {
                case "X":
                    blnVisible = true;
                    break;

                case "ReleaseScheduleDeliverable":
                    displayName = "Deployment";
                    blnVisible  = true;
                    blnSortable = true;
                    break;

                case "AORCount":
                    displayName = "# of AORs";
                    blnVisible  = true;
                    blnSortable = true;
                    break;

                case "ContractCount":
                    displayName = "# of Contracts";
                    blnVisible  = true;
                    blnSortable = true;
                    break;

                case "Description":
                    displayName = "Description";
                    blnVisible  = true;
                    blnSortable = true;
                    break;

                case "Narrative":
                    blnVisible = true;
                    break;

                case "PlannedDevTestStart":
                    displayName = "Planned Start";
                    blnVisible  = true;
                    blnSortable = true;
                    break;

                case "PlannedEnd":
                    displayName = "Planned End";
                    blnVisible  = true;
                    blnSortable = true;
                    break;

                case "Risk":
                    blnVisible  = true;
                    blnSortable = true;
                    break;

                case "Avg. Resources":
                    blnVisible  = true;
                    blnSortable = true;
                    break;

                case "Visible":
                    displayName = "Visible To Customer";
                    blnVisible  = true;
                    blnSortable = true;
                    break;

                case "SORT_ORDER":
                    displayName = "Sort Order";
                    blnVisible  = true;
                    blnSortable = true;
                    break;

                case "ARCHIVE":
                    displayName = "Archive";
                    blnVisible  = true;
                    blnSortable = true;
                    break;
                }

                columnData.Columns.Add(gridColumn.ColumnName, displayName, blnVisible, blnSortable);
                columnData.Columns.Item(columnData.Columns.Count - 1).CanReorder = blnOrderable;
            }

            //Initialize the columnData
            columnData.Initialize(ref dt, ";", "~", "|");

            //Get sortable columns and default column order
            SortableColumns    = columnData.SortableColumnsToString();
            DefaultColumnOrder = columnData.DefaultColumnOrderToString();
            //Sort and Reorder Columns
            columnData.ReorderDataTable(ref dt, ColumnOrder);
            columnData.SortDataTable(ref dt, SortOrder);
            SelectedColumnOrder = columnData.CurrentColumnOrderToString();
        }
        catch (Exception ex)
        {
            LogUtility.LogException(ex);
        }
    }
    protected void InitializeColumnData(ref DataTable dt)
    {
        try
        {
            string displayName = string.Empty, groupName = string.Empty;
            bool   blnVisible = false, blnSortable = false, blnOrderable = false;

            foreach (DataColumn gridColumn in dt.Columns)
            {
                displayName  = gridColumn.ColumnName;
                blnVisible   = false;
                blnSortable  = false;
                blnOrderable = false;
                groupName    = string.Empty;

                switch (gridColumn.ColumnName)
                {
                case "ReleaseAssessmentID":
                    displayName = "Release Assessment #";
                    blnVisible  = true;
                    blnSortable = true;
                    break;

                case "ProductVersion":
                    displayName = "Release";
                    blnVisible  = true;
                    blnSortable = true;
                    break;

                case "CONTRACT":
                    displayName = "Contract";
                    blnVisible  = true;
                    blnSortable = true;
                    break;

                case "DeploymentCount":
                    displayName = "Deployments";
                    blnVisible  = true;
                    blnSortable = true;
                    break;

                case "ReviewNarrative":
                    displayName = "Review Narrative";
                    blnVisible  = true;
                    break;

                case "Mitigation":
                    blnVisible  = true;
                    blnSortable = true;
                    break;

                case "MitigationNarrative":
                    displayName = "Mitigation Narrative";
                    blnVisible  = true;
                    break;

                case "Reviewed":
                    blnVisible  = true;
                    blnSortable = true;
                    break;

                case "ReviewedBy":
                    displayName = "Reviewed By";
                    blnVisible  = true;
                    blnSortable = true;
                    break;

                case "ReviewedDate":
                    displayName = "Reviewed Date";
                    blnVisible  = true;
                    blnSortable = true;
                    break;

                //case "Sort":
                //    blnVisible = true;
                //    blnSortable = true;
                //    break;
                case "Archive":
                    blnVisible  = true;
                    blnSortable = true;
                    break;

                case "CreatedBy":
                    displayName = "Created By";
                    blnVisible  = true;
                    blnSortable = true;
                    break;

                case "CreatedDate":
                    displayName = "Created Date";
                    blnVisible  = true;
                    blnSortable = true;
                    break;

                case "UpdatedBy":
                    displayName = "Updated By";
                    blnVisible  = true;
                    blnSortable = true;
                    break;

                case "UpdatedDate":
                    displayName = "Updated Date";
                    blnVisible  = true;
                    blnSortable = true;
                    break;

                case "Z":
                    displayName = "";
                    blnVisible  = true;
                    break;
                }

                columnData.Columns.Add(gridColumn.ColumnName, displayName, blnVisible, blnSortable);
                columnData.Columns.Item(columnData.Columns.Count - 1).CanReorder = blnOrderable;
            }

            //Initialize the columnData
            columnData.Initialize(ref dt, ";", "~", "|");

            //Get sortable columns and default column order
            SortableColumns    = columnData.SortableColumnsToString();
            DefaultColumnOrder = columnData.DefaultColumnOrderToString();
            //Sort and Reorder Columns
            columnData.ReorderDataTable(ref dt, ColumnOrder);
            columnData.SortDataTable(ref dt, SortOrder);
            SelectedColumnOrder = columnData.CurrentColumnOrderToString();
        }
        catch (Exception ex)
        {
            LogUtility.LogException(ex);
        }
    }
示例#18
0
    protected void InitializeColumnData(ref DataTable dt)
    {
        try
        {
            string displayName = string.Empty, groupName = string.Empty;
            bool   blnVisible = false, blnSortable = false, blnOrderable = false;

            foreach (DataColumn gridColumn in dt.Columns)
            {
                displayName  = gridColumn.ColumnName;
                blnVisible   = false;
                blnSortable  = false;
                blnOrderable = true;
                groupName    = string.Empty;

                switch (gridColumn.ColumnName)
                {
                case "A":
                    displayName  = ddlChildView.SelectedItem.ToString() + "s";
                    blnVisible   = true;
                    blnOrderable = false;
                    break;

                case "X":
                    displayName  = "Delete";
                    blnVisible   = true;
                    blnOrderable = false;
                    break;

                case "WTS_SystemSuite":
                    displayName = "Suite";
                    blnVisible  = true;
                    blnSortable = true;
                    break;

                case "WTS_SYSTEM":
                    displayName = "System(Task)";
                    blnVisible  = true;
                    blnSortable = true;
                    break;

                case "DESCRIPTION":
                    displayName = "Description";
                    blnVisible  = true;
                    break;

                case "CONTRACT":
                    displayName = "Contract";
                    blnVisible  = true;
                    break;

                case "BusWorkloadManager":
                    displayName = "Bus Workload Manager";
                    blnVisible  = true;
                    blnSortable = true;
                    break;

                case "DevWorkloadManager":
                    displayName = "Dev Workload Manager";
                    blnVisible  = true;
                    blnSortable = true;
                    break;

                case "WorkArea_Count":
                    displayName = "Work Areas";
                    if (cvValue == "0")
                    {
                        blnVisible  = true;
                        blnSortable = true;
                    }
                    break;

                case "Work Area Added":
                    displayName = "Last Work Area Added";
                    if (cvValue == "0")
                    {
                        blnVisible  = true;
                        blnSortable = true;
                    }
                    break;

                case "Work Area Review":
                    displayName = "Work Areas Reviewed";
                    if (cvValue == "0")
                    {
                        blnVisible  = true;
                        blnSortable = true;
                    }
                    break;

                case "WorkItem_Count":
                    displayName = "Primary Tasks";
                    blnVisible  = true;
                    blnSortable = true;
                    break;

                case "SORT_ORDER":
                    displayName = "Sort Order";
                    blnVisible  = true;
                    blnSortable = true;
                    break;

                case "ARCHIVE":
                    displayName = "Archive";
                    blnVisible  = true;
                    blnSortable = true;
                    break;
                }

                columnData.Columns.Add(gridColumn.ColumnName, displayName, blnVisible, blnSortable);
                columnData.Columns.Item(columnData.Columns.Count - 1).CanReorder = blnOrderable;
                columnData.Columns.Item(columnData.Columns.Count - 1).Viewable   = blnVisible;
            }

            //Initialize the columnData
            columnData.Initialize(ref dt, ";", "~", "|");

            //Get sortable columns and default column order
            SortableColumns    = columnData.SortableColumnsToString();
            DefaultColumnOrder = columnData.DefaultColumnOrderToString();
            //Sort and Reorder Columns
            columnData.ReorderDataTable(ref dt, ColumnOrder);

            SortOrder = Workload.GetSortValuesFromDB(1, "MDGRID_SYSTEM.ASPX");

            columnData.SortDataTable(ref dt, SortOrder);
            SelectedColumnOrder = columnData.CurrentColumnOrderToString();
        }
        catch (Exception ex)
        {
            LogUtility.LogException(ex);
        }
    }
示例#19
0
    protected void InitializeColumnData(ref DataTable dt)
    {
        try
        {
            string displayName = string.Empty, groupName = string.Empty;
            bool   blnVisible = false, blnSortable = false, blnOrderable = false;

            foreach (DataColumn gridColumn in dt.Columns)
            {
                displayName  = gridColumn.ColumnName;
                blnVisible   = false;
                blnSortable  = false;
                blnOrderable = false;
                groupName    = string.Empty;

                switch (gridColumn.ColumnName)
                {
                case "A":
                    blnVisible = true;
                    break;

                case "X":
                    blnVisible = true;
                    break;

                case "WorkArea":
                    displayName = "Work Area";
                    blnVisible  = true;
                    blnSortable = true;
                    break;

                case "Description":
                    displayName = "Description";
                    blnVisible  = true;
                    break;

                case "WorkItem_Count":
                    displayName = "Primary Tasks";
                    blnVisible  = true;
                    blnSortable = true;
                    break;

                case "ProposedPriorityRank":
                    displayName = "Proposed Priority";
                    blnVisible  = true;
                    blnSortable = true;
                    break;

                case "ActualPriorityRank":
                    displayName = "Approved Priority";
                    blnVisible  = true;
                    blnSortable = true;
                    break;

                case "ARCHIVE":
                    displayName = "Archive";
                    blnVisible  = true;
                    blnSortable = true;
                    break;
                }

                columnData.Columns.Add(gridColumn.ColumnName, displayName, blnVisible, blnSortable);
                columnData.Columns.Item(columnData.Columns.Count - 1).CanReorder = blnOrderable;
            }

            //Initialize the columnData
            columnData.Initialize(ref dt, ";", "~", "|");

            //Get sortable columns and default column order
            SortableColumns    = columnData.SortableColumnsToString();
            DefaultColumnOrder = columnData.DefaultColumnOrderToString();
            //Sort and Reorder Columns
            columnData.ReorderDataTable(ref dt, ColumnOrder);
            columnData.SortDataTable(ref dt, SortOrder);
            SelectedColumnOrder = columnData.CurrentColumnOrderToString();
        }
        catch (Exception ex)
        {
            LogUtility.LogException(ex);
        }
    }
示例#20
0
    protected void InitializeColumnData_WorkItem(ref DataTable dt)
    {
        try
        {
            string displayName = string.Empty, groupName = string.Empty;
            bool   blnVisible = false, isViewable = false, blnSortable = false, blnOrderable = false;

            foreach (DataColumn gridColumn in dt.Columns)
            {
                displayName  = gridColumn.ColumnName;
                blnVisible   = false;
                blnSortable  = false;
                blnOrderable = true;
                isViewable   = false;
                groupName    = string.Empty;

                switch (gridColumn.ColumnName)
                {
                //case "WORKREQUESTID":
                //	displayName = "Request Number";
                //	blnVisible = false;
                //	isViewable = true;
                //	blnSortable = false;
                //	blnOrderable = false;
                //	break;
                //case "WORKREQUEST":
                //	displayName = "Request";
                //	blnVisible = true;
                //	isViewable = true;
                //	blnSortable = true;
                //	break;
                case "ItemID":
                    displayName  = "Task Number";
                    blnVisible   = true;
                    isViewable   = true;
                    blnSortable  = true;
                    blnOrderable = false;
                    break;

                case "WORKITEMTYPE":
                    displayName = "Work Activity";
                    blnVisible  = true;
                    isViewable  = true;
                    blnSortable = true;
                    break;

                case "Websystem":
                    displayName = "System(Task)";
                    blnVisible  = true;
                    isViewable  = true;
                    blnSortable = true;
                    break;

                case "TITLE":
                    displayName = "Description";
                    blnVisible  = true;
                    isViewable  = true;
                    blnSortable = true;
                    break;

                //case "ALLOCATION":
                //	displayName = "Allocation Assignment";
                //	blnVisible = true;
                //	isViewable = true;
                //	blnSortable = true;
                //	break;
                case "ProductionStatus":
                    displayName = "Production Status";
                    blnVisible  = true;
                    isViewable  = true;
                    blnSortable = true;
                    break;

                case "Version":
                    displayName = "Version";
                    blnVisible  = true;
                    isViewable  = true;
                    blnSortable = true;
                    break;

                case "PRIORITY":
                    displayName = "Priority";
                    blnVisible  = true;
                    isViewable  = true;
                    blnSortable = true;
                    break;

                case "Primary_Analyst":
                    displayName = "Primary Analyst";
                    blnVisible  = false;
                    isViewable  = true;
                    blnSortable = false;
                    break;

                case "Primary_Developer":
                    displayName = "Primary Developer";
                    blnVisible  = true;
                    isViewable  = true;
                    blnSortable = true;
                    break;

                case "Assigned":
                    displayName = "Assigned";
                    blnVisible  = true;
                    isViewable  = true;
                    blnSortable = true;
                    break;

                case "SubmittedBy":
                    displayName  = "Submitted";
                    blnVisible   = true;
                    blnSortable  = true;
                    blnOrderable = true;
                    isViewable   = true;
                    break;

                case "WorkType":
                    displayName = "Resource Group";
                    blnVisible  = true;
                    isViewable  = true;
                    blnSortable = true;
                    break;

                case "STATUS":
                    displayName = "Status";
                    blnVisible  = true;
                    isViewable  = true;
                    blnSortable = true;
                    break;

                case "Progress":
                    displayName = "Progress";
                    blnVisible  = true;
                    isViewable  = true;
                    blnSortable = true;
                    break;

                case "ARCHIVE":
                    displayName = "Archive";
                    blnVisible  = true;
                    isViewable  = true;
                    blnSortable = true;
                    break;
                }

                columnData.Columns.Add(gridColumn.ColumnName, displayName, blnVisible, blnSortable);
                columnData.Columns.Item(columnData.Columns.Count - 1).CanReorder = blnOrderable;
                columnData.Columns.Item(columnData.Columns.Count - 1).Viewable   = isViewable;
            }

            //Initialize the columnData
            columnData.Initialize(ref dt, ";", "~", "|");

            //Get sortable columns and default column order
            SortableColumns    = columnData.SortableColumnsToString();
            DefaultColumnOrder = columnData.DefaultColumnOrderToString();
            //Sort and Reorder Columns
            columnData.ReorderDataTable(ref dt, ColumnOrder);

            SortOrder = Workload.GetSortValuesFromDB(1, "WORKITEMGRID_QM.ASPX");

            columnData.SortDataTable(ref dt, SortOrder);
            SelectedColumnOrder = columnData.CurrentColumnOrderToString();
        }
        catch (Exception ex)
        {
            LogUtility.LogException(ex);
        }
    }
    protected void InitializeColumnData(ref DataTable dt)
    {
        try
        {
            string displayName = string.Empty, groupName = string.Empty;
            bool   blnVisible = false, blnSortable = false, blnOrderable = false;

            foreach (DataColumn gridColumn in dt.Columns)
            {
                displayName  = gridColumn.ColumnName;
                blnVisible   = false;
                blnSortable  = false;
                blnOrderable = false;
                groupName    = string.Empty;

                switch (gridColumn.ColumnName)
                {
                case "A":
                    blnVisible = true;
                    break;

                case "X":
                    blnVisible = true;
                    break;

                case "EffortAreaID":
                    blnVisible = false;
                    break;

                case "EffortArea":
                    displayName = "Area of Effort";
                    blnVisible  = true;
                    blnSortable = true;
                    break;

                case "Description":
                    displayName = "Description";
                    blnVisible  = true;
                    break;

                case "SORT_ORDER":
                    displayName = "Sort";
                    blnVisible  = false;
                    break;

                case "ARCHIVE":
                    displayName = "Archive";
                    blnVisible  = true;
                    blnSortable = true;
                    break;
                }

                _columnData.Columns.Add(gridColumn.ColumnName, displayName, blnVisible, blnSortable);
                _columnData.Columns.Item(_columnData.Columns.Count - 1).CanReorder = blnOrderable;
            }

            //Initialize the columnData
            _columnData.Initialize(ref dt, ";", "~", "|");

            //Get sortable columns and default column order
            SortableColumns    = _columnData.SortableColumnsToString();
            DefaultColumnOrder = _columnData.DefaultColumnOrderToString();
            //Sort and Reorder Columns
            _columnData.ReorderDataTable(ref dt, ColumnOrder);
            _columnData.SortDataTable(ref dt, SortOrder);
            SelectedColumnOrder = _columnData.CurrentColumnOrderToString();
        }
        catch (Exception ex)
        {
            LogUtility.LogException(ex);
        }
    }
示例#22
0
    protected void initializeColumnData(ref DataTable dt)
    {
        _gridColumns = new Dictionary <string, GridColsColumn>();
        try
        {
            GridColsColumn column = new GridColsColumn();
            string         dbName = string.Empty, displayName = string.Empty, idField = string.Empty;
            bool           isVisible = false;

            foreach (DataColumn gridColumn in dt.Columns)
            {
                column      = new GridColsColumn();
                displayName = gridColumn.ColumnName;
                idField     = gridColumn.ColumnName;
                isVisible   = false;

                switch (gridColumn.ColumnName)
                {
                //case "WORKREQUEST":
                //	displayName = "Work Request";
                //	idField = "WORKREQUESTID";
                //	isVisible = true;
                //	break;
                case "WORKITEMTYPE":
                    displayName = "Work Activity";
                    idField     = "WORKITEMTYPEID";
                    isVisible   = true;
                    break;

                case "Websystem":
                    displayName = "System(Task)";
                    idField     = "WTS_SYSTEMID";
                    isVisible   = true;
                    break;

                //case "ALLOCATION":
                //	displayName = "Allocation Assignment";
                //	idField = "ALLOCATIONID";
                //	isVisible = true;
                //	break;
                case "WorkloadGroup":
                    displayName = "Workload Group";
                    idField     = "WorkloadGroupID";
                    isVisible   = true;
                    break;

                case "WorkArea":
                    displayName = "Work Area";
                    idField     = "WorkAreaID";
                    isVisible   = true;
                    break;

                case "Production":
                    displayName = "Production";
                    idField     = "Production";
                    isVisible   = false;
                    break;

                case "Version":
                    displayName = "Release Version";
                    idField     = "ProductVersionID";
                    isVisible   = true;
                    break;

                case "PRIORITY":
                    displayName = "Priority";
                    idField     = "PRIORITYID";
                    isVisible   = true;
                    break;

                case "Primary_Developer":
                    displayName = "Primary Developer";
                    idField     = "PRIMARYRESOURCEID";
                    isVisible   = true;
                    break;

                case "Assigned":
                    displayName = "Assigned To";
                    idField     = "ASSIGNEDRESOURCEID";
                    isVisible   = true;
                    break;

                case "WorkType":
                    displayName = "Resource Group";
                    idField     = "WorkTypeID";
                    isVisible   = true;
                    break;

                case "STATUS":
                    displayName = "Status";
                    idField     = "STATUSID";
                    isVisible   = false;
                    break;

                case "Progress":
                    displayName = "Percent Complete";
                    idField     = "Progress";
                    isVisible   = false;
                    break;

                case "ARCHIVE":
                    displayName = "Archive";
                    idField     = "ARCHIVE";
                    isVisible   = false;
                    break;
                }

                if (isVisible)
                {
                    column.ColumnName  = gridColumn.ColumnName;
                    column.DisplayName = displayName;
                    column.Visible     = isVisible;
                    column.SortName    = idField;

                    _gridColumns.Add(column.DisplayName, column);
                }

                //_columnData.Columns.Add(ColumnName: gridColumn.ColumnName, DisplayName: displayName, SortName: idField, Visible: isVisible, Sortable: false);
            }

            //Initialize the columnData
            _columnData.Initialize(ref dt, ";", "~", "|");
        }
        catch (Exception ex)
        {
            LogUtility.LogException(ex);
        }
    }
示例#23
0
    protected void InitializeColumnData(ref DataTable dt)
    {
        try
        {
            string displayName = string.Empty, groupName = string.Empty;
            bool   blnVisible = false, blnSortable = false, blnOrderable = false;

            foreach (DataColumn gridColumn in dt.Columns)
            {
                displayName  = gridColumn.ColumnName;
                blnVisible   = false;
                blnSortable  = false;
                blnOrderable = false;
                groupName    = string.Empty;

                switch (gridColumn.ColumnName)
                {
                case "Type":
                    displayName = "Type";
                    blnVisible  = true;
                    break;

                case "Attachment Name":
                    displayName = "Attachment Name";
                    blnVisible  = true;
                    blnSortable = true;
                    break;

                case "Description":
                    displayName = "Description";
                    blnVisible  = true;
                    blnSortable = true;
                    break;

                case "File":
                    displayName = "File";
                    blnVisible  = true;
                    blnSortable = true;
                    break;

                //case "INV":
                //    displayName = "INV";
                //    blnVisible = true;
                //    break;
                //case "TD":
                //    displayName = "TD";
                //    blnVisible = true;
                //    break;
                //case "CD":
                //    displayName = "CD";
                //    blnVisible = true;
                //    break;
                //case "C":
                //    displayName = "C";
                //    blnVisible = true;
                //    break;
                //case "IT":
                //    displayName = "IT";
                //    blnVisible = true;
                //    break;
                //case "CVT":
                //    displayName = "CVT";
                //    blnVisible = true;
                //    break;
                //case "ADOPT":
                //    displayName = "ADOPT";
                //    blnVisible = true;
                //    break;
                case "Approved":
                    blnVisible = true;
                    break;

                case "Added By":
                    displayName = "Added By/Updated";
                    blnVisible  = true;
                    break;
                }

                columnData.Columns.Add(gridColumn.ColumnName, displayName, blnVisible, blnSortable);
                columnData.Columns.Item(columnData.Columns.Count - 1).CanReorder = blnOrderable;
            }

            //Initialize the columnData
            columnData.Initialize(ref dt, ";", "~", "|");

            //Get sortable columns and default column order
            SortableColumns    = columnData.SortableColumnsToString();
            DefaultColumnOrder = columnData.DefaultColumnOrderToString();
            //Sort and Reorder Columns
            columnData.ReorderDataTable(ref dt, ColumnOrder);
            columnData.SortDataTable(ref dt, SortOrder);
            SelectedColumnOrder = columnData.CurrentColumnOrderToString();
        }
        catch (Exception ex)
        {
            LogUtility.LogException(ex);
        }
    }
    protected void InitializeColumnData(ref DataTable dt)
    {
        try
        {
            string displayName = string.Empty, groupName = string.Empty;
            bool   blnVisible = false, blnSortable = false, blnOrderable = false;

            foreach (DataColumn gridColumn in dt.Columns)
            {
                displayName  = gridColumn.ColumnName;
                blnVisible   = false;
                blnSortable  = false;
                blnOrderable = false;
                groupName    = string.Empty;

                switch (gridColumn.ColumnName)
                {
                case "X":
                    blnVisible = true;
                    break;

                case "WTS_RESOURCEID":
                    blnVisible  = false;
                    blnSortable = false;
                    break;

                case "USERNAME":
                    displayName = "Resource";
                    blnVisible  = true;
                    blnSortable = true;
                    break;

                case "WTS_RESOURCE_TYPE":
                    displayName = "Resource Type";
                    blnVisible  = true;
                    blnSortable = true;
                    break;

                case "WTS_SYSTEMID":
                    blnVisible  = false;
                    blnSortable = false;
                    break;

                case "WTS_SYSTEM":
                    displayName = "System(Task)";
                    blnVisible  = true;
                    blnSortable = true;
                    break;

                case "DESCRIPTION":
                    displayName = "Description";
                    blnVisible  = true;
                    break;
                }

                columnData.Columns.Add(gridColumn.ColumnName, displayName, blnVisible, blnSortable);
                columnData.Columns.Item(columnData.Columns.Count - 1).CanReorder = blnOrderable;
            }

            //Initialize the columnData
            columnData.Initialize(ref dt, ";", "~", "|");

            //Get sortable columns and default column order
            SortableColumns    = columnData.SortableColumnsToString();
            DefaultColumnOrder = columnData.DefaultColumnOrderToString();
            //Sort and Reorder Columns
            columnData.ReorderDataTable(ref dt, ColumnOrder);
            columnData.SortDataTable(ref dt, SortOrder);
            SelectedColumnOrder = columnData.CurrentColumnOrderToString();
        }
        catch (Exception ex)
        {
            LogUtility.LogException(ex);
        }
    }
    protected void InitializeColumnData(ref DataTable dt)
    {
        try
        {
            string displayName = string.Empty, groupName = string.Empty;
            bool   blnVisible = false, blnSortable = false, blnOrderable = false;

            foreach (DataColumn gridColumn in dt.Columns)
            {
                displayName  = gridColumn.ColumnName;
                blnVisible   = false;
                blnSortable  = false;
                blnOrderable = false;
                groupName    = string.Empty;

                switch (gridColumn.ColumnName)
                {
                case "X":
                    displayName = "&nbsp;";
                    blnVisible  = true;
                    break;

                case "Z":
                    displayName = "&nbsp;";
                    blnVisible  = true;
                    break;

                case "ProductVersion":
                    displayName = "Release Version";
                    blnVisible  = true;
                    blnSortable = true;
                    break;

                case "STATUS":
                    displayName = "Status";
                    blnVisible  = true;
                    blnSortable = true;
                    break;

                case "DESCRIPTION":
                    displayName = "Description";
                    blnVisible  = true;
                    break;

                case "Narrative":
                    blnVisible = true;
                    break;

                case "StartDate":
                    displayName = "Release Start Date";
                    blnVisible  = true;
                    blnSortable = true;
                    break;

                case "EndDate":
                    displayName = "Release End Date";
                    blnVisible  = true;
                    blnSortable = true;
                    break;

                case "WorkItem_Count":
                    displayName = "Total Work Tasks";
                    blnVisible  = true;
                    blnSortable = true;
                    break;

                case "Open_Items":
                    displayName = "Open Work Tasks";
                    blnVisible  = true;
                    blnSortable = true;
                    break;

                case "Closed_Items":
                    displayName = "Closed Work Tasks";
                    blnVisible  = true;
                    blnSortable = true;
                    break;

                case "DefaultSelection":
                    displayName = "Default Selection";
                    blnVisible  = true;
                    blnSortable = true;
                    break;

                case "SORT_ORDER":
                    displayName = "Sort Order";
                    blnVisible  = true;
                    blnSortable = true;
                    break;

                case "ARCHIVE":
                    displayName = "Archive";
                    blnVisible  = true;
                    blnSortable = true;
                    break;

                    //case "INCLUDEINHOTLIST":
                    //    displayName = "IncludeInHotList";
                    //    blnVisible = true;
                    //    blnSortable = true;
                    //    break;
                }

                columnData.Columns.Add(gridColumn.ColumnName, displayName, blnVisible, blnSortable);
                columnData.Columns.Item(columnData.Columns.Count - 1).CanReorder = blnOrderable;
            }

            //Initialize the columnData
            columnData.Initialize(ref dt, ";", "~", "|");

            //Get sortable columns and default column order
            SortableColumns    = columnData.SortableColumnsToString();
            DefaultColumnOrder = columnData.DefaultColumnOrderToString();
            //Sort and Reorder Columns
            columnData.ReorderDataTable(ref dt, ColumnOrder);
            columnData.SortDataTable(ref dt, SortOrder);
            SelectedColumnOrder = columnData.CurrentColumnOrderToString();
        }
        catch (Exception ex)
        {
            LogUtility.LogException(ex);
        }
    }
    protected void InitializeColumnData(ref DataTable dt)
    {
        try
        {
            string displayName = string.Empty, groupName = string.Empty;
            bool   blnVisible = false, blnSortable = false, blnOrderable = false;

            foreach (DataColumn gridColumn in dt.Columns)
            {
                displayName  = gridColumn.ColumnName;
                blnVisible   = false;
                blnSortable  = false;
                blnOrderable = false;
                groupName    = string.Empty;

                switch (gridColumn.ColumnName)
                {
                case "A":
                    displayName = "";
                    blnVisible  = true;
                    break;

                case "ALLOCATIONID":
                    blnVisible  = false;
                    blnSortable = false;
                    break;

                case "AllocationCategoryID":
                    blnVisible  = false;
                    blnSortable = false;
                    break;

                case "ALLOCATION":
                    displayName = "Allocation";
                    blnVisible  = true;
                    blnSortable = true;
                    break;

                case "DESCRIPTION":
                    displayName = "Description";
                    blnVisible  = true;
                    blnSortable = true;
                    break;

                case "SORT_ORDER":
                    displayName = "Sort Order";
                    blnVisible  = true;
                    blnSortable = true;
                    break;

                case "DefaultSME":
                    displayName = "SME";
                    groupName   = "Default Resources";
                    blnVisible  = true;
                    blnSortable = true;
                    break;

                case "DefaultBusinessResource":
                    displayName = "Business Resource";
                    groupName   = "Default Resources";
                    blnVisible  = true;
                    blnSortable = true;
                    break;

                case "DefaultTechnicalResource":
                    displayName = "Technical Resource";
                    groupName   = "Default Resources";
                    blnVisible  = true;
                    blnSortable = true;
                    break;

                case "DefaultAssignedTo":
                    displayName = "Assigned To";
                    groupName   = "Default Resources";
                    blnVisible  = true;
                    blnSortable = true;
                    break;

                case "ARCHIVE":
                    displayName = "Archive";
                    blnVisible  = true;
                    blnSortable = true;
                    break;

                case "ALLOCATIONGROUPID":
                    blnVisible  = false;
                    blnSortable = false;
                    break;
                }

                columnData.Columns.Add(gridColumn.ColumnName, displayName, blnVisible, blnSortable);
                columnData.Columns.Item(columnData.Columns.Count - 1).CanReorder = blnOrderable;
                columnData.Columns.Item(columnData.Columns.Count - 1).GroupName  = groupName;
            }

            //Initialize the columnData
            columnData.Initialize(ref dt, ";", "~", "|");

            //Get sortable columns and default column order
            SortableColumns    = columnData.SortableColumnsToString();
            DefaultColumnOrder = columnData.DefaultColumnOrderToString();
            //Sort and Reorder Columns
            columnData.ReorderDataTable(ref dt, ColumnOrder);
            columnData.SortDataTable(ref dt, SortOrder);
            SelectedColumnOrder = columnData.CurrentColumnOrderToString();
        }
        catch (Exception ex)
        {
            LogUtility.LogException(ex);
        }
    }
示例#27
0
    protected void InitializeColumnData(ref DataTable dt)
    {
        try
        {
            string displayName = string.Empty, groupName = string.Empty;
            bool   blnVisible = false, blnSortable = false, blnOrderable = false;

            foreach (DataColumn gridColumn in dt.Columns)
            {
                displayName  = gridColumn.ColumnName;
                blnVisible   = false;
                blnSortable  = false;
                blnOrderable = false;
                groupName    = string.Empty;

                switch (gridColumn.ColumnName)
                {
                case "X":
                    displayName = "&nbsp;";
                    blnVisible  = true;
                    break;

                case "WorkType_ORGANIZATIONID":
                    displayName = "WorkType_ORGANIZATIONID";
                    blnVisible  = false;
                    blnSortable = false;
                    break;

                case "WorkTypeID":
                    displayName = "WorkTypeID";
                    blnVisible  = false;
                    blnSortable = false;
                    break;

                case "WorkType":
                    displayName = "Resource Group";
                    blnVisible  = true;
                    blnSortable = true;
                    break;

                case "ORGANIZATIONID":
                    displayName = "ORGANIZATIONID";
                    blnVisible  = false;
                    blnSortable = false;
                    break;

                case "ORGANIZATION":
                    displayName = "Organization";
                    blnVisible  = true;
                    blnSortable = true;
                    break;

                case "SORT_ORDER":
                    displayName = "SORT_ORDER";
                    blnVisible  = false;
                    blnSortable = true;
                    break;

                case "DESCRIPTION":
                    displayName = "Description";
                    blnVisible  = true;
                    break;

                case "ARCHIVE":
                    displayName = "Archive";
                    blnVisible  = true;
                    blnSortable = true;
                    break;
                }

                columnData.Columns.Add(gridColumn.ColumnName, displayName, blnVisible, blnSortable);
                columnData.Columns.Item(columnData.Columns.Count - 1).CanReorder = blnOrderable;
            }

            //Initialize the columnData
            columnData.Initialize(ref dt, ";", "~", "|");

            //Get sortable columns and default column order
            SortableColumns    = columnData.SortableColumnsToString();
            DefaultColumnOrder = columnData.DefaultColumnOrderToString();
            //Sort and Reorder Columns
            columnData.ReorderDataTable(ref dt, ColumnOrder);
            columnData.SortDataTable(ref dt, SortOrder);
            SelectedColumnOrder = columnData.CurrentColumnOrderToString();
        }
        catch (Exception ex)
        {
            LogUtility.LogException(ex);
        }
    }
示例#28
0
    protected void InitializeColumnData(ref DataTable dt)
    {
        try
        {
            string displayName = string.Empty, groupName = string.Empty;
            bool   blnVisible = false, blnSortable = false, blnOrderable = false;

            foreach (DataColumn gridColumn in dt.Columns)
            {
                displayName  = gridColumn.ColumnName;
                blnVisible   = false;
                blnSortable  = false;
                blnOrderable = false;
                groupName    = string.Empty;

                switch (gridColumn.ColumnName)
                {
                case "X":
                    blnVisible = true;
                    break;

                case "ProductVersionID":
                    blnVisible = false;
                    break;

                case "ProductVersion":
                    displayName = "Product Version";
                    blnVisible  = true;
                    blnSortable = true;
                    break;

                case "Description":
                    displayName = "Description";
                    blnVisible  = true;
                    break;

                case "CONTRACTID":
                    blnVisible = false;
                    break;

                case "CONTRACT":
                    displayName = "Contract";
                    blnVisible  = true;
                    blnSortable = true;
                    break;

                case "NarrativeDescription":
                    displayName = "CR Report Narrative";
                    blnVisible  = true;
                    blnSortable = true;
                    break;

                case "WorkloadAllocationType":
                    displayName = "Workload Allocation Type";
                    blnVisible  = true;
                    blnSortable = true;
                    break;

                case "ImageID":
                    displayName = "Image";
                    blnVisible  = true;
                    blnSortable = true;
                    break;

                case "Archive":
                    blnVisible  = true;
                    blnSortable = true;
                    break;

                case "Y":
                    blnVisible = true;
                    break;
                }

                columnData.Columns.Add(gridColumn.ColumnName, displayName, blnVisible, blnSortable);
                columnData.Columns.Item(columnData.Columns.Count - 1).CanReorder = blnOrderable;
            }

            //Initialize the columnData
            columnData.Initialize(ref dt, ";", "~", "|");

            //Get sortable columns and default column order
            SortableColumns    = columnData.SortableColumnsToString();
            DefaultColumnOrder = columnData.DefaultColumnOrderToString();
            //Sort and Reorder Columns
            columnData.ReorderDataTable(ref dt, ColumnOrder);
            columnData.SortDataTable(ref dt, SortOrder);
            SelectedColumnOrder = columnData.CurrentColumnOrderToString();
        }
        catch (Exception ex)
        {
            LogUtility.LogException(ex);
        }
    }
示例#29
0
    public static string LoadEntityFields(string entityType)
    {
        DataTable            dtNew = new DataTable();
        DataColumnCollection DCC;
        Dictionary <string, GridColsColumn> _gridColumns = new Dictionary <string, GridColsColumn>();
        GridCols  _columnData = new GridCols();
        DataTable dt = new DataTable();
        int       AOR_ID = 0;
        bool      isVisible = false;
        string    dbName = string.Empty, displayName = string.Empty, idField = string.Empty;
        var       ordered = _gridColumns.Keys.OrderBy(k => _gridColumns[k].DisplayName).ToList();

        try
        {
            switch (entityType.ToUpper())
            {
            case "AOR":
                dt = AOR.AORList_Get(AORID: AOR_ID);

                _gridColumns = new Dictionary <string, GridColsColumn>();

                GridColsColumn column = new GridColsColumn();
                dbName      = string.Empty;
                displayName = string.Empty;
                idField     = string.Empty;
                isVisible   = false;

                foreach (DataColumn gridColumn in dt.Columns)
                {
                    column      = new GridColsColumn();
                    displayName = gridColumn.ColumnName;
                    idField     = gridColumn.ColumnName;
                    isVisible   = false;

                    switch (gridColumn.ColumnName)
                    {
                    //case "Current Release":
                    //    displayName = "Current Release";
                    //    idField = "ProductVersion_ID";
                    //    isVisible = true;
                    //    break;
                    case "Workload Allocation":
                        displayName = "Workload Allocation";
                        idField     = "WorkloadAllocation_ID";
                        isVisible   = true;
                        break;
                    }

                    if (isVisible)
                    {
                        column.ColumnName  = gridColumn.ColumnName;
                        column.DisplayName = displayName;
                        column.Visible     = isVisible;
                        column.SortName    = idField;

                        _gridColumns.Add(column.DisplayName, column);
                    }
                }

                //Initialize the columnData
                _columnData.Initialize(ref dt, ";", "~", "|");

                dtNew.Columns.Add("valueField");
                dtNew.Columns.Add("textField");
                dtNew.Columns.Add("id_field");

                ordered = _gridColumns.Keys.OrderBy(k => _gridColumns[k].DisplayName).ToList();

                foreach (string key in ordered)
                {
                    GridColsColumn col = _gridColumns[key];
                    if (col.Visible)
                    {
                        DataRow dr = dtNew.NewRow();

                        dr[0] = col.ColumnName;
                        dr[1] = col.DisplayName;
                        dr[2] = col.SortName;

                        dtNew.Rows.Add(dr);
                    }
                }
                break;

            case "CR":
                dt = AOR.AORCRList_Get(AORID: AOR_ID, AORReleaseID: 0, CRID: 0);

                _gridColumns = new Dictionary <string, GridColsColumn>();

                column      = new GridColsColumn();
                dbName      = string.Empty;
                displayName = string.Empty;
                idField     = string.Empty;
                isVisible   = false;

                foreach (DataColumn gridColumn in dt.Columns)
                {
                    column      = new GridColsColumn();
                    displayName = gridColumn.ColumnName;
                    idField     = gridColumn.ColumnName;
                    isVisible   = false;

                    switch (gridColumn.ColumnName)
                    {
                    case "Contract":
                        displayName = "Contract";
                        idField     = "Contract_ID";
                        isVisible   = true;
                        break;

                    case "Websystem":
                        displayName = "Websystem";
                        idField     = "Websystem_ID";
                        isVisible   = false;
                        break;

                    case "Related Release":
                        displayName = "Related Release";
                        idField     = "RelatedRelease_ID";
                        isVisible   = false;
                        break;

                    case "Status":
                        displayName = "CR Coordination";
                        idField     = "Status_ID";
                        isVisible   = true;
                        break;

                    case "CyberISMT":
                        displayName = "Cyber/ISMT";
                        idField     = "CyberISMT_ID";
                        isVisible   = false;
                        break;
                    }

                    if (isVisible)
                    {
                        column.ColumnName  = gridColumn.ColumnName;
                        column.DisplayName = displayName;
                        column.Visible     = isVisible;
                        column.SortName    = idField;

                        _gridColumns.Add(column.DisplayName, column);
                    }
                }

                //Initialize the columnData
                _columnData.Initialize(ref dt, ";", "~", "|");

                dtNew.Columns.Add("valueField");
                dtNew.Columns.Add("textField");
                dtNew.Columns.Add("id_field");

                ordered = _gridColumns.Keys.OrderBy(k => _gridColumns[k].DisplayName).ToList();

                foreach (string key in ordered)
                {
                    GridColsColumn col = _gridColumns[key];
                    if (col.Visible)
                    {
                        DataRow dr = dtNew.NewRow();

                        dr[0] = col.ColumnName;
                        dr[1] = col.DisplayName;
                        dr[2] = col.SortName;

                        dtNew.Rows.Add(dr);
                    }
                }
                break;

            case "PRIMARYTASK":
                dt = AOR.AORTaskList_Get(AORID: AOR_ID, AORReleaseID: 0);
                //        dt = WorkloadItem.WorkItemList_Get(workRequestID: 0
                //, showArchived: 0
                //, columnListOnly: 0
                //, myData: false);
                _gridColumns = new Dictionary <string, GridColsColumn>();

                column      = new GridColsColumn();
                dbName      = string.Empty;
                displayName = string.Empty;
                idField     = string.Empty;
                isVisible   = false;

                foreach (DataColumn gridColumn in dt.Columns)
                {
                    column      = new GridColsColumn();
                    displayName = gridColumn.ColumnName;
                    idField     = gridColumn.ColumnName;
                    isVisible   = false;

                    switch (gridColumn.ColumnName)
                    {
                    case "System(Task)":
                        displayName = "System(Task)";
                        idField     = "WTS_SYSTEM_ID";
                        isVisible   = true;
                        break;

                    case "Production Status":
                        displayName = "Production Status";
                        idField     = "ProductionStatus_ID";
                        isVisible   = true;
                        break;

                    //case "Product Version":
                    //    displayName = "Product Version";
                    //    idField = "ProductVersion_ID";
                    //    isVisible = true;
                    //    break;
                    case "Priority":
                        displayName = "Priority";
                        idField     = "PRIORITY_ID";
                        isVisible   = true;
                        break;

                    case "Primary Resource":
                        displayName = "Primary Resource";
                        idField     = "PrimaryTechResource_ID";
                        isVisible   = true;
                        break;

                    case "Assigned To":
                        displayName = "Assigned To";
                        idField     = "AssignedTo_ID";
                        isVisible   = true;
                        break;

                    case "Status":
                        displayName = "Status";
                        idField     = "STATUS_ID";
                        isVisible   = true;
                        break;

                    case "Percent Complete":
                        displayName = "Percent Complete";
                        idField     = "PercentComplete_ID";
                        isVisible   = false;
                        break;
                    }

                    if (isVisible)
                    {
                        column.ColumnName  = gridColumn.ColumnName;
                        column.DisplayName = displayName;
                        column.Visible     = isVisible;
                        column.SortName    = idField;

                        _gridColumns.Add(column.DisplayName, column);
                    }
                }

                //Initialize the columnData
                _columnData.Initialize(ref dt, ";", "~", "|");

                dtNew.Columns.Add("valueField");
                dtNew.Columns.Add("textField");
                dtNew.Columns.Add("id_field");

                ordered = _gridColumns.Keys.OrderBy(k => _gridColumns[k].DisplayName).ToList();

                foreach (string key in ordered)
                {
                    GridColsColumn col = _gridColumns[key];
                    if (col.Visible)
                    {
                        DataRow dr = dtNew.NewRow();

                        dr[0] = col.DisplayName;
                        dr[1] = col.ColumnName;
                        dr[2] = col.SortName;

                        dtNew.Rows.Add(dr);
                    }
                }
                break;

            case "SUBTASK":
                //dt = AOR.AORTaskList_Get(AORID: AOR_ID, AORReleaseID: 0);
                dt = WorkloadItem.WorkItem_GetTaskList(workItemID: 0, showArchived: 0, showBacklog: false);

                _gridColumns = new Dictionary <string, GridColsColumn>();

                column      = new GridColsColumn();
                dbName      = string.Empty;
                displayName = string.Empty;
                idField     = string.Empty;
                isVisible   = false;

                foreach (DataColumn gridColumn in dt.Columns)
                {
                    column      = new GridColsColumn();
                    displayName = gridColumn.ColumnName;
                    idField     = gridColumn.ColumnName;
                    isVisible   = false;

                    switch (gridColumn.ColumnName)
                    {
                    case "AssignedResource":
                        displayName = "Assigned To";
                        idField     = "ASSIGNEDRESOURCEID";
                        isVisible   = true;
                        break;

                    case "Production Status":
                        displayName = "Production Status";
                        idField     = "ProductionStatus_ID";
                        isVisible   = true;
                        break;

                    //case "Product Version":
                    //    displayName = "Product Version";
                    //    idField = "ProductVersion_ID";
                    //    isVisible = true;
                    //    break;
                    case "Priority":
                        displayName = "Priority";
                        idField     = "PRIORITY_ID";
                        isVisible   = true;
                        break;

                    case "Primary Resource":
                        displayName = "Primary Resource";
                        idField     = "PrimaryTechResource_ID";
                        isVisible   = true;
                        break;

                    case "Assigned To":
                        displayName = "Assigned To";
                        idField     = "AssignedTo_ID";
                        isVisible   = true;
                        break;

                    case "Status":
                        displayName = "Status";
                        idField     = "STATUS_ID";
                        isVisible   = true;
                        break;

                    case "Percent Complete":
                        displayName = "Percent Complete";
                        idField     = "PercentComplete_ID";
                        isVisible   = false;
                        break;
                    }

                    if (isVisible)
                    {
                        column.ColumnName  = gridColumn.ColumnName;
                        column.DisplayName = displayName;
                        column.Visible     = isVisible;
                        column.SortName    = idField;

                        _gridColumns.Add(column.DisplayName, column);
                    }
                }

                //Initialize the columnData
                _columnData.Initialize(ref dt, ";", "~", "|");

                dtNew.Columns.Add("valueField");
                dtNew.Columns.Add("textField");
                dtNew.Columns.Add("id_field");

                ordered = _gridColumns.Keys.OrderBy(k => _gridColumns[k].DisplayName).ToList();

                foreach (string key in ordered)
                {
                    GridColsColumn col = _gridColumns[key];
                    if (col.Visible)
                    {
                        DataRow dr = dtNew.NewRow();

                        dr[0] = col.ColumnName;
                        dr[1] = col.DisplayName;
                        dr[2] = col.SortName;

                        dtNew.Rows.Add(dr);
                    }
                }
                break;
            }
        }
        catch (Exception ex)
        {
            LogUtility.LogException(ex);
        }

        return(JsonConvert.SerializeObject(dtNew, Newtonsoft.Json.Formatting.None));
    }
示例#30
0
    protected void InitializeColumnData(ref DataTable dt)
    {
        try
        {
            string displayName = string.Empty, groupName = string.Empty;
            bool   blnVisible = false, blnSortable = false, blnOrderable = false;

            foreach (DataColumn gridColumn in dt.Columns)
            {
                displayName  = gridColumn.ColumnName;
                blnVisible   = false;
                blnSortable  = false;
                blnOrderable = false;
                groupName    = string.Empty;

                switch (gridColumn.ColumnName)
                {
                case "A":
                    displayName = "&nbsp;";
                    blnVisible  = true;
                    break;

                case "X":
                    displayName = "&nbsp";
                    blnVisible  = true;
                    break;

                case "WORKITEMTYPEID":
                    displayName = "&nbsp;";
                    blnVisible  = false;
                    break;

                case "Item Type":
                    displayName = "Work Activity";
                    blnVisible  = true;
                    blnSortable = true;
                    break;

                case "Description":
                    displayName = "Description";
                    blnVisible  = true;
                    break;

                case "PDDTDR_PHASEID":
                    displayName = "Work Phase";
                    blnVisible  = true;
                    blnSortable = true;
                    break;

                case "WorkloadAllocationID":
                    displayName = "Workload Allocation";
                    blnVisible  = true;
                    blnSortable = true;
                    break;

                case "WorkActivityGroupID":
                    displayName = "Work Activity Group";
                    blnVisible  = true;
                    blnSortable = true;
                    break;

                case "Sort Order":
                    displayName = "Sort Order";
                    blnVisible  = true;
                    blnSortable = true;
                    break;

                case "Archive":
                    displayName = "Archive";
                    blnVisible  = true;
                    blnSortable = true;
                    break;

                case "Work Items":
                    displayName = "Work Tasks";
                    blnVisible  = true;
                    blnSortable = true;
                    break;

                case "Open Items":
                    displayName = "Open Work Tasks";
                    blnVisible  = true;
                    blnSortable = true;
                    break;

                case "Closed Items":
                    displayName = "Closed Work Tasks";
                    blnVisible  = true;
                    blnSortable = true;
                    break;
                }

                columnData.Columns.Add(gridColumn.ColumnName, displayName, blnVisible, blnSortable);
                columnData.Columns.Item(columnData.Columns.Count - 1).CanReorder = blnOrderable;
            }

            //Initialize the columnData
            columnData.Initialize(ref dt, ";", "~", "|");

            //Get sortable columns and default column order
            SortableColumns    = columnData.SortableColumnsToString();
            DefaultColumnOrder = columnData.DefaultColumnOrderToString();
            //Sort and Reorder Columns
            columnData.ReorderDataTable(ref dt, ColumnOrder);
            columnData.SortDataTable(ref dt, SortOrder);
            SelectedColumnOrder = columnData.CurrentColumnOrderToString();
        }
        catch (Exception ex)
        {
            LogUtility.LogException(ex);
        }
    }