예제 #1
0
    private void init()
    {
        _dsOptions = WorkloadItem.GetAvailableOptions();

        grdWorkItem.GridHeaderRowDataBound += grdWorkItem_GridHeaderRowDataBound;
        grdWorkItem.GridRowDataBound       += grdWorkItem_GridRowDataBound;
        grdWorkItem.GridPageIndexChanging  += grdWorkItem_GridPageIndexChanging;
    }
예제 #2
0
    private void initAttributeOptions()
    {
        try
        {
            DataSet dsOptions = WorkloadItem.GetAvailableOptions();

            if (dsOptions != null && dsOptions.Tables.Count > 0)
            {
                if (dsOptions.Tables.Contains("WorkRequest"))
                {
                    Page.ClientScript.RegisterArrayDeclaration("_WorkRequestList", JsonConvert.SerializeObject(dsOptions.Tables["WorkRequest"], Newtonsoft.Json.Formatting.None));
                }
                if (dsOptions.Tables.Contains("System"))
                {
                    Page.ClientScript.RegisterArrayDeclaration("_SystemList", JsonConvert.SerializeObject(dsOptions.Tables["System"], Newtonsoft.Json.Formatting.None));
                }
                if (dsOptions.Tables.Contains("Allocation"))
                {
                    Page.ClientScript.RegisterArrayDeclaration("_AllocationList", JsonConvert.SerializeObject(dsOptions.Tables["Allocation"], Newtonsoft.Json.Formatting.None));
                }
                if (dsOptions.Tables.Contains("ProductVersion"))
                {
                    Page.ClientScript.RegisterArrayDeclaration("_ProductVersionList", JsonConvert.SerializeObject(dsOptions.Tables["ProductVersion"], Newtonsoft.Json.Formatting.None));
                }
                if (dsOptions.Tables.Contains("Priority"))
                {
                    Page.ClientScript.RegisterArrayDeclaration("_PriorityList", JsonConvert.SerializeObject(dsOptions.Tables["Priority"], Newtonsoft.Json.Formatting.None));
                }
                if (dsOptions.Tables.Contains("WorkItemType"))
                {
                    Page.ClientScript.RegisterArrayDeclaration("_WorkItemTypeList", JsonConvert.SerializeObject(dsOptions.Tables["WorkItemType"], Newtonsoft.Json.Formatting.None));
                }
                if (dsOptions.Tables.Contains("User"))
                {
                    Page.ClientScript.RegisterArrayDeclaration("_UserList", JsonConvert.SerializeObject(dsOptions.Tables["User"], Newtonsoft.Json.Formatting.None));
                }
                if (dsOptions.Tables.Contains("WorkType"))
                {
                    Page.ClientScript.RegisterArrayDeclaration("_WorkTypeList", JsonConvert.SerializeObject(dsOptions.Tables["WorkType"], Newtonsoft.Json.Formatting.None));
                }
                if (dsOptions.Tables.Contains("Status"))
                {
                    Page.ClientScript.RegisterArrayDeclaration("_StatusList", JsonConvert.SerializeObject(dsOptions.Tables["Status"], Newtonsoft.Json.Formatting.None));
                }
                if (dsOptions.Tables.Contains("PercentComplete"))
                {
                    Page.ClientScript.RegisterArrayDeclaration("_PercentList", JsonConvert.SerializeObject(dsOptions.Tables["PercentComplete"], Newtonsoft.Json.Formatting.None));
                }
                if (dsOptions.Tables.Contains("PriorityRank"))
                {
                    Page.ClientScript.RegisterArrayDeclaration("_PriorityRankList", JsonConvert.SerializeObject(dsOptions.Tables["PriorityRank"], Newtonsoft.Json.Formatting.None));
                }

                if (dsOptions.Tables.Contains("MenuType"))
                {
                    Page.ClientScript.RegisterArrayDeclaration("_MenuTypeList", JsonConvert.SerializeObject(dsOptions.Tables["MenuType"], Newtonsoft.Json.Formatting.None));
                }
                if (dsOptions.Tables.Contains("Menu"))
                {
                    Page.ClientScript.RegisterArrayDeclaration("_MenuList", JsonConvert.SerializeObject(dsOptions.Tables["Menu"], Newtonsoft.Json.Formatting.None));
                }
                if (dsOptions.Tables.Contains("ProductionStatus"))
                {
                    Page.ClientScript.RegisterArrayDeclaration("_ProductionStatusList", JsonConvert.SerializeObject(dsOptions.Tables["ProductionStatus"], Newtonsoft.Json.Formatting.None));
                }
            }
        }
        catch (Exception ex)
        {
            LogUtility.LogException(ex);
        }
    }