リビジョン 352
ComponentToTypeMaster関連削除
ClsCommonCosts改修
積算書予算書集計コードマスタ追加
工事台帳:一般管理費・現場管理費表示追加
工事種別:公共工事に新築・改修区分追加
掲示板:アクセス権バグ修正
メニュー:一覧タブ選択時の初期選択を外す
| branches/src/ProcessManagement/ProcessManagement/Common/CommonDefine.cs | ||
|---|---|---|
| 652 | 652 |
/// </summary> |
| 653 | 653 |
public enum TabCotegory |
| 654 | 654 |
{
|
| 655 |
/// <summary> |
|
| 656 |
/// タブ区分: 0:合計 |
|
| 657 |
/// </summary> |
|
| 655 | 658 |
Total = 0, |
| 659 |
/// <summary> |
|
| 660 |
/// タブ区分: 1:大項目 |
|
| 661 |
/// </summary> |
|
| 656 | 662 |
Component, |
| 663 |
/// <summary> |
|
| 664 |
/// タブ区分: 2:中項目 |
|
| 665 |
/// </summary> |
|
| 657 | 666 |
Item, |
| 667 |
/// <summary> |
|
| 668 |
/// タブ区分: 3:小項目 |
|
| 669 |
/// </summary> |
|
| 658 | 670 |
Spec, |
| 659 | 671 |
} |
| 660 | 672 |
#endregion |
| branches/src/ProcessManagement/ProcessManagement/Common/CommonVersion.cs | ||
|---|---|---|
| 14 | 14 |
/// <summary> |
| 15 | 15 |
/// 本体バージョン |
| 16 | 16 |
/// </summary> |
| 17 |
public static int s_SystemVersion = 204;
|
|
| 17 |
public static int s_SystemVersion = 205;
|
|
| 18 | 18 |
|
| 19 | 19 |
/// <summary> |
| 20 | 20 |
/// コピー・環境バージョン |
| branches/src/ProcessManagement/ProcessManagement/Common/Process/ClsCommonCosts.cs | ||
|---|---|---|
| 4 | 4 |
using System.Text; |
| 5 | 5 |
using System.Threading.Tasks; |
| 6 | 6 |
|
| 7 |
using ProcessManagement.Common; |
|
| 8 |
using ProcessManagement.DB.IOAccess; |
|
| 9 |
using ProcessManagement.DataModel; |
|
| 10 |
using ProcessManagement.DB.Core; |
|
| 11 |
using ProcessManagement.Forms; |
|
| 12 |
using ProcessManagement.Forms.SubForms; |
|
| 13 |
using ProcessManagement.Forms.CustomControls; |
|
| 14 |
using ProcessManagement.Forms.ControlsAction; |
|
| 15 |
using ProcessManagement.Forms.Master; |
|
| 16 |
|
|
| 7 | 17 |
namespace ProcessManagement.Common |
| 8 | 18 |
{
|
| 9 | 19 |
/// <summary> |
| 10 |
/// 工事共通費定義クラス
|
|
| 20 |
/// 工事費用定義クラス
|
|
| 11 | 21 |
/// </summary> |
| 12 |
public static class ClsCommonCosts
|
|
| 22 |
public class ClsCommonCosts |
|
| 13 | 23 |
{
|
| 14 |
/// <summary> |
|
| 15 |
/// 積算予算マスタ使用キー定義 |
|
| 16 |
/// </summary> |
|
| 17 |
|
|
| 18 |
#region 共通仮設費 |
|
| 19 |
/// <summary> |
|
| 20 |
/// 共通仮設費[構成キー] |
|
| 21 |
/// 1 共通仮設工事費(積み上げ費含む)※公共入札工事用 |
|
| 22 |
/// </summary> |
|
| 23 |
public static int s_CommunityCompCode = 1; |
|
| 24 |
#region 使用定義 |
|
| 25 |
//log4netログを使用する |
|
| 26 |
private static readonly log4net.ILog logger = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); |
|
| 24 | 27 |
#endregion |
| 25 | 28 |
|
| 26 |
#region 発生剤処分費
|
|
| 29 |
#region メンバ変数
|
|
| 27 | 30 |
/// <summary> |
| 28 |
/// 発生剤処分費[構成キー] |
|
| 29 |
/// 18 発生材処分費 ※公共入札工事用 |
|
| 31 |
/// 積算予算マスタ使用キー定義 |
|
| 30 | 32 |
/// </summary> |
| 31 |
public static int s_MaterialDisposal = 18; |
|
| 32 |
#endregion |
|
| 33 | 33 |
|
| 34 | 34 |
#region 入札物件構成キー群 |
| 35 | 35 |
/// <summary> |
| ... | ... | |
| 43 | 43 |
/// 7 一般管理費 ※公共入札工事用 |
| 44 | 44 |
/// 18 発生材処分費 ※公共入札工事用 |
| 45 | 45 |
/// </summary> |
| 46 |
public static int[] s_BiddingCode = new int[] { 1, 2, 3, 4, 5, 6, 7, 18 };
|
|
| 46 |
//public static int[] s_BiddingCode = new int[] { 1, 2, 3, 4, 5, 6, 7, 18 };
|
|
| 47 |
private List<int> m_BiddingCode = new List<int>(); |
|
| 47 | 48 |
#endregion |
| 48 | 49 |
|
| 50 |
#region 工事種別(対象となる公共工事の工事種別) |
|
| 51 |
/// <summary> |
|
| 52 |
/// 対象工事タイプ |
|
| 53 |
/// 9 公共工事 新築(元請) |
|
| 54 |
/// 10 公共工事 新築(下請) |
|
| 55 |
/// 4 公共工事 改修(元請) |
|
| 56 |
/// 5 公共工事 改修(下請) |
|
| 57 |
/// </summary> |
|
| 58 |
//private static int[,] s_ConstructionType = new int[,] { { 9, 10 }, { 4, 5 } };
|
|
| 59 |
private List<int> m_RepairConstrType = new List<int>(); |
|
| 60 |
private List<int> m_CreateConstrType = new List<int>(); |
|
| 61 |
#endregion |
|
| 62 |
|
|
| 63 |
#region 共通仮設費 |
|
| 64 |
/// <summary> |
|
| 65 |
/// 共通仮設費[構成キー] |
|
| 66 |
/// 1 共通仮設工事費(積み上げ費含む)※公共入札工事用 |
|
| 67 |
/// </summary> |
|
| 68 |
private List<int> m_Community = new List<int>(); |
|
| 69 |
#endregion |
|
| 70 |
|
|
| 71 |
#region 発生剤処分費 |
|
| 72 |
/// <summary> |
|
| 73 |
/// 発生剤処分費[構成キー] |
|
| 74 |
/// 18 発生材処分費 ※公共入札工事用 |
|
| 75 |
/// </summary> |
|
| 76 |
private List<int> m_MaterialDisposal = new List<int>(); |
|
| 77 |
#endregion |
|
| 78 |
|
|
| 49 | 79 |
#region 積み上げ共通仮設費 |
| 50 | 80 |
/// <summary> |
| 51 | 81 |
/// 積み上げ共通仮設費[工種キー] |
| 52 | 82 |
/// 10 積み上げ共通仮設費 ※公共工事 |
| 53 | 83 |
/// </summary> |
| 54 |
public static int s_PileUpCommonTempory = 10;
|
|
| 84 |
private List<KeyValuePair<int, int>> m_PileUpComTempo = new List<KeyValuePair<int, int>>();
|
|
| 55 | 85 |
#endregion |
| 56 | 86 |
|
| 57 | 87 |
#region 共通仮設算定率 |
| ... | ... | |
| 59 | 89 |
/// 共通仮設算定率[工種キー] |
| 60 | 90 |
/// 11 共通仮設算定率 ※公共工事 |
| 61 | 91 |
/// </summary> |
| 62 |
public static int s_ComputationCommonTempory = 11;
|
|
| 92 |
private List<int> m_ComputationComTempo = new List<int>();
|
|
| 63 | 93 |
#endregion |
| 64 | 94 |
|
| 65 | 95 |
#region 現場管理費 |
| ... | ... | |
| 67 | 97 |
/// 現場管理費[構成キー] |
| 68 | 98 |
/// 6 現場管理費 ※公共入札工事用 |
| 69 | 99 |
/// </summary> |
| 70 |
public static int s_FieldManagementCompCode = 6;
|
|
| 100 |
private List<int> m_FieldManagement = new List<int>();
|
|
| 71 | 101 |
#endregion |
| 72 | 102 |
|
| 73 | 103 |
#region 一般管理費 |
| ... | ... | |
| 75 | 105 |
/// 一般管理費[構成キー] |
| 76 | 106 |
/// 7 一般管理費 ※公共入札工事用 |
| 77 | 107 |
/// </summary> |
| 78 |
public static int s_NormalManagementCompCode = 7;
|
|
| 108 |
private List<int> m_NormalManagement = new List<int>();
|
|
| 79 | 109 |
#endregion |
| 80 | 110 |
|
| 81 |
#region 工事種別(対象となる公共工事の工事種別) |
|
| 111 |
#endregion |
|
| 112 |
|
|
| 113 |
#region プロパティ |
|
| 114 |
#region 共通仮設費[構成キー] |
|
| 82 | 115 |
/// <summary> |
| 83 |
/// 対象工事タイプ |
|
| 84 |
/// 9 公共工事 新築(元請) |
|
| 85 |
/// 10 公共工事 新築(下請) |
|
| 86 |
/// 4 公共工事 改修(元請) |
|
| 87 |
/// 5 公共工事 改修(下請) |
|
| 116 |
/// 共通仮設費[構成キー] |
|
| 88 | 117 |
/// </summary> |
| 89 |
public static int[,] s_ConstructionType = new int[,] { { 9, 10 }, { 4, 5 } };
|
|
| 118 |
public int CommonTemporyPublic |
|
| 119 |
{
|
|
| 120 |
get { return GetCommunityCompCode(true); }
|
|
| 121 |
} |
|
| 90 | 122 |
#endregion |
| 123 |
|
|
| 124 |
#region 発生剤処分費 |
|
| 125 |
/// <summary> |
|
| 126 |
/// 発生剤処分費[構成キー] |
|
| 127 |
/// </summary> |
|
| 128 |
public int MaterialDisposalPublic |
|
| 129 |
{
|
|
| 130 |
get { return GetMaterialDisposal(true); }
|
|
| 131 |
} |
|
| 132 |
#endregion |
|
| 133 |
|
|
| 134 |
#region 積み上げ共通仮設費 |
|
| 135 |
/// <summary> |
|
| 136 |
/// 積み上げ共通仮設費[工種キー] |
|
| 137 |
/// </summary> |
|
| 138 |
public int PileUpComTempoPublic |
|
| 139 |
{
|
|
| 140 |
get { return GetPileUpCommonTempory(true); }
|
|
| 141 |
} |
|
| 142 |
#endregion |
|
| 143 |
|
|
| 144 |
#region 共通仮設算定率 |
|
| 145 |
/// <summary> |
|
| 146 |
/// 共通仮設算定率[工種キー] |
|
| 147 |
/// </summary> |
|
| 148 |
public int ComputationComTempoPublic |
|
| 149 |
{
|
|
| 150 |
get { return GetComputationCommonTempory(true); }
|
|
| 151 |
} |
|
| 152 |
#endregion |
|
| 153 |
|
|
| 154 |
#region 現場管理費(公共) |
|
| 155 |
/// <summary> |
|
| 156 |
/// 現場管理費[構成キー](公共) |
|
| 157 |
/// </summary> |
|
| 158 |
public int FieldManagementPublic |
|
| 159 |
{
|
|
| 160 |
get { return GetFieldManagementCompCode(true); }
|
|
| 161 |
} |
|
| 162 |
#endregion |
|
| 163 |
|
|
| 164 |
#region 現場管理費(民間) |
|
| 165 |
/// <summary> |
|
| 166 |
/// 現場管理費[構成キー](民間) |
|
| 167 |
/// </summary> |
|
| 168 |
public int FieldManagementPrivate |
|
| 169 |
{
|
|
| 170 |
get { return GetFieldManagementCompCode(false); }
|
|
| 171 |
} |
|
| 172 |
#endregion |
|
| 173 |
|
|
| 174 |
#region 一般管理費(公共) |
|
| 175 |
/// <summary> |
|
| 176 |
/// 一般管理費[構成キー](公共) |
|
| 177 |
/// </summary> |
|
| 178 |
public int NormalManagementPublic |
|
| 179 |
{
|
|
| 180 |
get { return GetNormalManagementCompCode(true); }
|
|
| 181 |
} |
|
| 182 |
#endregion |
|
| 183 |
|
|
| 184 |
#region 一般管理費(民間) |
|
| 185 |
/// <summary> |
|
| 186 |
/// 一般管理費[構成キー](民間) |
|
| 187 |
/// </summary> |
|
| 188 |
public int NormalManagementPrivate |
|
| 189 |
{
|
|
| 190 |
get { return GetNormalManagementCompCode(false); }
|
|
| 191 |
} |
|
| 192 |
#endregion |
|
| 193 |
|
|
| 194 |
#region 公共工事コード(改修) |
|
| 195 |
/// <summary> |
|
| 196 |
/// 公共工事コード(改修) |
|
| 197 |
/// </summary> |
|
| 198 |
public List<int> RepairConstrType |
|
| 199 |
{
|
|
| 200 |
get { return m_RepairConstrType; }
|
|
| 201 |
} |
|
| 202 |
#endregion |
|
| 203 |
|
|
| 204 |
#region 公共工事コード(新築) |
|
| 205 |
/// <summary> |
|
| 206 |
/// 公共工事コード(新築) |
|
| 207 |
/// </summary> |
|
| 208 |
public List<int> CreateConstrType |
|
| 209 |
{
|
|
| 210 |
get { return m_CreateConstrType; }
|
|
| 211 |
} |
|
| 212 |
#endregion |
|
| 213 |
|
|
| 214 |
#region 入札物件構成キー群 |
|
| 215 |
/// <summary> |
|
| 216 |
/// 入札物件構成キー群 |
|
| 217 |
/// </summary> |
|
| 218 |
public List<int> BiddingCode |
|
| 219 |
{
|
|
| 220 |
get { return m_BiddingCode; }
|
|
| 221 |
} |
|
| 222 |
#endregion |
|
| 223 |
|
|
| 224 |
#endregion |
|
| 225 |
|
|
| 226 |
#region コンストラクタ |
|
| 227 |
public ClsCommonCosts() |
|
| 228 |
{
|
|
| 229 |
// 初期データセット |
|
| 230 |
SetInitValue(); |
|
| 231 |
} |
|
| 232 |
#endregion |
|
| 233 |
|
|
| 234 |
#region 初期データセット |
|
| 235 |
/// <summary> |
|
| 236 |
/// 初期データセット |
|
| 237 |
/// </summary> |
|
| 238 |
private void SetInitValue() |
|
| 239 |
{
|
|
| 240 |
try |
|
| 241 |
{
|
|
| 242 |
// 予算書集計コードマスタ取得リスト |
|
| 243 |
List<BudgetSumCode> DataList = new List<BudgetSumCode>(); |
|
| 244 |
// 予算書集計コードマスタ取得 |
|
| 245 |
GetBudgetList(ref DataList); |
|
| 246 |
|
|
| 247 |
// 入札物件構成キー群セット |
|
| 248 |
SetBiddingCode(DataList); |
|
| 249 |
|
|
| 250 |
// 共通仮設費 構成キーセット |
|
| 251 |
SetCommunityCompCode(DataList); |
|
| 252 |
// 積み上げ共通仮設費 工種キーセット |
|
| 253 |
SetPileUpCommonTempory(DataList); |
|
| 254 |
// 発生剤処分費 構成キーセット |
|
| 255 |
SetMaterialDisposal(DataList); |
|
| 256 |
// 現場管理費 構成キーセット |
|
| 257 |
SetFieldManagementCompCode(DataList); |
|
| 258 |
// 一般管理費 構成キーセット |
|
| 259 |
SetNormalManagementCompCode(DataList); |
|
| 260 |
|
|
| 261 |
// 公共工事コード取得処理 |
|
| 262 |
GetConstrTypeList(); |
|
| 263 |
} |
|
| 264 |
catch (System.Exception ex) |
|
| 265 |
{
|
|
| 266 |
logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message);
|
|
| 267 |
} |
|
| 268 |
} |
|
| 269 |
#endregion |
|
| 270 |
|
|
| 271 |
#region 予算書集計コードマスタ取得 |
|
| 272 |
/// <summary> |
|
| 273 |
/// 予算書集計コードマスタ取得 |
|
| 274 |
/// </summary> |
|
| 275 |
private void GetBudgetList(ref List<BudgetSumCode> DataList) |
|
| 276 |
{
|
|
| 277 |
IOMBudgetSumCode bscDB = new IOMBudgetSumCode(); |
|
| 278 |
try |
|
| 279 |
{
|
|
| 280 |
StringBuilder strSQL = new StringBuilder(); |
|
| 281 |
strSQL.Append(" Order By BlockCode, GroupCode, ComponentCode, ItemCode");
|
|
| 282 |
bscDB.SelectAction(strSQL.ToString(), ref DataList); |
|
| 283 |
} |
|
| 284 |
catch (System.Exception ex) |
|
| 285 |
{
|
|
| 286 |
logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message);
|
|
| 287 |
} |
|
| 288 |
finally |
|
| 289 |
{
|
|
| 290 |
bscDB.close(); bscDB = null; |
|
| 291 |
} |
|
| 292 |
} |
|
| 293 |
#endregion |
|
| 294 |
|
|
| 295 |
#region 共通仮設費 構成キーセット |
|
| 296 |
/// <summary> |
|
| 297 |
/// 共通仮設費 構成キーセット |
|
| 298 |
/// </summary> |
|
| 299 |
private void SetCommunityCompCode(List<BudgetSumCode> DataList) |
|
| 300 |
{
|
|
| 301 |
try |
|
| 302 |
{
|
|
| 303 |
BudgetSumCode[] work = DataList.Where(x => x.BlockCode == (int)FrmBudgetItem.BlockNo.NetConstruction |
|
| 304 |
&& x.GroupCode == (int)FrmBudgetItem.GroupNo.CommonTemp |
|
| 305 |
&& x.ItemCode == 0) |
|
| 306 |
.ToArray(); |
|
| 307 |
if (work.Count() < 1) return; |
|
| 308 |
|
|
| 309 |
foreach (BudgetSumCode CurRec in work) |
|
| 310 |
{
|
|
| 311 |
m_Community.Add(CurRec.ComponentCode); |
|
| 312 |
} |
|
| 313 |
} |
|
| 314 |
catch (System.Exception ex) |
|
| 315 |
{
|
|
| 316 |
logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message);
|
|
| 317 |
} |
|
| 318 |
} |
|
| 319 |
#endregion |
|
| 320 |
|
|
| 321 |
#region 積み上げ共通仮設費 工種キーセット |
|
| 322 |
/// <summary> |
|
| 323 |
/// 積み上げ共通仮設費 工種キーセット |
|
| 324 |
/// </summary> |
|
| 325 |
private void SetPileUpCommonTempory(List<BudgetSumCode> DataList) |
|
| 326 |
{
|
|
| 327 |
try |
|
| 328 |
{
|
|
| 329 |
BudgetSumCode[] work = DataList.Where(x => x.BlockCode == (int)FrmBudgetItem.BlockNo.NetConstruction |
|
| 330 |
&& x.GroupCode == (int)FrmBudgetItem.GroupNo.CommonTemp |
|
| 331 |
&& x.ItemCode > 0) |
|
| 332 |
.ToArray(); |
|
| 333 |
if (work.Count() < 1) return; |
|
| 334 |
|
|
| 335 |
foreach (BudgetSumCode CurRec in work) |
|
| 336 |
{
|
|
| 337 |
m_PileUpComTempo.Add(new KeyValuePair<int, int>(CurRec.ComponentCode, CurRec.ItemCode)); |
|
| 338 |
} |
|
| 339 |
} |
|
| 340 |
catch (System.Exception ex) |
|
| 341 |
{
|
|
| 342 |
logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message);
|
|
| 343 |
} |
|
| 344 |
} |
|
| 345 |
#endregion |
|
| 346 |
|
|
| 347 |
#region 発生剤処分費 構成キーセット |
|
| 348 |
/// <summary> |
|
| 349 |
/// 発生剤処分費 構成キーセット |
|
| 350 |
/// </summary> |
|
| 351 |
private void SetMaterialDisposal(List<BudgetSumCode> DataList) |
|
| 352 |
{
|
|
| 353 |
try |
|
| 354 |
{
|
|
| 355 |
BudgetSumCode[] work = DataList.Where(x => x.BlockCode == (int)FrmBudgetItem.BlockNo.TotalCosts |
|
| 356 |
&& x.GroupCode == (int)FrmBudgetItem.GroupNo.Dispose) |
|
| 357 |
.ToArray(); |
|
| 358 |
if (work.Count() < 1) return; |
|
| 359 |
|
|
| 360 |
foreach (BudgetSumCode CurRec in work) |
|
| 361 |
{
|
|
| 362 |
m_MaterialDisposal.Add(CurRec.ComponentCode); |
|
| 363 |
} |
|
| 364 |
} |
|
| 365 |
catch (System.Exception ex) |
|
| 366 |
{
|
|
| 367 |
logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message);
|
|
| 368 |
} |
|
| 369 |
} |
|
| 370 |
#endregion |
|
| 371 |
|
|
| 372 |
#region 現場管理費 構成キーセット |
|
| 373 |
/// <summary> |
|
| 374 |
/// 現場管理費 構成キーセット |
|
| 375 |
/// </summary> |
|
| 376 |
private void SetFieldManagementCompCode(List<BudgetSumCode> DataList) |
|
| 377 |
{
|
|
| 378 |
try |
|
| 379 |
{
|
|
| 380 |
BudgetSumCode[] work = DataList.Where(x => x.BlockCode == (int)FrmBudgetItem.BlockNo.ConstructionCosts |
|
| 381 |
&& x.GroupCode == (int)FrmBudgetItem.GroupNo.FieldManage) |
|
| 382 |
.ToArray(); |
|
| 383 |
if (work.Count() < 1) return; |
|
| 384 |
|
|
| 385 |
foreach (BudgetSumCode CurRec in work) |
|
| 386 |
{
|
|
| 387 |
m_FieldManagement.Add(CurRec.ComponentCode); |
|
| 388 |
} |
|
| 389 |
} |
|
| 390 |
catch (System.Exception ex) |
|
| 391 |
{
|
|
| 392 |
logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message);
|
|
| 393 |
} |
|
| 394 |
} |
|
| 395 |
#endregion |
|
| 396 |
|
|
| 397 |
#region 一般管理費 構成キーセット |
|
| 398 |
/// <summary> |
|
| 399 |
/// 一般管理費 構成キーセット |
|
| 400 |
/// </summary> |
|
| 401 |
private void SetNormalManagementCompCode(List<BudgetSumCode> DataList) |
|
| 402 |
{
|
|
| 403 |
try |
|
| 404 |
{
|
|
| 405 |
BudgetSumCode[] work = DataList.Where(x => x.BlockCode == (int)FrmBudgetItem.BlockNo.ConstructionPrice |
|
| 406 |
&& x.GroupCode == (int)FrmBudgetItem.GroupNo.UsualManage) |
|
| 407 |
.ToArray(); |
|
| 408 |
if (work.Count() < 1) return; |
|
| 409 |
|
|
| 410 |
foreach (BudgetSumCode CurRec in work) |
|
| 411 |
{
|
|
| 412 |
m_NormalManagement.Add(CurRec.ComponentCode); |
|
| 413 |
} |
|
| 414 |
} |
|
| 415 |
catch (System.Exception ex) |
|
| 416 |
{
|
|
| 417 |
logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message);
|
|
| 418 |
} |
|
| 419 |
} |
|
| 420 |
#endregion |
|
| 421 |
|
|
| 422 |
#region 公共工事コード取得処理 |
|
| 423 |
/// <summary> |
|
| 424 |
/// 公共工事コード取得処理 |
|
| 425 |
/// </summary> |
|
| 426 |
private void GetConstrTypeList() |
|
| 427 |
{
|
|
| 428 |
IOMConstructionType ctDB = new IOMConstructionType(); |
|
| 429 |
try |
|
| 430 |
{
|
|
| 431 |
StringBuilder strSQL = new StringBuilder(); |
|
| 432 |
strSQL.AppendFormat(" Where PublicFlg = {0}", (int)ConstructionTypeMaster.PublicFlgDef.Community);
|
|
| 433 |
strSQL.Append(" Order by TypeCode ASC");
|
|
| 434 |
List<ConstructionTypeMaster> ctList = new List<ConstructionTypeMaster>(); |
|
| 435 |
ctDB.SelectAction(strSQL.ToString(), ref ctList); |
|
| 436 |
|
|
| 437 |
m_RepairConstrType.Clear(); |
|
| 438 |
m_CreateConstrType.Clear(); |
|
| 439 |
|
|
| 440 |
foreach (ConstructionTypeMaster CurRec in ctList) |
|
| 441 |
{
|
|
| 442 |
switch (CurRec.RepairFlg) |
|
| 443 |
{
|
|
| 444 |
case (int)ConstructionTypeMaster.RepairFlgDef.Create: |
|
| 445 |
// 新築 |
|
| 446 |
m_CreateConstrType.Add(CurRec.TypeCode); |
|
| 447 |
break; |
|
| 448 |
case (int)ConstructionTypeMaster.RepairFlgDef.Modify: |
|
| 449 |
// 改修 |
|
| 450 |
m_RepairConstrType.Add(CurRec.TypeCode); |
|
| 451 |
break; |
|
| 452 |
} |
|
| 453 |
} |
|
| 454 |
} |
|
| 455 |
catch (System.Exception ex) |
|
| 456 |
{
|
|
| 457 |
logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message);
|
|
| 458 |
} |
|
| 459 |
finally |
|
| 460 |
{
|
|
| 461 |
ctDB.close(); ctDB = null; |
|
| 462 |
} |
|
| 463 |
} |
|
| 464 |
#endregion |
|
| 465 |
|
|
| 466 |
#region 入札物件構成キー群セット |
|
| 467 |
/// <summary> |
|
| 468 |
/// 入札物件構成キー群セット |
|
| 469 |
/// </summary> |
|
| 470 |
private void SetBiddingCode(List<BudgetSumCode> DataList) |
|
| 471 |
{
|
|
| 472 |
try |
|
| 473 |
{
|
|
| 474 |
BudgetSumCode[] work = DataList.Where(x => x.BlockCode == (int)FrmBudgetItem.BlockNo.PublicWorks) |
|
| 475 |
.OrderBy(y => y.ComponentCode) |
|
| 476 |
.ToArray(); |
|
| 477 |
if (work.Count() < 1) return; |
|
| 478 |
|
|
| 479 |
foreach (BudgetSumCode CurRec in work) |
|
| 480 |
{
|
|
| 481 |
m_BiddingCode.Add(CurRec.ComponentCode); |
|
| 482 |
} |
|
| 483 |
} |
|
| 484 |
catch (System.Exception ex) |
|
| 485 |
{
|
|
| 486 |
logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message);
|
|
| 487 |
} |
|
| 488 |
} |
|
| 489 |
#endregion |
|
| 490 |
|
|
| 491 |
#region 共通仮設費[構成キー]取得処理 |
|
| 492 |
/// <summary> |
|
| 493 |
/// 共通仮設費[構成キー]取得処理 |
|
| 494 |
/// </summary> |
|
| 495 |
private int GetCommunityCompCode(bool PublicFlg) |
|
| 496 |
{
|
|
| 497 |
try |
|
| 498 |
{
|
|
| 499 |
int GetValue = -1; |
|
| 500 |
foreach (int CurValue in m_Community) |
|
| 501 |
{
|
|
| 502 |
List<int> RefList = m_BiddingCode.Where(x => x == CurValue).ToList<int>(); |
|
| 503 |
if (PublicFlg) |
|
| 504 |
{ // 公共入札工事は無ければ次データ
|
|
| 505 |
if (RefList.Count() < 1) continue; |
|
| 506 |
} |
|
| 507 |
else |
|
| 508 |
{ // 公共入札工事以外はあれば次データ
|
|
| 509 |
if (RefList.Count() > 0) continue; |
|
| 510 |
} |
|
| 511 |
GetValue = CurValue; |
|
| 512 |
break; |
|
| 513 |
} |
|
| 514 |
|
|
| 515 |
return GetValue; |
|
| 516 |
} |
|
| 517 |
catch (System.Exception ex) |
|
| 518 |
{
|
|
| 519 |
logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message);
|
|
| 520 |
return -1; |
|
| 521 |
} |
|
| 522 |
} |
|
| 523 |
#endregion |
|
| 524 |
|
|
| 525 |
#region 発生剤処分費[構成キー]取得処理 |
|
| 526 |
/// <summary> |
|
| 527 |
/// 発生剤処分費[構成キー]取得処理 |
|
| 528 |
/// </summary> |
|
| 529 |
private int GetMaterialDisposal(bool PublicFlg) |
|
| 530 |
{
|
|
| 531 |
try |
|
| 532 |
{
|
|
| 533 |
int GetValue = -1; |
|
| 534 |
foreach (int CurValue in m_MaterialDisposal) |
|
| 535 |
{
|
|
| 536 |
List<int> RefList = m_BiddingCode.Where(x => x == CurValue).ToList<int>(); |
|
| 537 |
if (PublicFlg) |
|
| 538 |
{ // 公共入札工事は無ければ次データ
|
|
| 539 |
if (RefList.Count() < 1) continue; |
|
| 540 |
} |
|
| 541 |
else |
|
| 542 |
{ // 公共入札工事以外はあれば次データ
|
|
| 543 |
if (RefList.Count() > 0) continue; |
|
| 544 |
} |
|
| 545 |
GetValue = CurValue; |
|
| 546 |
break; |
|
| 547 |
} |
|
| 548 |
|
|
| 549 |
return GetValue; |
|
| 550 |
} |
|
| 551 |
catch (System.Exception ex) |
|
| 552 |
{
|
|
| 553 |
logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message);
|
|
| 554 |
return -1; |
|
| 555 |
} |
|
| 556 |
} |
|
| 557 |
#endregion |
|
| 558 |
|
|
| 559 |
#region 積み上げ共通仮設費[工種キー]取得処理 |
|
| 560 |
/// <summary> |
|
| 561 |
/// 積み上げ共通仮設費[工種キー]取得処理 |
|
| 562 |
/// </summary> |
|
| 563 |
private int GetPileUpCommonTempory(bool PublicFlg) |
|
| 564 |
{
|
|
| 565 |
try |
|
| 566 |
{
|
|
| 567 |
int GetValue = -1; |
|
| 568 |
foreach (KeyValuePair<int, int> CurValue in m_PileUpComTempo) |
|
| 569 |
{
|
|
| 570 |
List<int> RefList = m_BiddingCode.Where(x => x == CurValue.Key).ToList<int>(); |
|
| 571 |
if (PublicFlg) |
|
| 572 |
{ // 公共入札工事は無ければ次データ
|
|
| 573 |
if (RefList.Count() < 1) continue; |
|
| 574 |
} |
|
| 575 |
else |
|
| 576 |
{ // 公共入札工事以外はあれば次データ
|
|
| 577 |
if (RefList.Count() > 0) continue; |
|
| 578 |
} |
|
| 579 |
GetValue = CurValue.Value; |
|
| 580 |
break; |
|
| 581 |
} |
|
| 582 |
|
|
| 583 |
return GetValue; |
|
| 584 |
} |
|
| 585 |
catch (System.Exception ex) |
|
| 586 |
{
|
|
| 587 |
logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message);
|
|
| 588 |
return -1; |
|
| 589 |
} |
|
| 590 |
} |
|
| 591 |
#endregion |
|
| 592 |
|
|
| 593 |
#region 共通仮設算定率[工種キー]取得処理 |
|
| 594 |
/// <summary> |
|
| 595 |
/// 共通仮設算定率[工種キー]取得処理 |
|
| 596 |
/// </summary> |
|
| 597 |
private int GetComputationCommonTempory(bool PublicFlg) |
|
| 598 |
{
|
|
| 599 |
try |
|
| 600 |
{
|
|
| 601 |
int GetValue = -1; |
|
| 602 |
foreach (int CurValue in m_ComputationComTempo) |
|
| 603 |
{
|
|
| 604 |
List<int> RefList = m_BiddingCode.Where(x => x == CurValue).ToList<int>(); |
|
| 605 |
if (PublicFlg) |
|
| 606 |
{ // 公共入札工事は無ければ次データ
|
|
| 607 |
if (RefList.Count() < 1) continue; |
|
| 608 |
} |
|
| 609 |
else |
|
| 610 |
{ // 公共入札工事以外はあれば次データ
|
|
| 611 |
if (RefList.Count() > 0) continue; |
|
| 612 |
} |
|
| 613 |
GetValue = CurValue; |
|
| 614 |
break; |
|
| 615 |
} |
|
| 616 |
|
|
| 617 |
return GetValue; |
|
| 618 |
} |
|
| 619 |
catch (System.Exception ex) |
|
| 620 |
{
|
|
| 621 |
logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message);
|
|
| 622 |
return -1; |
|
| 623 |
} |
|
| 624 |
} |
|
| 625 |
#endregion |
|
| 626 |
|
|
| 627 |
#region 現場管理費[構成キー]取得処理 |
|
| 628 |
/// <summary> |
|
| 629 |
/// 現場管理費[構成キー]取得処理 |
|
| 630 |
/// </summary> |
|
| 631 |
private int GetFieldManagementCompCode(bool PublicFlg) |
|
| 632 |
{
|
|
| 633 |
try |
|
| 634 |
{
|
|
| 635 |
int GetValue = -1; |
|
| 636 |
foreach (int CurValue in m_FieldManagement) |
|
| 637 |
{
|
|
| 638 |
List<int> RefList = m_BiddingCode.Where(x => x == CurValue).ToList<int>(); |
|
| 639 |
if (PublicFlg) |
|
| 640 |
{ // 公共入札工事は無ければ次データ
|
|
| 641 |
if (RefList.Count() < 1) continue; |
|
| 642 |
} |
|
| 643 |
else |
|
| 644 |
{ // 公共入札工事以外はあれば次データ
|
|
| 645 |
if (RefList.Count() > 0) continue; |
|
| 646 |
} |
|
| 647 |
GetValue = CurValue; |
|
| 648 |
break; |
|
| 649 |
} |
|
| 650 |
|
|
| 651 |
return GetValue; |
|
| 652 |
} |
|
| 653 |
catch (System.Exception ex) |
|
| 654 |
{
|
|
| 655 |
logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message);
|
|
| 656 |
return -1; |
|
| 657 |
} |
|
| 658 |
} |
|
| 659 |
#endregion |
|
| 660 |
|
|
| 661 |
#region 一般管理費[構成キー]取得処理 |
|
| 662 |
/// <summary> |
|
| 663 |
/// 一般管理費[構成キー]取得処理 |
|
| 664 |
/// </summary> |
|
| 665 |
private int GetNormalManagementCompCode(bool PublicFlg) |
|
| 666 |
{
|
|
| 667 |
try |
|
| 668 |
{
|
|
| 669 |
int GetValue = -1; |
|
| 670 |
foreach (int CurValue in m_NormalManagement) |
|
| 671 |
{
|
|
| 672 |
List<int> RefList = m_BiddingCode.Where(x => x == CurValue).ToList<int>(); |
|
| 673 |
if (PublicFlg) |
|
| 674 |
{ // 公共入札工事は無ければ次データ
|
|
| 675 |
if (RefList.Count() < 1) continue; |
|
| 676 |
} |
|
| 677 |
else |
|
| 678 |
{ // 公共入札工事以外はあれば次データ
|
|
| 679 |
if (RefList.Count() > 0) continue; |
|
| 680 |
} |
|
| 681 |
GetValue = CurValue; |
|
| 682 |
break; |
|
| 683 |
} |
|
| 684 |
|
|
| 685 |
return GetValue; |
|
| 686 |
} |
|
| 687 |
catch (System.Exception ex) |
|
| 688 |
{
|
|
| 689 |
logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message);
|
|
| 690 |
return -1; |
|
| 691 |
} |
|
| 692 |
} |
|
| 693 |
#endregion |
|
| 91 | 694 |
} |
| 92 | 695 |
} |
| branches/src/ProcessManagement/ProcessManagement/Common/Process/ClsCostCulculation.cs | ||
|---|---|---|
| 33 | 33 |
#endregion |
| 34 | 34 |
|
| 35 | 35 |
#region 定数 |
| 36 |
|
|
| 37 |
#region ----- 共通仮設率計算係数テーブル |
|
| 36 | 38 |
/// <summary> |
| 37 | 39 |
/// 共通仮設率計算係数テーブル |
| 38 | 40 |
/// 0:区分設定金額 |
| ... | ... | |
| 53 | 55 |
{ 5000000.0, 4.86, 5.51, 10.94, -0.0952, 12.40, -0.0952, 12.15, -0.1186, 0.0882 }, // 新営機械設備工事
|
| 54 | 56 |
{ 3000000.0, 1.73, 4.96, 2.44, -0.0433, 7.02, -0.0433, 12.21, -0.2596, 0.6874 }, // 改修機械設備工事
|
| 55 | 57 |
}; |
| 58 |
private enum CommonTempListDef |
|
| 59 |
{
|
|
| 60 |
/// <summary> |
|
| 61 |
/// 0:区分設定金額 |
|
| 62 |
/// </summary> |
|
| 63 |
SetAmount = 0, |
|
| 64 |
/// <summary> |
|
| 65 |
/// 1:区分設定金額以下係数 下限 |
|
| 66 |
/// </summary> |
|
| 67 |
CoefficientLow, |
|
| 68 |
/// <summary> |
|
| 69 |
/// 2:区分設定金額以下係数 上限 |
|
| 70 |
/// </summary> |
|
| 71 |
CoefficientHigh, |
|
| 72 |
/// <summary> |
|
| 73 |
/// 3:区分設定金額超係数 下限 |
|
| 74 |
/// </summary> |
|
| 75 |
CoefficientOverLow, |
|
| 76 |
/// <summary> |
|
| 77 |
/// 4:区分設定金額超係数 下限指数 |
|
| 78 |
/// </summary> |
|
| 79 |
CoefficientOverLowIndex, |
|
| 80 |
/// <summary> |
|
| 81 |
/// 5:区分設定金額超係数 上限 |
|
| 82 |
/// </summary> |
|
| 83 |
CoefficientOverHigh, |
|
| 84 |
/// <summary> |
|
| 85 |
/// 6:区分設定金額超係数 上限指数 |
|
| 86 |
/// </summary> |
|
| 87 |
CoefficientOverHighIndex, |
|
| 88 |
/// <summary> |
|
| 89 |
/// 7:共通仮設費率係数 |
|
| 90 |
/// </summary> |
|
| 91 |
CommonCoefficient, |
|
| 92 |
/// <summary> |
|
| 93 |
/// 8:工事費指数 |
|
| 94 |
/// </summary> |
|
| 95 |
ConstrCostsIndex, |
|
| 96 |
/// <summary> |
|
| 97 |
/// 9:工期指数 |
|
| 98 |
/// </summary> |
|
| 99 |
ConstrTimesIndex, |
|
| 100 |
} |
|
| 101 |
#endregion |
|
| 102 |
|
|
| 103 |
#region ----- 共通仮設率計算係数テーブル(昇降機設備工事) |
|
| 56 | 104 |
/// <summary> |
| 57 | 105 |
/// 共通仮設率計算係数テーブル(昇降機設備工事) |
| 58 | 106 |
/// 0:区分設定金額以下 |
| ... | ... | |
| 63 | 111 |
/// 5:区分設定金額超係数 |
| 64 | 112 |
/// </summary> |
| 65 | 113 |
private static double[] CommonTempList2 = new double[] { 10000000.0, 3.08, 500000000.0, 7.89, -0.1021, 2.07 };
|
| 114 |
#endregion |
|
| 66 | 115 |
|
| 116 |
#region ----- 現場管理率計算係数テーブル |
|
| 67 | 117 |
/// <summary> |
| 68 | 118 |
/// 現場管理率計算係数テーブル |
| 69 | 119 |
/// 0:区分設定金額 |
| ... | ... | |
| 84 | 134 |
{ 5000000.0, 17.14, 31.23, 90.67, -0.1956, 165.22, -0.1956, 152.72, -0.3085, 0.4222 }, // 新営機械設備工事
|
| 85 | 135 |
{ 3000000.0, 15.25, 42.07, 169.65, -0.3009, 467.95, -0.3009, 825.85, -0.5122, 0.6648 }, // 改修機械設備工事
|
| 86 | 136 |
}; |
| 137 |
#endregion |
|
| 138 |
|
|
| 139 |
#region ----- 現場管理率計算係数テーブル(昇降機設備工事) |
|
| 87 | 140 |
/// <summary> |
| 88 | 141 |
/// 現場管理率計算係数テーブル(昇降機設備工事) |
| 89 | 142 |
/// 0:区分設定金額以下 |
| ... | ... | |
| 94 | 147 |
/// 5:区分設定金額超係数 |
| 95 | 148 |
/// </summary> |
| 96 | 149 |
private static double[] FieldManageList2 = new double[] { 10000000.0, 3.98, 500000000.0, 15.10, -0.1449, 2.26 };
|
| 150 |
#endregion |
|
| 97 | 151 |
|
| 98 |
|
|
| 152 |
#region ----- 一般管理率計算係数テーブル(昇降機設備工事) |
|
| 99 | 153 |
/// <summary> |
| 100 | 154 |
/// 一般管理率計算係数テーブル(昇降機設備工事) |
| 101 | 155 |
/// 0:区分設定金額以下 |
| ... | ... | |
| 109 | 163 |
{ 3000000.0, 11.80, 2000000000.0, 17.286, 1.577, 7.35 }, // 電気設備工事
|
| 110 | 164 |
{ 3000000.0, 11.20, 2000000000.0, 15.741, 1.305, 7.52 } // 電気設備工事
|
| 111 | 165 |
}; |
| 166 |
#endregion |
|
| 167 |
|
|
| 168 |
#region ----- 入力単位(千円) |
|
| 112 | 169 |
/// <summary> |
| 113 | 170 |
/// 入力単位(千円) |
| 114 | 171 |
/// </summary> |
| 115 | 172 |
private static double s_InputUnit = 1000.0; |
| 116 | 173 |
#endregion |
| 174 |
|
|
| 175 |
#endregion |
|
| 117 | 176 |
|
| 118 | 177 |
#region 共通仮設費計算(新営建築工事~回収機械設備工事) |
| 119 | 178 |
/// <summary> |
| ... | ... | |
| 132 | 191 |
try |
| 133 | 192 |
{
|
| 134 | 193 |
// 金額で係数が違う |
| 135 |
if (ConstValue <= ClsCostCulculation.CommonTempList[ExecNo, 0])
|
|
| 194 |
if (ConstValue <= ClsCostCulculation.CommonTempList[ExecNo, (int)CommonTempListDef.SetAmount])
|
|
| 136 | 195 |
{ // 1千万円以下
|
| 137 | 196 |
|
| 138 | 197 |
// 1千万円で計算する(金額を千円単位にする) |
| 139 |
double BaseValue = (ClsCostCulculation.CommonTempList[ExecNo, 0] / s_InputUnit);
|
|
| 198 |
double BaseValue = (ClsCostCulculation.CommonTempList[ExecNo, (int)CommonTempListDef.SetAmount] / s_InputUnit);
|
|
| 140 | 199 |
// 算定値 |
| 141 |
CalValue = ClsCostCulculation.CommonTempList[ExecNo, 7]
|
|
| 142 |
* System.Math.Pow(BaseValue, ClsCostCulculation.CommonTempList[ExecNo, 8])
|
|
| 143 |
* System.Math.Pow(ConstTimes, ClsCostCulculation.CommonTempList[ExecNo, 9]);
|
|
| 200 |
CalValue = ClsCostCulculation.CommonTempList[ExecNo, (int)CommonTempListDef.CommonCoefficient]
|
|
| 201 |
* System.Math.Pow(BaseValue, ClsCostCulculation.CommonTempList[ExecNo, (int)CommonTempListDef.ConstrCostsIndex])
|
|
| 202 |
* System.Math.Pow(ConstTimes, ClsCostCulculation.CommonTempList[ExecNo, (int)CommonTempListDef.ConstrTimesIndex]);
|
|
| 144 | 203 |
// 上限値 |
| 145 |
HighValue = ClsCostCulculation.CommonTempList[ExecNo, 2];
|
|
| 204 |
HighValue = ClsCostCulculation.CommonTempList[ExecNo, (int)CommonTempListDef.CoefficientHigh];
|
|
| 146 | 205 |
// 下限値 |
| 147 |
LowValue = ClsCostCulculation.CommonTempList[ExecNo, 1];
|
|
| 206 |
LowValue = ClsCostCulculation.CommonTempList[ExecNo, (int)CommonTempListDef.CoefficientLow];
|
|
| 148 | 207 |
} |
| 149 | 208 |
else |
| 150 | 209 |
{ // 1千万円超
|
| 151 | 210 |
// 金額を千円単位にする |
| 152 | 211 |
double BaseValue = (ConstValue / s_InputUnit); |
| 153 | 212 |
// 算定値 |
| 154 |
CalValue = ClsCostCulculation.CommonTempList[ExecNo, 7]
|
|
| 155 |
* System.Math.Pow(BaseValue, ClsCostCulculation.CommonTempList[ExecNo, 8])
|
|
| 156 |
* System.Math.Pow(ConstTimes, ClsCostCulculation.CommonTempList[ExecNo, 9]);
|
|
| 213 |
CalValue = ClsCostCulculation.CommonTempList[ExecNo, (int)CommonTempListDef.CommonCoefficient]
|
|
| 214 |
* System.Math.Pow(BaseValue, ClsCostCulculation.CommonTempList[ExecNo, (int)CommonTempListDef.ConstrCostsIndex])
|
|
| 215 |
* System.Math.Pow(ConstTimes, ClsCostCulculation.CommonTempList[ExecNo, (int)CommonTempListDef.ConstrTimesIndex]);
|
|
| 157 | 216 |
// 上限値 |
| 158 |
HighValue = ClsCostCulculation.CommonTempList[ExecNo, 5] * System.Math.Pow(BaseValue, ClsCostCulculation.CommonTempList[ExecNo, 6]); |
|
| 217 |
HighValue = ClsCostCulculation.CommonTempList[ExecNo, (int)CommonTempListDef.CoefficientOverHigh] |
|
| 218 |
* System.Math.Pow(BaseValue, ClsCostCulculation.CommonTempList[ExecNo, (int)CommonTempListDef.CoefficientOverHighIndex]); |
|
| 159 | 219 |
// 下限値 |
| 160 |
LowValue = ClsCostCulculation.CommonTempList[ExecNo, 3] * System.Math.Pow(BaseValue, ClsCostCulculation.CommonTempList[ExecNo, 4]); |
|
| 220 |
LowValue = ClsCostCulculation.CommonTempList[ExecNo, (int)CommonTempListDef.CoefficientOverLow] |
|
| 221 |
* System.Math.Pow(BaseValue, ClsCostCulculation.CommonTempList[ExecNo, (int)CommonTempListDef.CoefficientOverLowIndex]); |
|
| 161 | 222 |
} |
| 162 | 223 |
|
| 163 | 224 |
ExecuteValue = CalValue; |
| ... | ... | |
| 209 | 270 |
} |
| 210 | 271 |
#endregion |
| 211 | 272 |
|
| 212 |
#region 現場管理費計算(新営建築工事~回収機械設備工事)
|
|
| 273 |
#region 現場管理費計算(建築工事(新営)~機械設備工事(改修))
|
|
| 213 | 274 |
/// <summary> |
| 214 |
/// 現場管理費計算(新営建築工事~回収機械設備工事)
|
|
| 275 |
/// 現場管理費計算(建築工事(新営)~機械設備工事(改修))
|
|
| 215 | 276 |
/// </summary> |
| 216 | 277 |
/// <param name="ExecNo">計算番号</param> |
| 217 | 278 |
/// <param name="ConstValue">直接工事費</param> |
| branches/src/ProcessManagement/ProcessManagement/Common/Process/ClsExcute.cs | ||
|---|---|---|
| 129 | 129 |
MaterialItem = 128, // 128:資材品目マスタ |
| 130 | 130 |
SalesConfirm = 129, // 129:売上確認 |
| 131 | 131 |
BankBusinessDay = 130, // 130:銀行営業日マスタ |
| 132 |
BudgetCodeSum = 131, // 131:予算書集計コードマスタ |
|
| 132 | 133 |
} |
| 133 | 134 |
#endregion |
| 134 | 135 |
|
| ... | ... | |
| 202 | 203 |
{ (int)ProcessExecuteNo.SafetyPatrol, "安全パトロール申請"},
|
| 203 | 204 |
{ (int)ProcessExecuteNo.ReqSumTotalList, "手間・通常業者一覧-表示"},
|
| 204 | 205 |
{ (int)ProcessExecuteNo.RequestPrintList, "請求書印刷一覧-表示"},
|
| 205 |
|
|
| 206 | 206 |
}; |
| 207 | 207 |
|
| 208 | 208 |
#endregion |
| ... | ... | |
| 242 | 242 |
{ (int)MaintenanceExecuteNo.MaterialItem, "資材品目登録"}, // 128
|
| 243 | 243 |
{ (int)MaintenanceExecuteNo.SalesConfirm, "売上順一覧"}, // 129
|
| 244 | 244 |
{ (int)MaintenanceExecuteNo.BankBusinessDay, "銀行営業日登録"}, // 130
|
| 245 |
{ (int)MaintenanceExecuteNo.BudgetCodeSum, "予算書集計コード登録" }, // 131
|
|
| 245 | 246 |
|
| 246 | 247 |
}; |
| 247 | 248 |
#endregion |
| ... | ... | |
| 670 | 671 |
ProcessExecuteNo_ReqBillingStatus(m_ProcControlPara[NowPoint]); |
| 671 | 672 |
break; |
| 672 | 673 |
|
| 673 |
case (int)ProcessExecuteNo.ReqBillingStatInput: // 42:請求書状況入力
|
|
| 674 |
case (int)ProcessExecuteNo.ReqBillingStatInput: // 42:請求書状況入力 |
|
| 674 | 675 |
ProcessExecuteNo_ReqBillingStatInput(m_ProcControlPara[NowPoint]); |
| 675 | 676 |
break; |
| 676 | 677 |
|
| 677 |
case (int)ProcessExecuteNo.SafetyPatrol: // 43:安全パトロール申請
|
|
| 678 |
case (int)ProcessExecuteNo.SafetyPatrol: // 43:安全パトロール申請 |
|
| 678 | 679 |
ProcessExecuteNo_SafetyPatrol(m_ProcControlPara[NowPoint]); |
| 679 | 680 |
break; |
| 680 | 681 |
|
| ... | ... | |
| 685 | 686 |
ProcessExecuteNo_RequestPrintList(m_ProcControlPara[NowPoint]); |
| 686 | 687 |
break; |
| 687 | 688 |
|
| 688 |
#endregion |
|
| 689 |
#endregion
|
|
| 689 | 690 |
|
| 690 | 691 |
#region マスタメンテ |
| 691 | 692 |
// ----- マスタメンテ |
| ... | ... | |
| 779 | 780 |
case (int)MaintenanceExecuteNo.BankBusinessDay: // 130:銀行営業日 |
| 780 | 781 |
MaintenanceExecuteNo_BBD(m_ProcControlPara[NowPoint]); |
| 781 | 782 |
break; |
| 783 |
case (int)MaintenanceExecuteNo.BudgetCodeSum: // 131:予算書集計コードマスタ |
|
| 784 |
MaintenanceExecuteNo_BudgetSumCode(m_ProcControlPara[NowPoint]); |
|
| 785 |
break; |
|
| 782 | 786 |
|
| 783 | 787 |
|
| 784 | 788 |
#endregion |
| ... | ... | |
| 3711 | 3715 |
} |
| 3712 | 3716 |
#endregion |
| 3713 | 3717 |
|
| 3718 |
#region 予算書集計コードマスタ |
|
| 3719 |
/// <summary> |
|
| 3720 |
/// 予算書集計コードマスタ |
|
| 3721 |
/// </summary> |
|
| 3722 |
public static void MaintenanceExecuteNo_BudgetSumCode(ProcessParameter CurrentPara) |
|
| 3723 |
{
|
|
| 3724 |
// |
|
| 3725 |
FrmBudgetItem frm = new FrmBudgetItem(); |
|
| 3726 |
try |
|
| 3727 |
{
|
|
| 3728 |
// 起動・編集フラグ |
|
| 3729 |
int ProcessNo = (int)MaintenanceExecuteNo.BankBusinessDay; |
|
| 3730 |
int EditFlg = (int)CommonDefine.ProcessDataEdit.Reference; |
|
| 3731 |
if (!ClsSecurityPermission.GetExecutePermission(ProcessNo, ref EditFlg)) |
|
| 3732 |
{
|
|
| 3733 |
BackProcess(); |
|
| 3734 |
return; |
|
| 3735 |
} |
|
| 3736 |
if (EditFlg == (int)CommonDefine.ProcessDataEdit.Reference) frm.EditLock = true; |
|
| 3737 |
|
|
| 3738 |
frm.ShowDialog(); |
|
| 3739 |
} |
|
| 3740 |
catch (Exception ex) |
|
| 3741 |
{
|
|
| 3742 |
logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message);
|
|
| 3743 |
BackProcess(); |
|
| 3744 |
} |
|
| 3745 |
finally |
|
| 3746 |
{
|
|
| 3747 |
frm.Dispose(); frm = null; |
|
| 3748 |
} |
|
| 3749 |
} |
|
| 3714 | 3750 |
#endregion |
| 3715 | 3751 |
|
| 3752 |
#endregion |
|
| 3753 |
|
|
| 3716 | 3754 |
#region サブフォーム |
| 3717 | 3755 |
#region 掲示板メッセージ入力 |
| 3718 | 3756 |
/// <summary> |
| branches/src/ProcessManagement/ProcessManagement/Common/Process/ClsMessageBoradAccess.cs | ||
|---|---|---|
| 485 | 485 |
IOMPersonInCharge PersonDB = new IOMPersonInCharge(); |
| 486 | 486 |
try |
| 487 | 487 |
{
|
| 488 |
// 権限ランク取得 |
|
| 489 |
int NRank = (int)CommonDefine.SecurityRankPos.NormalAuthority; // 一般者権限 |
|
| 490 |
|
|
| 488 | 491 |
// ----- 対象者コードが5桁以下ならば部署コード |
| 489 | 492 |
if (SourceCode < 99999) |
| 490 | 493 |
{
|
| ... | ... | |
| 494 | 497 |
return true; |
| 495 | 498 |
} |
| 496 | 499 |
|
| 497 |
// アクセス権対象部署の場合はOK |
|
| 498 |
PersonDepartmentMaster FindDepRec = CommonMotions.LoginUserRefDepartment.Find(x => x.DepartmentCode == SourceCode); |
|
| 499 |
if (FindDepRec != null) |
|
| 500 |
// 一般権限者以外は参照部署チェック |
|
| 501 |
if (CommonMotions.LoginUserSecurity.SecRank != CommonDefine.SecurityRankList[NRank].Key) |
|
| 500 | 502 |
{
|
| 501 |
if (FindDepRec.DepartmentCode > 0) return true; |
|
| 503 |
// アクセス権対象部署の場合はOK |
|
| 504 |
PersonDepartmentMaster FindDepRec = CommonMotions.LoginUserRefDepartment.Find(x => x.DepartmentCode == SourceCode); |
|
| 505 |
if (FindDepRec != null) |
|
| 506 |
{
|
|
| 507 |
if (FindDepRec.DepartmentCode > 0) return true; |
|
| 508 |
} |
|
| 502 | 509 |
} |
| 503 | 510 |
|
| 504 | 511 |
return false; |
| ... | ... | |
| 517 | 524 |
PersonInChargeMaster PersonRec = new PersonInChargeMaster(); |
| 518 | 525 |
if (!PersonDB.SelectAction(strSQL.ToString(), ref PersonRec)) return false; |
| 519 | 526 |
|
| 520 |
// 対象部署所属者はOK |
|
| 521 |
PersonDepartmentMaster FindRec = CommonMotions.LoginUserRefDepartment.Find(x => x.DepartmentCode == PersonRec.DepartmentCode); |
|
| 522 |
if (FindRec != null) |
|
| 527 |
// 一般権限者以外は参照部署チェック |
|
| 528 |
if (CommonMotions.LoginUserSecurity.SecRank != CommonDefine.SecurityRankList[NRank].Key) |
|
| 523 | 529 |
{
|
| 524 |
if (FindRec.DepartmentCode > 0) return true; |
|
| 530 |
// 対象部署所属者はOK |
|
| 531 |
PersonDepartmentMaster FindRec = CommonMotions.LoginUserRefDepartment.Find(x => x.DepartmentCode == PersonRec.DepartmentCode); |
|
| 532 |
if (FindRec != null) |
|
| 533 |
{
|
|
| 534 |
if (FindRec.DepartmentCode > 0) return true; |
|
| 535 |
} |
|
| 525 | 536 |
} |
| 526 | 537 |
|
| 527 | 538 |
return false; |
| branches/src/ProcessManagement/ProcessManagement/Common/Process/ClsSecurityPermission.cs | ||
|---|---|---|
| 640 | 640 |
{
|
| 641 | 641 |
bool bRet = false; |
| 642 | 642 |
|
| 643 |
if (CommonMotions.LoginUserData.SecCode == 0) |
|
| 644 |
{
|
|
| 645 |
bRet = GetSecurityLevel(CommonMotions.LoginUserData.PersonCode, ref SecCode, ref SecName); |
|
| 646 |
} |
|
| 647 |
else |
|
| 648 |
{
|
|
| 649 |
SecCode = CommonMotions.LoginUserSecurity.SecCode; |
|
| 650 |
SecName = CommonMotions.LoginUserSecurity.SecName; |
|
| 651 |
bRet = true; |
|
| 652 |
} |
|
| 643 |
SecCode = CommonMotions.LoginUserSecurity.SecCode; |
|
| 644 |
SecName = CommonMotions.LoginUserSecurity.SecName; |
|
| 645 |
bRet = true; |
|
| 653 | 646 |
|
| 654 | 647 |
return bRet; |
| 655 | 648 |
} |
| branches/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOMComponentToTypeMaster.cs | ||
|---|---|---|
| 1 |
using System; |
|
| 2 |
using System.Collections.Generic; |
|
| 3 |
using System.Linq; |
|
| 4 |
using System.Text; |
|
| 5 |
using System.Collections; |
|
| 6 |
|
|
| 7 |
using log4net; |
|
| 8 |
using MySql.Data.MySqlClient; |
|
| 9 |
|
|
| 10 |
using ProcessManagement.DB.MySql; |
|
| 11 |
using ProcessManagement.DB.Core; |
|
| 12 |
using ProcessManagement.DataModel; |
|
| 13 |
|
|
| 14 |
using ProcessManagement.Common; |
|
| 15 |
|
|
| 16 |
namespace ProcessManagement.DB.IOAccess |
|
| 17 |
{
|
|
| 18 |
/// <summary> |
|
| 19 |
/// 構成工事種別関連マスタアクセスクラス |
|
| 20 |
/// </summary> |
|
| 21 |
public class IOMComponentToType : MySqlProcess |
|
| 22 |
{
|
|
| 23 |
#region 定義部 |
|
| 24 |
/// <summary> |
|
| 25 |
/// log4netログを使用する |
|
| 26 |
/// </summary> |
|
| 27 |
private static readonly ILog logger = LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); |
|
| 28 |
#endregion |
|
| 29 |
|
|
| 30 |
#region 定数 |
|
| 31 |
/// <summary> |
|
| 32 |
/// 構成工事種別関連マスタフィールド並び |
|
| 33 |
/// </summary> |
|
| 34 |
public enum NameColumn |
|
| 35 |
{
|
|
| 36 |
ComponentCode = 0, |
|
| 37 |
ItemCode, |
|
| 38 |
DisplayOrder, |
|
| 39 |
EntryDate, |
|
| 40 |
UpdateDate, |
|
| 41 |
} |
|
| 42 |
#endregion |
|
| 43 |
|
|
| 44 |
#region コンストラクタ |
|
| 45 |
/// <summary> |
|
| 46 |
/// コンストラクタ |
|
| 47 |
/// </summary> |
|
| 48 |
/// <param name="ConnectionString"></param> |
|
| 49 |
public IOMComponentToType() |
|
| 50 |
: base(DBCommon.Instance.DBConnectString) |
|
| 51 |
{
|
|
| 52 |
} |
|
| 53 |
|
|
| 54 |
#endregion |
|
| 55 |
|
|
| 56 |
#region 構成工事種別関連マスタ検索文字列作成 |
|
| 57 |
/// <summary> |
|
| 58 |
/// 構成工事種別関連マスタ検索文字列作成 |
|
| 59 |
/// </summary> |
|
| 60 |
/// <param name="AddSQLString">検索条件SQL文字列</param> |
|
| 61 |
/// <param name="data">構成工事種別関連マスタデータ</param> |
|
| 62 |
/// <returns>true:成功 false:失敗</returns> |
|
| 63 |
private string CreateSelectSQL() |
|
| 64 |
{
|
|
| 65 |
// SQL作成(DateTime型が変換できないのでCharに変換しておく) |
|
| 66 |
StringBuilder strcmd = new StringBuilder(); |
|
| 67 |
strcmd.Append("SELECT");
|
|
| 68 |
strcmd.Append(" ComponentCode");
|
|
| 69 |
strcmd.Append(", ItemCode");
|
|
| 70 |
strcmd.Append(", DisplayOrder");
|
|
| 71 |
strcmd.Append(", DATE_FORMAT(EntryDate, '%Y/%m/%d %H:%i:%s')");
|
|
| 72 |
strcmd.Append(", DATE_FORMAT(UpdateDate, '%Y/%m/%d %H:%i:%s')");
|
|
| 73 |
strcmd.Append(" FROM ComponentToTypeMaster");
|
|
| 74 |
|
|
| 75 |
return strcmd.ToString(); |
|
| 76 |
} |
|
| 77 |
#endregion |
|
| 78 |
|
|
| 79 |
#region 構成工事種別関連マスタ検索(複数) |
|
| 80 |
/// <summary> |
|
| 81 |
/// 構成工事種別関連マスタ検索(複数) |
|
| 82 |
/// </summary> |
|
| 83 |
/// <param name="AddSQLString"></param> |
|
| 84 |
/// <param name="data"></param> |
|
| 85 |
/// <param name="bConnect"></param> |
|
| 86 |
/// <returns></returns> |
|
| 87 |
public bool SelectAction(string AddSQLString, ref List<ComponentToTypeMaster> data, bool bConnect = true) |
|
| 88 |
{
|
|
| 89 |
// インターフェース |
|
| 90 |
StringBuilder strcmd = new StringBuilder(); |
|
| 91 |
ArrayList arData = new ArrayList(); |
|
| 92 |
|
|
| 93 |
try |
|
| 94 |
{
|
|
| 95 |
// SQL作成(DateTime型が変換できないのでCharに変換しておく) |
|
| 96 |
strcmd.AppendFormat("{0}{1}", CreateSelectSQL(), AddSQLString);
|
|
| 97 |
|
|
| 98 |
// SQL実行 |
|
| 99 |
if (!ExecuteReader(strcmd.ToString(), ref arData, bConnect)) return false; |
|
| 100 |
|
|
| 101 |
// データセット |
|
| 102 |
foreach (object[] objwrk in arData) |
|
| 103 |
{
|
|
| 104 |
ComponentToTypeMaster work = new ComponentToTypeMaster(); |
|
| 105 |
Reader2Struct(objwrk, ref work); |
|
| 106 |
data.Add(work); |
|
| 107 |
} |
|
| 108 |
|
|
| 109 |
return true; |
|
| 110 |
} |
|
| 111 |
catch (Exception ex) |
|
| 112 |
{
|
|
| 113 |
logger.ErrorFormat("システムエラー:{0}:{1}:{2}", CommonMotions.GetMethodName(2), ex.Message, strcmd.ToString());
|
|
| 114 |
return false; |
|
| 115 |
} |
|
| 116 |
|
|
| 117 |
} |
|
| 118 |
#endregion |
|
| 119 |
|
|
| 120 |
#region 構成工事種別関連マスタ検索(1件) |
|
| 121 |
/// <summary> |
|
| 122 |
/// 構成工事種別関連マスタ検索(1件) |
|
| 123 |
/// </summary> |
|
| 124 |
/// <param name="AddSQLString"></param> |
|
| 125 |
/// <param name="data"></param> |
|
| 126 |
/// <param name="bConnect"></param> |
|
| 127 |
/// <returns></returns> |
|
| 128 |
public bool SelectAction(string AddSQLString, ref ComponentToTypeMaster data, bool bConnect = true) |
|
| 129 |
{
|
|
| 130 |
// インターフェース |
|
| 131 |
StringBuilder strcmd = new StringBuilder(); |
|
| 132 |
ArrayList arData = new ArrayList(); |
|
| 133 |
|
|
| 134 |
try |
|
| 135 |
{
|
|
| 136 |
// SQL作成(DateTime型が変換できないのでCharに変換しておく) |
|
| 137 |
strcmd.AppendFormat("{0}{1}", CreateSelectSQL(), AddSQLString);
|
|
| 138 |
|
|
| 139 |
// SQL実行 |
|
| 140 |
if (!ExecuteReader(strcmd.ToString(), ref arData, bConnect)) return false; |
|
| 141 |
// データ無 |
|
| 142 |
if (arData.Count == 0) return false; |
|
| 143 |
|
|
| 144 |
// データセット |
|
| 145 |
foreach (object[] objwrk in arData) |
|
| 146 |
{
|
|
| 147 |
Reader2Struct(objwrk, ref data); |
|
| 148 |
break; |
|
| 149 |
} |
|
| 150 |
|
|
| 151 |
return true; |
|
| 152 |
} |
|
| 153 |
catch (Exception ex) |
|
| 154 |
{
|
|
| 155 |
logger.ErrorFormat("システムエラー:{0}:{1}:{2}", CommonMotions.GetMethodName(2), ex.Message, strcmd.ToString());
|
|
| 156 |
return false; |
|
| 157 |
} |
|
| 158 |
|
|
| 159 |
} |
|
| 160 |
#endregion |
|
| 161 |
|
|
| 162 |
#region 追加処理 |
|
| 163 |
/// <summary> |
|
| 164 |
/// 構成工事種別関連マスタ追加 |
|
| 165 |
/// </summary> |
|
| 166 |
/// <param name="data">構成工事種別関連マスタデータ</param> |
|
| 167 |
/// <returns>true:成功 false:失敗</returns> |
|
| 168 |
public bool InsertAction(ComponentToTypeMaster work, bool bConnect = true) |
|
| 169 |
{
|
|
| 170 |
StringBuilder strcmd = new StringBuilder(); |
|
| 171 |
try |
|
| 172 |
{
|
|
| 173 |
strcmd.Append("INSERT INTO ComponentToTypeMaster");
|
|
| 174 |
|
|
| 175 |
strcmd.Append(" VALUES (");
|
|
| 176 |
|
|
| 177 |
strcmd.AppendFormat(" {0}", work.ComponentCode.ToString());
|
|
| 178 |
strcmd.AppendFormat(", {0}", work.TypeCode.ToString());
|
|
| 179 |
|
|
| 180 |
strcmd.Append(", NOW()");
|
|
| 181 |
strcmd.Append(", NOW()");
|
|
| 182 |
strcmd.Append(")");
|
|
| 183 |
|
|
| 184 |
if (!ExecuteNonQuery(strcmd.ToString(), bConnect)) return false; |
|
| 185 |
|
|
| 186 |
return true; |
|
| 187 |
} |
|
| 188 |
catch (Exception ex) |
|
| 189 |
{
|
|
| 190 |
logger.ErrorFormat("システムエラー:{0}:{1}:{2}", CommonMotions.GetMethodName(2), ex.Message, strcmd.ToString());
|
|
| 191 |
return false; |
|
| 192 |
} |
|
| 193 |
} |
|
| 194 |
#endregion |
|
| 195 |
|
|
| 196 |
#region 構成工事種別関連マスタ追加 |
|
| 197 |
/// <summary> |
|
| 198 |
/// 構成工事種別関連マスタ追加 |
|
| 199 |
/// </summary> |
|
| 200 |
/// <param name="data">構成工事種別関連マスタデータ</param> |
|
| 201 |
/// <returns>true:成功 false:失敗</returns> |
|
| 202 |
public bool InsertAction(List<ComponentToTypeMaster> data, bool bConnect = true) |
|
| 203 |
{
|
|
| 204 |
StringBuilder strcmd = new StringBuilder(); |
|
| 205 |
try |
|
| 206 |
{
|
|
| 207 |
foreach (ComponentToTypeMaster work in data) |
|
| 208 |
{
|
|
| 209 |
InsertAction(work, bConnect); |
|
| 210 |
} |
|
| 211 |
return true; |
|
| 212 |
} |
|
| 213 |
catch (Exception ex) |
|
| 214 |
{
|
|
| 215 |
logger.ErrorFormat("システムエラー:{0}:{1}:{2}", CommonMotions.GetMethodName(2), ex.Message, strcmd.ToString());
|
|
| 216 |
return false; |
|
| 217 |
} |
|
| 218 |
} |
|
| 219 |
#endregion |
|
| 220 |
|
|
| 221 |
#region 構成工事種別関連マスタ更新 |
|
| 222 |
/// <summary> |
|
| 223 |
/// 構成工事種別関連マスタ更新 |
|
| 224 |
/// </summary> |
|
| 225 |
/// <param name="AddSQLString">更新条件SQL文字列</param> |
|
| 226 |
/// <param name="data">構成工事種別関連マスタデータ</param> |
|
| 227 |
/// <returns>true:成功 false:失敗</returns> |
|
| 228 |
public bool UpdateAction(string AddSQLString, ComponentToTypeMaster data, bool bConnect = true) |
|
| 229 |
{
|
|
| 230 |
StringBuilder strcmd = new StringBuilder(); |
|
| 231 |
try |
|
| 232 |
{
|
|
| 233 |
strcmd.Append("UPDATE ComponentToTypeMaster");
|
|
| 234 |
|
|
| 235 |
strcmd.Append(" SET");
|
|
| 236 |
|
|
| 237 |
strcmd.AppendFormat(" ComponentCode = {0}", data.ComponentCode.ToString());
|
|
| 238 |
strcmd.AppendFormat(",ItemCode = {0}", data.TypeCode.ToString());
|
|
| 239 |
|
|
| 240 |
strcmd.Append(", UpdateDate = NOW()");
|
|
| 241 |
strcmd.Append(AddSQLString); |
|
| 242 |
|
|
| 243 |
if (!ExecuteNonQuery(strcmd.ToString(), bConnect)) return false; |
|
| 244 |
|
|
| 245 |
return true; |
|
| 246 |
} |
|
| 247 |
catch (Exception ex) |
|
| 248 |
{
|
|
| 249 |
logger.ErrorFormat("システムエラー:{0}:{1}:{2}", CommonMotions.GetMethodName(2), ex.Message, strcmd.ToString());
|
|
| 250 |
return false; |
|
| 251 |
} |
|
| 252 |
} |
|
| 253 |
#endregion |
|
| 254 |
|
|
| 255 |
#region 構成工事種別関連マスタ削除 |
|
| 256 |
/// <summary> |
|
| 257 |
/// 構成工事種別関連マスタ削除 |
|
| 258 |
/// </summary> |
|
| 259 |
/// <param name="AddSQLString">削除条件SQL文字列</param> |
|
| 260 |
/// <param name="data">構成工事種別関連マスタデータ</param> |
|
| 261 |
/// <returns>true:成功 false:失敗</returns> |
|
| 262 |
public bool DeleteAction(string AddSQLString, bool bConnect = true) |
|
| 263 |
{
|
|
| 264 |
// インターフェース |
|
| 265 |
StringBuilder strcmd = new StringBuilder(); |
|
| 266 |
try |
|
| 267 |
{
|
|
| 268 |
strcmd.AppendFormat("{0}{1}", "DELETE FROM ComponentToTypeMaster", AddSQLString);
|
|
| 269 |
|
|
| 270 |
if (!ExecuteNonQuery(strcmd.ToString(), bConnect)) return false; |
|
| 271 |
|
|
| 272 |
return true; |
|
| 273 |
} |
|
| 274 |
catch (Exception ex) |
|
| 275 |
{
|
|
| 276 |
logger.ErrorFormat("システムエラー:{0}:{1}:{2}", CommonMotions.GetMethodName(2), ex.Message, strcmd.ToString());
|
|
| 277 |
return false; |
|
| 278 |
} |
|
| 279 |
} |
|
| 280 |
#endregion |
|
| 281 |
|
|
| 282 |
#region データセット |
|
| 283 |
/// <summary> |
|
| 284 |
/// MySQLDataReaderより構造体へセットする |
|
| 285 |
/// </summary> |
|
| 286 |
/// <param name="reader">MySQLDataReader</param> |
|
| 287 |
/// <param name="wrk">構造体</param> |
|
| 288 |
public void Reader2Struct(object[] objwrk, ref ComponentToTypeMaster wrk) |
|
| 289 |
{
|
|
| 290 |
try |
|
| 291 |
{
|
|
| 292 |
// データ取得 |
|
| 293 |
wrk.ComponentCode = CommonMotions.cnvInt(objwrk[(int)NameColumn.ComponentCode].ToString()); |
|
| 294 |
wrk.TypeCode = CommonMotions.cnvInt(objwrk[(int)NameColumn.ItemCode].ToString()); |
|
| 295 |
|
|
| 296 |
wrk.EntryDate = DateTime.Parse(objwrk[(int)NameColumn.EntryDate].ToString()); |
|
| 297 |
wrk.UpdateDate = DateTime.Parse(objwrk[(int)NameColumn.UpdateDate].ToString()); |
|
| 298 |
} |
|
| 299 |
catch (MySqlException myex) |
|
| 300 |
{
|
|
| 301 |
logger.ErrorFormat("MySQLエラー:{0}:{1}", CommonMotions.GetMethodName(2), myex.Message);
|
|
| 302 |
} |
|
| 303 |
catch (Exception ex) |
|
| 304 |
{
|
|
| 305 |
logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message);
|
|
| 306 |
} |
|
| 307 |
} |
|
| 308 |
|
|
| 309 |
#endregion |
|
| 310 |
|
|
| 311 |
#region 検索の文字列作成 |
|
| 312 |
/// <summary> |
|
| 313 |
/// 主キー検索の文字列を返す |
|
| 314 |
/// </summary> |
|
| 315 |
/// <param name="TypeCode">大工種キー</param> |
|
| 316 |
/// <returns>Where文字列</returns> |
|
| 317 |
public string CreatePrimarykeyString(int ComponentCode, int TypeCode=0) |
|
| 318 |
{
|
|
| 319 |
StringBuilder strWork = new StringBuilder(); |
|
| 320 |
try |
|
| 321 |
{
|
|
| 322 |
strWork.AppendFormat(" Where ComponentCode = {0}", ComponentCode);
|
|
| 323 |
if (TypeCode != 0) |
|
| 324 |
strWork.AppendFormat(" And TypeCode = {0}", TypeCode);
|
|
| 325 |
} |
|
| 326 |
catch (Exception ex) |
|
| 327 |
{
|
|
| 328 |
logger.ErrorFormat("システムエラー:{0}:{1}:{2}", CommonMotions.GetMethodName(2), ex.Message, strWork);
|
|
| 329 |
} |
|
| 330 |
|
|
| 331 |
return strWork.ToString(); |
|
| 332 |
} |
|
| 333 |
#endregion |
|
| 334 |
} |
|
| 335 |
} |
|
| branches/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOMBudgetSumCode.cs | ||
|---|---|---|
| 1 |
using System; |
|
| 2 |
using System.Collections.Generic; |
|
| 3 |
using System.Linq; |
|
| 4 |
using System.Text; |
|
| 5 |
using System.Data; |
|
| 6 |
using System.Collections; |
|
| 7 |
|
|
| 8 |
using log4net; |
|
| 9 |
using MySql.Data.MySqlClient; |
|
| 10 |
|
|
| 11 |
using ProcessManagement.DB.MySql; |
|
| 12 |
using ProcessManagement.DB.Core; |
|
| 13 |
using ProcessManagement.DataModel; |
|
| 14 |
using ProcessManagement.Common; |
|
| 15 |
|
|
| 16 |
namespace ProcessManagement.DB.IOAccess |
|
| 17 |
{
|
|
| 18 |
/// <summary> |
|
| 19 |
/// 予算書集計コードマスタDBアクセス |
|
| 20 |
/// </summary> |
|
| 21 |
public class IOMBudgetSumCode : MySqlProcess |
|
| 22 |
{
|
|
| 23 |
#region 定義部 |
|
| 24 |
/// <summary> |
|
| 25 |
/// log4netログを使用する |
|
| 26 |
/// </summary> |
|
| 27 |
private static readonly ILog logger = LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); |
|
| 28 |
#endregion |
|
| 29 |
|
|
| 30 |
#region 定数 |
|
| 31 |
/// <summary> |
|
| 32 |
/// 予算書集計コードマスタフィールド並び |
|
| 33 |
/// </summary> |
|
| 34 |
public enum TableColumn |
|
| 35 |
{
|
|
| 36 |
BlockCode, // ブロック番号 |
|
| 37 |
GroupCode, // グループ番号 |
|
| 38 |
ComponentCode, // 構成キー |
|
| 39 |
ItemCode, // 工種キー |
|
| 40 |
ElementsName, // 構成名称 |
|
| 41 |
|
|
他の形式にエクスポート: Unified diff