プロジェクト

全般

プロフィール

リビジョン 473

堀内約5年前に追加

コミットし忘れを追加

差分を表示:

trunk/src/ProcessManagement/ProcessManagement/Common/ProductDefine.cs
23 23
    /// </summary>
24 24
    public static class ProductDefine
25 25
    {
26
        #region 使用定義
27
        //log4netログを使用する
28
        private static readonly log4net.ILog logger = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
29
        #endregion
30

  
26 31
        #region 定数
32

  
27 33
        #region 製品種別定義
28 34
        /// <summary>
29 35
        /// 製品種別定義
......
60 66
            ProductsModelType6,
61 67
        }
62 68
        #endregion
69

  
70
        #region 製品種別定義(サブ)
71
        /// <summary>
72
        /// 製品種別定義(サブ)
73
        /// </summary>
74
        public enum SubProductTypeDef
75
        {
76
            /// <summary>
77
            ///  0:サブ種別無し
78
            /// </summary>
79
            None = 0,
80
            /// <summary>
81
            ///  1:白虎
82
            /// </summary>
83
            Type1,
84
            /// <summary>
85
            ///  2:朱雀
86
            /// </summary>
87
            Type2,
88
        }
63 89
        #endregion
64 90

  
91
        #region システム構成名称
92
        /// <summary>
93
        /// システム構成名称
94
        /// </summary>
95
        public static Dictionary<int, string> ProductName = new Dictionary<int, string>() {
96
                                                                                { (int)ProductTypeDef.Originals,            "オリジナル"},
97
                                                                                { (int)ProductTypeDef.ProductsModelType1,   "青龍"},
98
                                                                                { (int)ProductTypeDef.ProductsModelType2,   "白虎朱雀"},
99
                                                                                { (int)ProductTypeDef.ProductsModelType3,   "玄武"},
100
                                                                                { (int)ProductTypeDef.ProductsModelType4,   "九尾狐"},
101
                                                                                { (int)ProductTypeDef.ProductsModelType5,   "麒麟"},
102
                                                                                { (int)ProductTypeDef.ProductsModelType6,   "鳳凰"},
103
                                                                                };
104

  
105
        #region 構成説明
106
        /// <summary>
107
        /// 構成説明
108
        /// </summary>
109
        public static Dictionary<int, string> ConfigurationExplanation= new Dictionary<int, string>() {
110
                                                                                { (int)ProductTypeDef.Originals,            "オリジナル"},
111
                                                                                { (int)ProductTypeDef.ProductsModelType1,   "一人親方版"},
112
                                                                                { (int)ProductTypeDef.ProductsModelType2,   "承認機能版"},
113
                                                                                { (int)ProductTypeDef.ProductsModelType3,   "承認機能\r\n工事管理機能版"},
114
                                                                                { (int)ProductTypeDef.ProductsModelType4,   "承認機能\r\n工事管理機能・人員管理機能版"},
115
                                                                                { (int)ProductTypeDef.ProductsModelType5,   "フル機能版"},
116
                                                                                { (int)ProductTypeDef.ProductsModelType6,   "フル機能版\r\nカスタマイズ"},
117
                                                                                };
118
        #endregion
119

  
120
        #endregion
121

  
122
        #endregion
123

  
65 124
        #region メンバ変数
125

  
126
        #region 製品種別
66 127
        /// <summary>
67 128
        /// 製品種別
68 129
        /// </summary>
69
        private static int      m_ProductType = (int)ProductTypeDef.ProductsModelType1;
130
        private static int m_ProductType = (int)ProductTypeDef.Originals;
70 131
        #endregion
71 132

  
133
        #region 製品種別(サブ)
134
        /// <summary>
135
        /// 製品種別(サブ)
136
        /// </summary>
137
        private static int m_SubProductType = (int)SubProductTypeDef.None;
138
        #endregion
139

  
140
        #endregion
141

  
72 142
        #region コンストラクタ
73 143
        #endregion
74 144

  
75 145
        #region プロパティ
146

  
147
        #region 製品種別
76 148
        /// <summary>
77 149
        /// 製品種別
78 150
        /// </summary>
......
81 153
            get { return m_ProductType; }
82 154
        }
83 155
        #endregion
156

  
157
        #region 製品種別(サブ)
158
        /// <summary>
159
        /// 製品種別(サブ)
160
        /// </summary>
161
        public static int SubProductType
162
        {
163
            get { return m_SubProductType; }
164
        }
165
        #endregion
166

  
167
        #endregion
168

  
169
        #region メソッド
170

  
171
        #region システム構成名称取得
172
        /// <summary>
173
        /// システム構成名称取得
174
        /// </summary>
175
        public static string GetProductName()
176
        {
177
            string strName = string.Empty;
178
            try
179
            {
180
                switch (m_ProductType)
181
                {
182
                    case (int)ProductTypeDef.Originals:
183
                    case (int)ProductTypeDef.ProductsModelType1:
184
                    case (int)ProductTypeDef.ProductsModelType3:
185
                    case (int)ProductTypeDef.ProductsModelType4:
186
                    case (int)ProductTypeDef.ProductsModelType5:
187
                    case (int)ProductTypeDef.ProductsModelType6:
188
                        strName = ProductName[m_ProductType];
189
                        break;
190
                    case (int)ProductTypeDef.ProductsModelType2:
191
                        if (m_SubProductType == (int)SubProductTypeDef.Type1)
192
                            strName = ProductName[m_ProductType].Replace("朱雀", "");
193
                        else
194
                            strName = ProductName[m_ProductType].Replace("白虎", "");
195
                        break;
196
                    default:
197
                        break;
198
                }
199
            }
200
            catch (Exception ex)
201
            {
202
                logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message);
203
                strName = string.Empty;
204
            }
205

  
206
            return strName;
207
        }
208
        #endregion
209

  
210
        #endregion
84 211
    }
85 212
}

他の形式にエクスポート: Unified diff