リビジョン 5
初期投入
| tags/src_20160810/ProcessManagement/ProcessManagement/Common/CommonDefine.cs | ||
|---|---|---|
| 1 |
using System; |
|
| 2 |
using System.Collections.Generic; |
|
| 3 |
using System.Linq; |
|
| 4 |
using System.Text; |
|
| 5 |
using System.Diagnostics; |
|
| 6 |
using System.Windows.Forms; |
|
| 7 |
using System.Drawing; |
|
| 8 |
using System.IO; |
|
| 9 |
using System.Text.RegularExpressions; |
|
| 10 |
using System.Data; |
|
| 11 |
using System.Security.Cryptography; |
|
| 12 |
using System.Globalization; |
|
| 13 |
|
|
| 14 |
namespace ProcessManagement.Common |
|
| 15 |
{
|
|
| 16 |
/// <summary> |
|
| 17 |
/// 全体共通定義 |
|
| 18 |
/// </summary> |
|
| 19 |
public static class CommonDefine |
|
| 20 |
{
|
|
| 21 |
#region テスト起動フラグ定義 |
|
| 22 |
// false時システム更新・起動チェックが起動されない |
|
| 23 |
/// <summary> |
|
| 24 |
/// テスト実行フラグ |
|
| 25 |
/// </summary> |
|
| 26 |
public static bool m_ProductionExecution = true; |
|
| 27 |
#endregion |
|
| 28 |
|
|
| 29 |
#region システム更新対象名称 |
|
| 30 |
/// <summary> |
|
| 31 |
/// 監視対象プロセス名 |
|
| 32 |
/// </summary> |
|
| 33 |
public const string s_TargetProcess = "現場監督秘書"; |
|
| 34 |
#endregion |
|
| 35 |
|
|
| 36 |
#region システム更新処理使用定義 |
|
| 37 |
/// <summary> |
|
| 38 |
/// パスを定数で定義する |
|
| 39 |
/// </summary> |
|
| 40 |
public const string s_UPDATE_FILE_PATH = @"Z:\52GenbaKantokuHisyo"; |
|
| 41 |
//public const string s_UPDATE_FILE_PATH = @"Z:\5-2現場監督秘書"; |
|
| 42 |
//private const string s_UPDATE_FILE_PATH = @"Z:\⑤IT事業部用\Debug"; |
|
| 43 |
public const string s_UPDATECOPY_NAME = "UpDateCopy.exe"; |
|
| 44 |
#endregion |
|
| 45 |
|
|
| 46 |
#region システム定義ファイルパス |
|
| 47 |
/// <summary> |
|
| 48 |
/// 工事管理システム定義ファイル名 |
|
| 49 |
/// </summary> |
|
| 50 |
public static readonly string s_DefinitionFileName = @".\ProcessManagement.xml"; |
|
| 51 |
#endregion |
|
| 52 |
|
|
| 53 |
#region 住所検索ファイルパス |
|
| 54 |
/// <summary> |
|
| 55 |
/// 住所ファイル |
|
| 56 |
/// </summary> |
|
| 57 |
public static string s_AddressFilePath = System.Environment.CurrentDirectory + @".\KEN_ALL.CSV"; |
|
| 58 |
public static string s_AddressWorkInput = @"D:\Temp\_KEN_ALL.CSV"; |
|
| 59 |
public static string s_AddressWorkOutput = @"D:\Temp\KEN_ALL.CSV"; |
|
| 60 |
//public static string s_AddressFilePath = "C:\\temp\\KEN_ALL.CSV"; |
|
| 61 |
#endregion |
|
| 62 |
|
|
| 63 |
#region システムセキュリティ定義 |
|
| 64 |
/// <summary> |
|
| 65 |
/// システム管理者パスワード |
|
| 66 |
/// </summary> |
|
| 67 |
public static int AdminCode = 88889988; |
|
| 68 |
public static string AdminUser = "Admin"; |
|
| 69 |
public static string AdminPass = "Admin"; |
|
| 70 |
public static int AdminSecurityManagement = -1; |
|
| 71 |
|
|
| 72 |
/// <summary> |
|
| 73 |
/// 機密管理番号 |
|
| 74 |
/// </summary> |
|
| 75 |
public enum SysManaDivNo |
|
| 76 |
{
|
|
| 77 |
/// <summary> |
|
| 78 |
/// 最高責任者 |
|
| 79 |
/// </summary> |
|
| 80 |
PresidentAuthority = 0, |
|
| 81 |
/// <summary> |
|
| 82 |
/// 統括責任者 |
|
| 83 |
/// </summary> |
|
| 84 |
SupervisorAuthority, |
|
| 85 |
/// <summary> |
|
| 86 |
/// 所 属 長 |
|
| 87 |
/// </summary> |
|
| 88 |
SuperiorAuthority, |
|
| 89 |
/// <summary> |
|
| 90 |
/// 一般使用者 |
|
| 91 |
/// </summary> |
|
| 92 |
UserAuthority, |
|
| 93 |
} |
|
| 94 |
/// <summary> |
|
| 95 |
/// 機密管理区分 |
|
| 96 |
/// </summary> |
|
| 97 |
public static List<KeyValuePair<int, string>> SystemManageDiv = new List<KeyValuePair<int, string>>{
|
|
| 98 |
new KeyValuePair<int,string>(1,"最高責任者"), |
|
| 99 |
new KeyValuePair<int,string>(2,"統括責任者"), |
|
| 100 |
new KeyValuePair<int,string>(3,"所 属 長"), |
|
| 101 |
new KeyValuePair<int,string>(4,"一般使用者")}; |
|
| 102 |
#region 旧機密区分名称 |
|
| 103 |
//public static List<KeyValuePair<int, string>> SecurityManagementDivision = new List<KeyValuePair<int, string>>{
|
|
| 104 |
// new KeyValuePair<int,string>(1,"最高機密管理者"), |
|
| 105 |
// new KeyValuePair<int,string>(2,"統括機密管理者"), |
|
| 106 |
// new KeyValuePair<int,string>(3,"機密管理者"), |
|
| 107 |
// new KeyValuePair<int,string>(4,"一般使用者")}; |
|
| 108 |
#endregion |
|
| 109 |
#endregion |
|
| 110 |
|
|
| 111 |
#region エクセル使用時パス |
|
| 112 |
/// <summary> |
|
| 113 |
/// EXCELテンプレートファイル名 |
|
| 114 |
/// </summary> |
|
| 115 |
public static string s_ExcelOriginalFileName = @"\ProcessManage.xlsx"; |
|
| 116 |
/// <summary> |
|
| 117 |
/// エクセルフォルダ名 |
|
| 118 |
/// </summary> |
|
| 119 |
public static string s_ExecCurrentDirName = @"C:\Users\Default\Desktop\"; |
|
| 120 |
public static string s_SaveExecl = @"SaveExcel"; |
|
| 121 |
public static string s_ExecExcelDirName = @"見積もりエクセルデータ"; |
|
| 122 |
#endregion |
|
| 123 |
|
|
| 124 |
#region ワード使用時パス |
|
| 125 |
/// <summary> |
|
| 126 |
/// ワードフォルダ名 |
|
| 127 |
/// </summary> |
|
| 128 |
public static string s_SaveWord = @"SaveWord"; |
|
| 129 |
public static string s_ExecWordDirName = @"ワードデータ"; |
|
| 130 |
#endregion |
|
| 131 |
|
|
| 132 |
#region 保存ファイルタイプ |
|
| 133 |
/// <summary> |
|
| 134 |
/// 保存ファイルタイプ |
|
| 135 |
/// </summary> |
|
| 136 |
public enum SaveFileType |
|
| 137 |
{
|
|
| 138 |
/// <summary> |
|
| 139 |
/// EXCELファイル |
|
| 140 |
/// </summary> |
|
| 141 |
ExcelFile = 0, |
|
| 142 |
/// <summary> |
|
| 143 |
/// WORDファイル |
|
| 144 |
/// </summary> |
|
| 145 |
WordFile, |
|
| 146 |
} |
|
| 147 |
#endregion |
|
| 148 |
|
|
| 149 |
#region エラー・正常時の背景色定義 |
|
| 150 |
/// <summary> |
|
| 151 |
/// フィールドカラー |
|
| 152 |
/// </summary> |
|
| 153 |
/// <summary> |
|
| 154 |
/// エラー時色 |
|
| 155 |
/// </summary> |
|
| 156 |
public static Color s_clrError = Color.Red; |
|
| 157 |
/// <summary> |
|
| 158 |
/// 正常時色 |
|
| 159 |
/// </summary> |
|
| 160 |
public static Color s_clrNormal = Color.White; |
|
| 161 |
#endregion |
|
| 162 |
|
|
| 163 |
#region 掲示板:関連定義 |
|
| 164 |
/// <summary> |
|
| 165 |
/// 掲示板グリッド返信文字 |
|
| 166 |
/// </summary> |
|
| 167 |
public static string[] s_PageType1GridResString = new string[] { "返信あり", "Re:" };
|
|
| 168 |
|
|
| 169 |
/// <summary> |
|
| 170 |
/// 掲示板 システムメッセージ名称・コード |
|
| 171 |
/// </summary> |
|
| 172 |
public static int s_MsgBoardSystemCode = 99999998; |
|
| 173 |
public static string s_MsgBoardSystemNameFormat = "{0}からの連絡";
|
|
| 174 |
|
|
| 175 |
/// <summary> |
|
| 176 |
/// メッセージ全員対象 |
|
| 177 |
/// </summary> |
|
| 178 |
public static string s_AllMembersString = "全 員"; |
|
| 179 |
public static int s_AllMembersCode = 99999999; |
|
| 180 |
|
|
| 181 |
/// <summary> |
|
| 182 |
/// 社長室コード(部署コード) |
|
| 183 |
/// </summary> |
|
| 184 |
public static int s_PresidentsOffice = 7; |
|
| 185 |
|
|
| 186 |
/// <summary> |
|
| 187 |
/// 総務部コード(部署コード) |
|
| 188 |
/// </summary> |
|
| 189 |
public static int s_GeneralAffairsDevision = 4; |
|
| 190 |
|
|
| 191 |
/// <summary> |
|
| 192 |
/// メッセージリンク区分 |
|
| 193 |
/// </summary> |
|
| 194 |
public enum LinkType |
|
| 195 |
{
|
|
| 196 |
/// <summary> |
|
| 197 |
/// リンク無 |
|
| 198 |
/// </summary> |
|
| 199 |
Nothing = 0, |
|
| 200 |
/// <summary> |
|
| 201 |
/// 工事情報 |
|
| 202 |
/// </summary> |
|
| 203 |
ConstructionInfo, |
|
| 204 |
} |
|
| 205 |
|
|
| 206 |
/// <summary> |
|
| 207 |
/// メッセージフラグ区分 |
|
| 208 |
/// </summary> |
|
| 209 |
public enum MessageFlg |
|
| 210 |
{
|
|
| 211 |
/// <summary> |
|
| 212 |
/// 通常メッセージ |
|
| 213 |
/// </summary> |
|
| 214 |
Normal = 0, |
|
| 215 |
/// <summary> |
|
| 216 |
/// 秘書からの連絡メッセージ |
|
| 217 |
/// </summary> |
|
| 218 |
Secretary, |
|
| 219 |
} |
|
| 220 |
#endregion |
|
| 221 |
|
|
| 222 |
#region 行動予定 会社行事名称・コード |
|
| 223 |
/// <summary> |
|
| 224 |
/// 行動予定 会社行事名称・コード |
|
| 225 |
/// </summary> |
|
| 226 |
public static int s_CompanyActionCode = 99999999; |
|
| 227 |
public static string s_CompanyActionName = " 会 社 行 事 "; |
|
| 228 |
#endregion |
|
| 229 |
|
|
| 230 |
#region 行動予定 部署行事名称・コード |
|
| 231 |
/// <summary> |
|
| 232 |
/// 行動予定 部署行事名称・コード |
|
| 233 |
/// </summary> |
|
| 234 |
public static int s_DivisionActionCode = 99999998; |
|
| 235 |
public static string s_DivisionActionName = "検査・安全パトロール"; |
|
| 236 |
#endregion |
|
| 237 |
|
|
| 238 |
#region 印刷処理:戻り値定義 |
|
| 239 |
/// <summary> |
|
| 240 |
/// 返答値番号 |
|
| 241 |
/// </summary> |
|
| 242 |
public enum RetunAnswer |
|
| 243 |
{
|
|
| 244 |
Answer0 = 0, |
|
| 245 |
Answer1, |
|
| 246 |
Answer2, |
|
| 247 |
Answer3, |
|
| 248 |
Answer4, |
|
| 249 |
Answer5, |
|
| 250 |
Answer6, |
|
| 251 |
Answer7, |
|
| 252 |
Answer8, |
|
| 253 |
Answer9, |
|
| 254 |
AnswerA, |
|
| 255 |
AnswerB, |
|
| 256 |
AnswerC, |
|
| 257 |
AnswerE, |
|
| 258 |
AnswerF, |
|
| 259 |
} |
|
| 260 |
#endregion |
|
| 261 |
|
|
| 262 |
#region 担当者マスタ:社員区分 |
|
| 263 |
/// <summary> |
|
| 264 |
/// 社員区分 |
|
| 265 |
/// </summary> |
|
| 266 |
public enum EmployeeClassFlg |
|
| 267 |
{
|
|
| 268 |
/// <summary> |
|
| 269 |
/// 不定 |
|
| 270 |
/// </summary> |
|
| 271 |
None = 0, |
|
| 272 |
/// <summary> |
|
| 273 |
/// 正社員 |
|
| 274 |
/// </summary> |
|
| 275 |
Regular, |
|
| 276 |
/// <summary> |
|
| 277 |
/// 外注者 |
|
| 278 |
/// </summary> |
|
| 279 |
OutSource, |
|
| 280 |
} |
|
| 281 |
#endregion |
|
| 282 |
|
|
| 283 |
#region 法人格マスタ:法人格名称位置定義 |
|
| 284 |
/// <summary> |
|
| 285 |
/// 法人格名称位置 |
|
| 286 |
/// </summary> |
|
| 287 |
public enum StatusNamePoint |
|
| 288 |
{
|
|
| 289 |
None = 0, |
|
| 290 |
Forword, |
|
| 291 |
Back, |
|
| 292 |
} |
|
| 293 |
#endregion |
|
| 294 |
|
|
| 295 |
#region 区分マスタ:データ分け区分 |
|
| 296 |
/// <summary> |
|
| 297 |
/// 区分マスタ区分 |
|
| 298 |
/// </summary> |
|
| 299 |
public enum DivisionMasterCodeDefine |
|
| 300 |
{
|
|
| 301 |
OrderDivision = 1, // 発注者区分登録 |
|
| 302 |
ConstructionClass = 2, // 工事種別登録 |
|
| 303 |
ConstructionExpenses = 3, // 工事経費名称登録 |
|
| 304 |
} |
|
| 305 |
/// <summary> |
|
| 306 |
/// 区分マスタ区分キー |
|
| 307 |
/// </summary> |
|
| 308 |
public static Dictionary<int, string> DivisionMasterCode = new Dictionary<int, string>(){
|
|
| 309 |
{1, "発注者区分登録"},
|
|
| 310 |
{2, "工事種別登録"},
|
|
| 311 |
{3, "工事経費名称登録"},
|
|
| 312 |
}; |
|
| 313 |
#endregion |
|
| 314 |
|
|
| 315 |
#region 期限マスタ:日付チェックタイミング |
|
| 316 |
/// <summary> |
|
| 317 |
/// 期限マスタ:日付チェックタイミング |
|
| 318 |
/// </summary> |
|
| 319 |
public enum TermDateCheckTiming |
|
| 320 |
{
|
|
| 321 |
/// <summary> |
|
| 322 |
/// 0:前日以前 |
|
| 323 |
/// </summary> |
|
| 324 |
CheckSchdule0 = 0, |
|
| 325 |
/// <summary> |
|
| 326 |
/// 1:当日 |
|
| 327 |
/// </summary> |
|
| 328 |
CheckSchdule1, |
|
| 329 |
/// <summary> |
|
| 330 |
/// 2:後日以降 |
|
| 331 |
/// </summary> |
|
| 332 |
CheckSchdule2, |
|
| 333 |
/// <summary> |
|
| 334 |
/// 3:後日以降継続 |
|
| 335 |
/// </summary> |
|
| 336 |
CheckSchdule3, |
|
| 337 |
} |
|
| 338 |
#endregion |
|
| 339 |
|
|
| 340 |
#region 期限マスタ:背景・文字色指定定義 |
|
| 341 |
/// <summary> |
|
| 342 |
/// 色の使用場所指定 |
|
| 343 |
/// </summary> |
|
| 344 |
public enum PalceOfColor |
|
| 345 |
{
|
|
| 346 |
BackColor = 0, // 背景色 |
|
| 347 |
ForeColor, // 文字色 |
|
| 348 |
OtherColor, // その他色 |
|
| 349 |
} |
|
| 350 |
#endregion |
|
| 351 |
|
|
| 352 |
#region 工事種別マスタ:公共工事種別 |
|
| 353 |
/// <summary> |
|
| 354 |
/// 工事種別マスタ:公共工事種別 |
|
| 355 |
/// </summary> |
|
| 356 |
public enum ConstructionType |
|
| 357 |
{
|
|
| 358 |
/// <summary> |
|
| 359 |
/// 0:その他 |
|
| 360 |
/// </summary> |
|
| 361 |
Other = 0, |
|
| 362 |
/// <summary> |
|
| 363 |
/// 1:公共 |
|
| 364 |
/// </summary> |
|
| 365 |
Community, |
|
| 366 |
/// <summary> |
|
| 367 |
/// 2:民間 |
|
| 368 |
/// </summary> |
|
| 369 |
Popular, |
|
| 370 |
} |
|
| 371 |
#endregion |
|
| 372 |
|
|
| 373 |
#region 承認処理:承認状態 |
|
| 374 |
/// <summary> |
|
| 375 |
/// 承認状態 |
|
| 376 |
/// </summary> |
|
| 377 |
public enum ApprovalStatus |
|
| 378 |
{
|
|
| 379 |
/// <summary> |
|
| 380 |
/// 申請中 |
|
| 381 |
/// </summary> |
|
| 382 |
Petition = 0, |
|
| 383 |
/// <summary> |
|
| 384 |
/// 保 留 |
|
| 385 |
/// </summary> |
|
| 386 |
Pending, |
|
| 387 |
/// <summary> |
|
| 388 |
/// 承 認 |
|
| 389 |
/// </summary> |
|
| 390 |
Approval, |
|
| 391 |
/// <summary> |
|
| 392 |
/// 不承認 |
|
| 393 |
/// </summary> |
|
| 394 |
NotApproval, |
|
| 395 |
/// <summary> |
|
| 396 |
/// 未 定 |
|
| 397 |
/// </summary> |
|
| 398 |
Undecided, |
|
| 399 |
/// <summary> |
|
| 400 |
/// 未申請 |
|
| 401 |
/// </summary> |
|
| 402 |
Unclaimed, |
|
| 403 |
} |
|
| 404 |
/// <summary> |
|
| 405 |
/// 申請状態色 |
|
| 406 |
/// </summary> |
|
| 407 |
public static Color[] ApprovalBackColorStatusColor = new Color[] { Color.Blue, Color.Yellow, Color.MediumSpringGreen, Color.Red, Color.LightSkyBlue, Color.LightBlue };
|
|
| 408 |
public static Color[] ApprovalForeColorStatusColor = new Color[] { Color.White, Color.Black, Color.Black, Color.Black, Color.Black, Color.Black };
|
|
| 409 |
|
|
| 410 |
/// <summary> |
|
| 411 |
/// 承認状態文字 |
|
| 412 |
/// </summary> |
|
| 413 |
public static readonly string[] ApprovalStatusString = new string[] { "申請中", "保 留", "承 認", "不承認", "未 定", "未申請" };
|
|
| 414 |
/// <summary> |
|
| 415 |
/// 申請ボタン表示文字 |
|
| 416 |
/// </summary> |
|
| 417 |
public static readonly string[] PetitionButtonString = new string[] { "未申請", "申請済" };
|
|
| 418 |
/// <summary> |
|
| 419 |
/// 承認ボタン表示文字 |
|
| 420 |
/// </summary> |
|
| 421 |
public static readonly string[] ApprovalButtonString = new string[] { "未承認", "承認済", "不承認" };
|
|
| 422 |
#endregion |
|
| 423 |
|
|
| 424 |
#region 起動時チェック:関連定義 |
|
| 425 |
/// <summary> |
|
| 426 |
/// 起動時日付チェックを必要とする処理のキー |
|
| 427 |
/// </summary> |
|
| 428 |
public static Dictionary<int, string> ExePrimaryCode = new Dictionary<int, string>() { { 1, "初回起動日付" } };
|
|
| 429 |
#endregion |
|
| 430 |
|
|
| 431 |
#region 管理マスタ:工事番号基準値 |
|
| 432 |
/// <summary> |
|
| 433 |
/// 工事番号基準値 0:営業期数 1:工事年度 |
|
| 434 |
/// </summary> |
|
| 435 |
public enum SystemConstructionNoBase |
|
| 436 |
{
|
|
| 437 |
/// <summary> |
|
| 438 |
/// 0:営業期数 |
|
| 439 |
/// </summary> |
|
| 440 |
BusinessPeriod = 0, |
|
| 441 |
/// <summary> |
|
| 442 |
/// 1:工事年度 |
|
| 443 |
/// </summary> |
|
| 444 |
ConstructionYear, |
|
| 445 |
} |
|
| 446 |
#endregion |
|
| 447 |
|
|
| 448 |
#region 工事基本情報:施工案件状態定義 |
|
| 449 |
/// <summary> |
|
| 450 |
/// 施工案件状態 |
|
| 451 |
/// </summary> |
|
| 452 |
#region 旧施工案件状態 |
|
| 453 |
//public static Dictionary<int, string> ConstructionProjectsStatus_OLD = new Dictionary<int, string>() |
|
| 454 |
// {
|
|
| 455 |
// {0, "依頼受"},
|
|
| 456 |
// {1, "見積提出"},
|
|
| 457 |
// {2, "受注"},
|
|
| 458 |
// {3, "非受注"},
|
|
| 459 |
// {4, "施工開始"},
|
|
| 460 |
// {5, "施工完了"},
|
|
| 461 |
// {6, "入札物件"},
|
|
| 462 |
// {7, "営繕部継続工事"},
|
|
| 463 |
// }; |
|
| 464 |
//public static Dictionary<int, string> ConstructionProjectsStatus = new Dictionary<int, string>() 入札物件追加 |
|
| 465 |
// {
|
|
| 466 |
// {0, "依頼受"},
|
|
| 467 |
// {1, "入札物件"},
|
|
| 468 |
// {2, "見積提出"},
|
|
| 469 |
// {3, "受注"},
|
|
| 470 |
// {4, "営繕部継続工事"},
|
|
| 471 |
// {5, "施工開始"},
|
|
| 472 |
// {6, "施工完了"},
|
|
| 473 |
// {7, "非受注"},
|
|
| 474 |
// }; |
|
| 475 |
//public static Dictionary<int, string> ConstructionProjectsStatus = new Dictionary<int, string>() 12/02 入札物件見積種別へ移動 |
|
| 476 |
// {
|
|
| 477 |
// {0, "依頼受"},
|
|
| 478 |
// {1, "入札物件"},
|
|
| 479 |
// {2, "見積提出"},
|
|
| 480 |
// {3, "受注"},
|
|
| 481 |
// {4, "受注-部署引継中"},
|
|
| 482 |
// {5, "施工開始"},
|
|
| 483 |
// {6, "施工完了"},
|
|
| 484 |
// {7, "非受注"},
|
|
| 485 |
// {8, "営繕部継続工事"},
|
|
| 486 |
// }; |
|
| 487 |
//public static Dictionary<int, string> ConstructionProjectsStatus = new Dictionary<int, string>() 12/11 施工準備・請求準備追加 |
|
| 488 |
// {
|
|
| 489 |
// {0, "依頼受け中"}, // 1
|
|
| 490 |
// {1, "見積提出"}, // 2
|
|
| 491 |
// {2, "受注-部署引継中"}, // 3
|
|
| 492 |
// {3, "受 注"}, // 4
|
|
| 493 |
// {4, "施工開始"}, // 6
|
|
| 494 |
// {5, "施工完了"}, // 7
|
|
| 495 |
// {6, "営繕部継続工事"}, // 8
|
|
| 496 |
// {7, "非 受 注"}, // 5
|
|
| 497 |
// {8, "請求完了"}, // 9
|
|
| 498 |
// }; |
|
| 499 |
//public static Dictionary<int, string> ConstructionProjectsStatus = new Dictionary<int, string>(){ 12/16 仮受注追加
|
|
| 500 |
// {0, "依頼受け中"}, // 0
|
|
| 501 |
// {1, "見積提出"}, // 1
|
|
| 502 |
// {2, "営繕部継続工事"}, // 8
|
|
| 503 |
// {3, "受 注"}, // 2
|
|
| 504 |
// {4, "部署引継"}, // 4
|
|
| 505 |
// {5, "施工準備"}, // 5
|
|
| 506 |
// {6, "施工開始"}, // 6
|
|
| 507 |
// {7, "施工完了"}, // 7
|
|
| 508 |
// {8, "請求準備"}, // 9
|
|
| 509 |
// {9, "請求完了"}, // 10
|
|
| 510 |
// {10, "非 受 注"}, // 3
|
|
| 511 |
// }; |
|
| 512 |
#endregion |
|
| 513 |
public static readonly Dictionary<int, string> ProjectsStatus = new Dictionary<int, string>(){
|
|
| 514 |
{0, "依頼受け中"}, // 工事基本情報ラジオボタン:0
|
|
| 515 |
{1, "見積提出"}, // 工事基本情報ラジオボタン:1
|
|
| 516 |
{2, "営繕部継続工事"}, // 工事基本情報ラジオボタン:8
|
|
| 517 |
{3, "仮 受 注"}, // 工事基本情報ラジオボタン:11
|
|
| 518 |
{4, "受 注"}, // 工事基本情報ラジオボタン:2
|
|
| 519 |
{5, "部署引継"}, // 工事基本情報ラジオボタン:4
|
|
| 520 |
{6, "施工準備"}, // 工事基本情報ラジオボタン:5
|
|
| 521 |
{7, "施工開始"}, // 工事基本情報ラジオボタン:6
|
|
| 522 |
{8, "施工完了"}, // 工事基本情報ラジオボタン:7
|
|
| 523 |
{9, "請求準備"}, // 工事基本情報ラジオボタン:9
|
|
| 524 |
{10, "請求完了"}, // 工事基本情報ラジオボタン:10
|
|
| 525 |
{11, "非 受 注"}, // 工事基本情報ラジオボタン:3
|
|
| 526 |
{12, "総務入金確認"}, // 工事基本情報ラジオボタン:12
|
|
| 527 |
{13, "担当者入金確認完了"}, // 工事基本情報ラジオボタン:13
|
|
| 528 |
}; |
|
| 529 |
#endregion |
|
| 530 |
|
|
| 531 |
#region 工事基本情報:日付項目テーブル |
|
| 532 |
#region 旧データ |
|
| 533 |
//public static Dictionary<int, string> BaseInfoDateNameNo = new Dictionary<int, string>(){ 2016/01/05 14:開始予定日追加->5:へ移動
|
|
| 534 |
// {1,"RequestedDate"},
|
|
| 535 |
// {2,"EstimatesSubmitDeadline"},
|
|
| 536 |
// {3,"EstimatesSubmittedDate"},
|
|
| 537 |
// {4,"OrderDate"},
|
|
| 538 |
// {5,"OrderCompletionDate"},
|
|
| 539 |
// {6,"ConstructionStartingDate"},
|
|
| 540 |
// {7,"ConstructionCompletionDate"},
|
|
| 541 |
// {8,"TransferConstructionDate"},
|
|
| 542 |
// {9,"EstimatesExpirationDate"},
|
|
| 543 |
// {10,"ConstructionPeriodStart"},
|
|
| 544 |
// {11,"ConstructionPeriodEnd"},
|
|
| 545 |
// {12,"BillingStartDate"},
|
|
| 546 |
// {13,"BillingDate"},
|
|
| 547 |
// {14, "OrderStartingDate"},
|
|
| 548 |
// }; |
|
| 549 |
//public static Dictionary<string, int> BaseInfoDateNoName = new Dictionary<string, int>(){
|
|
| 550 |
// {"RequestedDate", 1},
|
|
| 551 |
// {"EstimatesSubmitDeadline", 2},
|
|
| 552 |
// {"EstimatesSubmittedDate", 3},
|
|
| 553 |
// {"OrderDate", 4},
|
|
| 554 |
// {"OrderCompletionDate", 5},
|
|
| 555 |
// {"ConstructionStartingDate", 6},
|
|
| 556 |
// {"ConstructionCompletionDate", 7},
|
|
| 557 |
// {"TransferConstructionDate", 8},
|
|
| 558 |
// {"EstimatesExpirationDate", 9},
|
|
| 559 |
// {"ConstructionPeriodStart",10},
|
|
| 560 |
// {"ConstructionPeriodEnd", 11},
|
|
| 561 |
// {"BillingStartDate",12},
|
|
| 562 |
// {"BillingDate", 13},
|
|
| 563 |
// {"OrderStartingDate", 14},
|
|
| 564 |
// }; |
|
| 565 |
///// <summary> |
|
| 566 |
///// 工事基本情報日付項目名称テーブル |
|
| 567 |
///// </summary> |
|
| 568 |
//public static Dictionary<string, string> BaseInfoDateName = new Dictionary<string, string>(){
|
|
| 569 |
// {"RequestedDate","依頼受け日"},
|
|
| 570 |
// {"EstimatesSubmitDeadline","見積提出期限"},
|
|
| 571 |
// {"EstimatesSubmittedDate","見積提出日"},
|
|
| 572 |
// {"OrderDate","受注日"},
|
|
| 573 |
// {"OrderCompletionDate","完了予定日"},
|
|
| 574 |
// {"ConstructionStartingDate","施工開始日"},
|
|
| 575 |
// {"ConstructionCompletionDate","施工完了日"},
|
|
| 576 |
// {"TransferConstructionDate","工事移管日"},
|
|
| 577 |
// {"EstimatesExpirationDate","見積有効期限"},
|
|
| 578 |
// {"ConstructionPeriodStart","契約工期開始"},
|
|
| 579 |
// {"ConstructionPeriodEnd","契約工期完了"},
|
|
| 580 |
// {"BillingStartDate","請求準備開始日"},
|
|
| 581 |
// {"BillingDate", "請求日"},
|
|
| 582 |
// {"OrderStartingDate","開始予定日"},
|
|
| 583 |
// }; |
|
| 584 |
#endregion |
|
| 585 |
/// <summary> |
|
| 586 |
/// 工事基本情報日付項目テーブル |
|
| 587 |
/// </summary> |
|
| 588 |
public static Dictionary<int, string> BaseInfoDateNameNo = new Dictionary<int, string>(){
|
|
| 589 |
{1,"RequestedDate"},
|
|
| 590 |
{2,"EstimatesSubmitDeadline"},
|
|
| 591 |
{3,"EstimatesSubmittedDate"},
|
|
| 592 |
{4,"OrderDate"},
|
|
| 593 |
{5, "OrderStartingDate"},
|
|
| 594 |
{6,"OrderCompletionDate"},
|
|
| 595 |
{7,"ConstructionStartingDate"},
|
|
| 596 |
{8,"ConstructionCompletionDate"},
|
|
| 597 |
{9,"TransferConstructionDate"},
|
|
| 598 |
{10,"EstimatesExpirationDate"},
|
|
| 599 |
{11,"ConstructionPeriodStart"},
|
|
| 600 |
{12,"ConstructionPeriodEnd"},
|
|
| 601 |
{13,"BillingStartDate"},
|
|
| 602 |
{14,"BillingDate"},
|
|
| 603 |
}; |
|
| 604 |
/// <summary> |
|
| 605 |
/// 工事基本情報日付項目名称テーブル |
|
| 606 |
/// </summary> |
|
| 607 |
public static Dictionary<string, string> BaseInfoDateName = new Dictionary<string, string>(){
|
|
| 608 |
{"RequestedDate","依頼受け日"},
|
|
| 609 |
{"EstimatesSubmitDeadline","見積提出期限"},
|
|
| 610 |
{"EstimatesSubmittedDate","見積提出日"},
|
|
| 611 |
{"OrderDate","受注日"},
|
|
| 612 |
{"OrderStartingDate","開始予定日"},
|
|
| 613 |
{"OrderCompletionDate","完了予定日"},
|
|
| 614 |
{"ConstructionStartingDate","施工開始日"},
|
|
| 615 |
{"ConstructionCompletionDate","施工完了日"},
|
|
| 616 |
{"TransferConstructionDate","工事移管日"},
|
|
| 617 |
{"EstimatesExpirationDate","見積有効期限"},
|
|
| 618 |
{"ConstructionPeriodStart","契約工期開始"},
|
|
| 619 |
{"ConstructionPeriodEnd","契約工期完了"},
|
|
| 620 |
{"BillingStartDate","請求準備開始日"},
|
|
| 621 |
{"BillingDate", "請求日"},
|
|
| 622 |
}; |
|
| 623 |
/// <summary> |
|
| 624 |
/// 工事基本情報データチェック対象日付テーブル |
|
| 625 |
/// </summary> |
|
| 626 |
public enum ConstructionBaseInfo_DateNo |
|
| 627 |
{
|
|
| 628 |
/// <summary> |
|
| 629 |
/// 1:依頼受け日 |
|
| 630 |
/// </summary> |
|
| 631 |
RequestedDate = 1, |
|
| 632 |
/// <summary> |
|
| 633 |
/// 2:見積提出期限 |
|
| 634 |
/// </summary> |
|
| 635 |
EstimatesSubmitDeadline, |
|
| 636 |
/// <summary> |
|
| 637 |
/// 3:見積提出日 |
|
| 638 |
/// </summary> |
|
| 639 |
EstimatesSubmittedDate, |
|
| 640 |
/// <summary> |
|
| 641 |
/// 4:受注日 |
|
| 642 |
/// </summary> |
|
| 643 |
OrderDate, |
|
| 644 |
/// <summary> |
|
| 645 |
/// 5:開始予定日 |
|
| 646 |
/// </summary> |
|
| 647 |
OrderStartingDate, |
|
| 648 |
/// <summary> |
|
| 649 |
/// 6:完了予定日 |
|
| 650 |
/// </summary> |
|
| 651 |
OrderCompletionDate, |
|
| 652 |
/// <summary> |
|
| 653 |
/// 7:施工開始日 |
|
| 654 |
/// </summary> |
|
| 655 |
ConstructionStartingDate, |
|
| 656 |
/// <summary> |
|
| 657 |
/// 8:施工完了日 |
|
| 658 |
/// </summary> |
|
| 659 |
ConstructionCompletionDate, |
|
| 660 |
/// <summary> |
|
| 661 |
/// 9:工事移管日 |
|
| 662 |
/// </summary> |
|
| 663 |
TransferConstructionDate, |
|
| 664 |
/// <summary> |
|
| 665 |
/// 10:見積有効期限 |
|
| 666 |
/// </summary> |
|
| 667 |
EstimatesExpirationDate, |
|
| 668 |
/// <summary> |
|
| 669 |
/// 11:契約工期開始 |
|
| 670 |
/// </summary> |
|
| 671 |
ConstructionPeriodStart, |
|
| 672 |
/// <summary> |
|
| 673 |
/// 12:契約工期完了 |
|
| 674 |
/// </summary> |
|
| 675 |
ConstructionPeriodEnd, |
|
| 676 |
/// <summary> |
|
| 677 |
/// 13:請求準備開始日 |
|
| 678 |
/// </summary> |
|
| 679 |
BillingStartDate, |
|
| 680 |
/// <summary> |
|
| 681 |
/// 14:請求日 |
|
| 682 |
/// </summary> |
|
| 683 |
BillingDate, |
|
| 684 |
} |
|
| 685 |
#endregion |
|
| 686 |
|
|
| 687 |
#region 工事基本情報:消費税フラグ |
|
| 688 |
/// <summary> |
|
| 689 |
/// 消費税フラグ 0:含まない 1:含む |
|
| 690 |
/// </summary> |
|
| 691 |
public enum BaseInfoConsumptionTaxFlg |
|
| 692 |
{
|
|
| 693 |
/// <summary> |
|
| 694 |
/// 0:含まない |
|
| 695 |
/// </summary> |
|
| 696 |
NotInclue = 0, |
|
| 697 |
/// <summary> |
|
| 698 |
/// 1:含む |
|
| 699 |
/// </summary> |
|
| 700 |
Include, |
|
| 701 |
} |
|
| 702 |
#endregion |
|
| 703 |
|
|
| 704 |
#region 工事基本情報:営業経費発生フラグ |
|
| 705 |
/// <summary> |
|
| 706 |
/// 営業経費発生フラグ 0:発生しない 1:発生する |
|
| 707 |
/// </summary> |
|
| 708 |
public enum BaseInfoSalesCostFlg |
|
| 709 |
{
|
|
| 710 |
/// <summary> |
|
| 711 |
/// 0:発生しない |
|
| 712 |
/// </summary> |
|
| 713 |
NotOn = 0, |
|
| 714 |
/// <summary> |
|
| 715 |
/// 1:発生する |
|
| 716 |
/// </summary> |
|
| 717 |
On, |
|
| 718 |
} |
|
| 719 |
#endregion |
|
| 720 |
|
|
| 721 |
#region 工事基本情報:見積種別 |
|
| 722 |
/// <summary> |
|
| 723 |
/// 見積種別 0:通常見積 1:入札物件 2:予算取り見積 |
|
| 724 |
/// </summary> |
|
| 725 |
public enum BaseInfoEstimateType |
|
| 726 |
{
|
|
| 727 |
/// <summary> |
|
| 728 |
/// 0:通常見積 |
|
| 729 |
/// </summary> |
|
| 730 |
Normal = 0, |
|
| 731 |
/// <summary> |
|
| 732 |
/// 1:入札物件 |
|
| 733 |
/// </summary> |
|
| 734 |
Didding, |
|
| 735 |
/// <summary> |
|
| 736 |
/// 2:予算取り見積 |
|
| 737 |
/// </summary> |
|
| 738 |
GetBudget, |
|
| 739 |
} |
|
| 740 |
#endregion |
|
| 741 |
|
|
| 742 |
#region 工事基本情報:請求回数フラグ |
|
| 743 |
/// <summary> |
|
| 744 |
/// 請求回数フラグ 0:分割請求 1:一括請求 |
|
| 745 |
/// </summary> |
|
| 746 |
public enum BaseInfoBillingSplitFlg |
|
| 747 |
{
|
|
| 748 |
/// <summary> |
|
| 749 |
/// 0:分割請求 |
|
| 750 |
/// </summary> |
|
| 751 |
SplitBilling = 0, |
|
| 752 |
/// <summary> |
|
| 753 |
/// 1:一括請求 |
|
| 754 |
/// </summary> |
|
| 755 |
AllOnBilling, |
|
| 756 |
} |
|
| 757 |
#endregion |
|
| 758 |
|
|
| 759 |
#region 工事基本情報:見積有効期限(月) |
|
| 760 |
/// <summary> |
|
| 761 |
/// 見積有効期限(月) |
|
| 762 |
/// </summary> |
|
| 763 |
public static int s_EstimatesExpirationDeadline = 3; |
|
| 764 |
#endregion |
|
| 765 |
|
|
| 766 |
#region 見積書入力:タブカテゴリ定義値 |
|
| 767 |
/// <summary> |
|
| 768 |
/// 見積入力:大項目・中項目・小項目 |
|
| 769 |
/// </summary> |
|
| 770 |
public enum TabCotegory |
|
| 771 |
{
|
|
| 772 |
Total = 0, |
|
| 773 |
Component, |
|
| 774 |
Item, |
|
| 775 |
Spec, |
|
| 776 |
} |
|
| 777 |
#endregion |
|
| 778 |
|
|
| 779 |
#region 見積書入力:経費フラグ |
|
| 780 |
/// <summary> |
|
| 781 |
/// 見積書入力:Other:経費外 Expenses:経費対象 |
|
| 782 |
/// </summary> |
|
| 783 |
public enum MyExpenses |
|
| 784 |
{
|
|
| 785 |
/// <summary> |
|
| 786 |
/// 0:経費外 |
|
| 787 |
/// </summary> |
|
| 788 |
Other = 0, |
|
| 789 |
/// <summary> |
|
| 790 |
/// 1:自社経費 |
|
| 791 |
/// </summary> |
|
| 792 |
Expenses, |
|
| 793 |
} |
|
| 794 |
#endregion |
|
| 795 |
|
|
| 796 |
#region 見積書入力:入力フラグ |
|
| 797 |
/// <summary> |
|
| 798 |
/// 見積書入力:Protect:入力不可 Input:入力可 |
|
| 799 |
/// </summary> |
|
| 800 |
public enum DirectInput |
|
| 801 |
{
|
|
| 802 |
/// <summary> |
|
| 803 |
/// 0:入力不可 |
|
| 804 |
/// </summary> |
|
| 805 |
Protect = 0, |
|
| 806 |
/// <summary> |
|
| 807 |
/// 1:入力可 |
|
| 808 |
/// </summary> |
|
| 809 |
Input, |
|
| 810 |
} |
|
| 811 |
#endregion |
|
| 812 |
|
|
| 813 |
#region 見積書入力:下位項目フラグ |
|
| 814 |
/// <summary> |
|
| 815 |
/// 見積書入力:0:下位項目なし 1:下位項目有 |
|
| 816 |
/// </summary> |
|
| 817 |
public enum SubItems |
|
| 818 |
{
|
|
| 819 |
/// <summary> |
|
| 820 |
/// 0:下位項目なし |
|
| 821 |
/// </summary> |
|
| 822 |
NoItem = 0, |
|
| 823 |
/// <summary> |
|
| 824 |
/// 1:下位項目有 |
|
| 825 |
/// </summary> |
|
| 826 |
ExistItem, |
|
| 827 |
} |
|
| 828 |
#endregion |
|
| 829 |
|
|
| 830 |
#region 協力業者サブフォーム等:自社施工・自社経費使用定義 |
|
| 831 |
/// <summary> |
|
| 832 |
/// 自社系定義番号 |
|
| 833 |
/// </summary> |
|
| 834 |
public enum AmountMoneyNo |
|
| 835 |
{
|
|
| 836 |
/// <summary> |
|
| 837 |
/// 未割当 |
|
| 838 |
/// </summary> |
|
| 839 |
NonAssign = 0, |
|
| 840 |
/// <summary> |
|
| 841 |
/// 自社施工 |
|
| 842 |
/// </summary> |
|
| 843 |
MyCosts, |
|
| 844 |
/// <summary> |
|
| 845 |
/// 自社経費 |
|
| 846 |
/// </summary> |
|
| 847 |
MyExpense, |
|
| 848 |
/// <summary> |
|
| 849 |
/// 業者未定 |
|
| 850 |
/// </summary> |
|
| 851 |
UnDecided, |
|
| 852 |
} |
|
| 853 |
/// <summary> |
|
| 854 |
/// 自社系定義リスト |
|
| 855 |
/// </summary> |
|
| 856 |
public static List<KeyValuePair<int, string>> s_AmountMoney = new List<KeyValuePair<int, string>>(){
|
|
| 857 |
new KeyValuePair<int,string>(0,"未 割 当"), |
|
| 858 |
new KeyValuePair<int,string>(-1,"自社施工費"), |
|
| 859 |
new KeyValuePair<int,string>(-2,"自 社 経 費"), |
|
| 860 |
new KeyValuePair<int,string>(-3,"業 者 未 定")}; |
|
| 861 |
#endregion |
|
| 862 |
|
|
| 863 |
#region 注文書入力:注文書種別 |
|
| 864 |
/// <summary> |
|
| 865 |
/// 注文書種別タイプ |
|
| 866 |
/// </summary> |
|
| 867 |
public enum OrderSheetType |
|
| 868 |
{
|
|
| 869 |
/// <summary> |
|
| 870 |
/// 簡易版 |
|
| 871 |
/// </summary> |
|
| 872 |
SimpleType = 0, |
|
| 873 |
/// <summary> |
|
| 874 |
/// 正規版 |
|
| 875 |
/// </summary> |
|
| 876 |
RegularType, |
|
| 877 |
} |
|
| 878 |
#endregion |
|
| 879 |
|
|
| 880 |
#region 注文書入力:発注条件固定文字 |
|
| 881 |
/// <summary> |
|
| 882 |
/// 発注条件固定文字 |
|
| 883 |
/// </summary> |
|
| 884 |
public static string[] Group4GridStaticString = new string[]{"貴社の責による工期の増減は認められません。",
|
|
| 885 |
"駐車場は貴社にて確保願います。", |
|
| 886 |
"乗り合うなどの車両台数も極力減らすこと。", |
|
| 887 |
"安全衛生書類を工事着手までに提出すること。", |
|
| 888 |
"公共工事標準仕様書(最新版)に則り施工のこと。"}; |
|
| 889 |
#endregion |
|
| 890 |
|
|
| 891 |
#region 交通費及び購入品等入力:データ種別 |
|
| 892 |
/// <summary> |
|
| 893 |
/// 交通費及び購入品等入力:データ種別 |
|
| 894 |
/// </summary> |
|
| 895 |
public enum CostDataNo |
|
| 896 |
{
|
|
| 897 |
/// <summary> |
|
| 898 |
/// 交通費 |
|
| 899 |
/// </summary> |
|
| 900 |
Transport = 1, |
|
| 901 |
/// <summary> |
|
| 902 |
/// 購入品費 |
|
| 903 |
/// </summary> |
|
| 904 |
Purchase, |
|
| 905 |
/// <summary> |
|
| 906 |
/// 車両リース代 |
|
| 907 |
/// </summary> |
|
| 908 |
Lease, |
|
| 909 |
/// <summary> |
|
| 910 |
/// 駐車場・資材置き場代 |
|
| 911 |
/// </summary> |
|
| 912 |
StoragePlace, |
|
| 913 |
/// <summary> |
|
| 914 |
/// 宿泊費 |
|
| 915 |
/// </summary> |
|
| 916 |
Lodging, |
|
| 917 |
} |
|
| 918 |
|
|
| 919 |
/// <summary> |
|
| 920 |
/// データ種別 |
|
| 921 |
/// </summary> |
|
| 922 |
public static readonly string[] CostDataNoString = new string[] { "", "交 通 費", "購入品費", "車両リース代", "駐車場・資材置き場代", "宿泊費" };
|
|
| 923 |
#endregion |
|
| 924 |
|
|
| 925 |
#region 入力履歴:データ種別 |
|
| 926 |
/// <summary> |
|
| 927 |
/// 入力履歴:データ種別 |
|
| 928 |
/// </summary> |
|
| 929 |
public enum SearchLogDataType |
|
| 930 |
{
|
|
| 931 |
/// <summary> |
|
| 932 |
/// 固定コード |
|
| 933 |
/// </summary> |
|
| 934 |
FixCode = 0, |
|
| 935 |
/// <summary> |
|
| 936 |
/// 協力会社コード |
|
| 937 |
/// </summary> |
|
| 938 |
Subconstractor, |
|
| 939 |
/// <summary> |
|
| 940 |
/// 担当者コード |
|
| 941 |
/// </summary> |
|
| 942 |
Person, |
|
| 943 |
} |
|
| 944 |
#endregion |
|
| 945 |
|
|
| 946 |
#region 工数単位日数 |
|
| 947 |
/// <summary> |
|
| 948 |
/// 工数単位日数 |
|
| 949 |
/// </summary> |
|
| 950 |
public static double s_ManHourUnitDays = 3.0; |
|
| 951 |
#endregion |
|
| 952 |
|
|
| 953 |
#region 1カ月の稼働日 |
|
| 954 |
/// <summary> |
|
| 955 |
/// 1カ月の稼働日 |
|
| 956 |
/// </summary> |
|
| 957 |
public static int s_WorkingDaysOfMonth = 25; |
|
| 958 |
#endregion |
|
| 959 |
|
|
| 960 |
#region 残業係数 |
|
| 961 |
/// <summary> |
|
| 962 |
/// 残業係数 |
|
| 963 |
/// </summary> |
|
| 964 |
public static double s_SalaryExpenses = 1.1; |
|
| 965 |
#endregion |
|
| 966 |
|
|
| 967 |
#region 工事予算書:日付選択 |
|
| 968 |
/// <summary> |
|
| 969 |
/// 工事予算書:日付選択 |
|
| 970 |
/// </summary> |
|
| 971 |
public enum SelectConstructioDate |
|
| 972 |
{
|
|
| 973 |
/// <summary> |
|
| 974 |
/// 契約日付 |
|
| 975 |
/// </summary> |
|
| 976 |
Agreement = 0, |
|
| 977 |
/// <summary> |
|
| 978 |
/// 見積日付 |
|
| 979 |
/// </summary> |
|
| 980 |
Estimates, |
|
| 981 |
/// <summary> |
|
| 982 |
/// 入力日付 |
|
| 983 |
/// </summary> |
|
| 984 |
InputDate, |
|
| 985 |
} |
|
| 986 |
#endregion |
|
| 987 |
|
|
| 988 |
#region 工事予算書:給与振分区分 |
|
| 989 |
/// <summary> |
|
| 990 |
/// 給与振分区分 |
|
| 991 |
/// </summary> |
|
| 992 |
public enum SalaryDevision |
|
| 993 |
{
|
|
| 994 |
/// <summary> |
|
| 995 |
/// 全日振分 |
|
| 996 |
/// </summary> |
|
| 997 |
All = 0, |
|
| 998 |
/// <summary> |
|
| 999 |
/// 振分無 |
|
| 1000 |
/// </summary> |
|
| 1001 |
Noting, |
|
| 1002 |
/// <summary> |
|
| 1003 |
/// 日数入力 |
|
| 1004 |
/// </summary> |
|
| 1005 |
DaysInput, |
|
| 1006 |
} |
|
| 1007 |
#endregion |
|
| 1008 |
|
|
| 1009 |
#region 工事予算書:工事担当者給与月表示フォーマット(工事内容) |
|
| 1010 |
/// <summary> |
|
| 1011 |
/// 工事担当者給与月表示フォーマット(工事内容) |
|
| 1012 |
/// </summary> |
|
| 1013 |
public static string s_SalaryCostMonthlyFormat = "{0}ヶ月×¥{1}円";
|
|
| 1014 |
#endregion |
|
| 1015 |
|
|
| 1016 |
#region 工事予算書:工事担当者給与日表示フォーマット(工事内容) |
|
| 1017 |
/// <summary> |
|
| 1018 |
/// 工事担当者給与日表示フォーマット(工事内容) |
|
| 1019 |
/// </summary> |
|
| 1020 |
public static string s_SalaryCostDaylyFormat = "{0}日×¥{1}円";
|
|
| 1021 |
#endregion |
|
| 1022 |
|
|
| 1023 |
#region 日報入力:データ区分 |
|
| 1024 |
/// <summary> |
|
| 1025 |
/// 日報入力:データ区分 |
|
| 1026 |
/// </summary> |
|
| 1027 |
public enum DailyInputFlg |
|
| 1028 |
{
|
|
| 1029 |
/// <summary> |
|
| 1030 |
/// 公共 |
|
| 1031 |
/// </summary> |
|
| 1032 |
Communal = 0, |
|
| 1033 |
/// <summary> |
|
| 1034 |
/// 民間 |
|
| 1035 |
/// </summary> |
|
| 1036 |
Popular, |
|
| 1037 |
/// <summary> |
|
| 1038 |
/// 巡回 |
|
| 1039 |
/// </summary> |
|
| 1040 |
Route, |
|
| 1041 |
} |
|
| 1042 |
#endregion |
|
| 1043 |
|
|
| 1044 |
#region プロセス起動カウント |
|
| 1045 |
/// <summary> |
|
| 1046 |
/// プロセス起動カウント |
|
| 1047 |
/// </summary> |
|
| 1048 |
public static int s_NumberOfProcess = 8; |
|
| 1049 |
#endregion |
|
| 1050 |
|
|
| 1051 |
#region セル計算結果表示フォーマット |
|
| 1052 |
/// <summary> |
|
| 1053 |
/// セル計算結果表示フォーマット |
|
| 1054 |
/// </summary> |
|
| 1055 |
public static string s_CalculateCellFormat = "平均:{0} データ個数:{1} 合計:{2}";
|
|
| 1056 |
#endregion |
|
| 1057 |
|
|
| 1058 |
#region 修正モード名称 |
|
| 1059 |
/// <summary> |
|
| 1060 |
/// 修正モード名称 |
|
| 1061 |
/// </summary> |
|
| 1062 |
public static string EditModeStringNew = "新規"; |
|
| 1063 |
public static string EditModeStringEdit = "修正"; |
|
| 1064 |
#endregion |
|
| 1065 |
|
|
| 1066 |
#region 1ページ初期行数 |
|
| 1067 |
/// <summary> |
|
| 1068 |
/// 1ページ初期行数 |
|
| 1069 |
/// </summary> |
|
| 1070 |
public static int s_MaxInitLineCount = 40; |
|
| 1071 |
public static int s_MaxInitLineCountMastamente = 60; |
|
| 1072 |
#endregion |
|
| 1073 |
|
|
| 1074 |
#region 未定時文字 |
|
| 1075 |
/// <summary> |
|
| 1076 |
/// 未定時文字 |
|
| 1077 |
/// </summary> |
|
| 1078 |
public static string s_UndecidedString = "未定"; |
|
| 1079 |
#endregion |
|
| 1080 |
|
|
| 1081 |
#region 指導員月金額 |
|
| 1082 |
/// <summary> |
|
| 1083 |
/// 指導員月金額 |
|
| 1084 |
/// </summary> |
|
| 1085 |
public static int InstructorMonthryCost = 100000; |
|
| 1086 |
#endregion |
|
| 1087 |
|
|
| 1088 |
#region 副担当月金額 |
|
| 1089 |
/// <summary> |
|
| 1090 |
/// 副担当月金額 |
|
| 1091 |
/// </summary> |
|
| 1092 |
public static int AssistantMonthryCost = 100000; |
|
| 1093 |
#endregion |
|
| 1094 |
|
|
| 1095 |
#region 協力会社マスタ:協力業者支払区分 |
|
| 1096 |
/// <summary> |
|
| 1097 |
/// 協力業者支払区分 |
|
| 1098 |
/// </summary> |
|
| 1099 |
public enum SubContractorPaymentKind |
|
| 1100 |
{
|
|
| 1101 |
/// <summary> |
|
| 1102 |
/// 0:通常払い |
|
| 1103 |
/// </summary> |
|
| 1104 |
Normal = 0, |
|
| 1105 |
/// <summary> |
|
| 1106 |
/// 1:手間払い |
|
| 1107 |
/// </summary> |
|
| 1108 |
Labor, |
|
| 1109 |
} |
|
| 1110 |
#endregion |
|
| 1111 |
|
|
| 1112 |
#region 工事詳細台帳:集計フラグ |
|
| 1113 |
/// <summary> |
|
| 1114 |
/// 工事詳細台帳:集計フラグ |
|
| 1115 |
/// </summary> |
|
| 1116 |
public enum LedgerIntegration |
|
| 1117 |
{
|
|
| 1118 |
/// <summary> |
|
| 1119 |
/// 通常(無) |
|
| 1120 |
/// </summary> |
|
| 1121 |
Normal = 0, |
|
| 1122 |
/// <summary> |
|
| 1123 |
/// 積算見積書データより集計 |
|
| 1124 |
/// </summary> |
|
| 1125 |
Integration, |
|
| 1126 |
} |
|
| 1127 |
#endregion |
|
| 1128 |
|
|
| 1129 |
} |
|
| 1130 |
} |
|
| tags/src_20160810/ProcessManagement/ProcessManagement/Common/CommonMotions.cs | ||
|---|---|---|
| 1 |
using System; |
|
| 2 |
using System.Collections.Generic; |
|
| 3 |
using System.Linq; |
|
| 4 |
using System.Text; |
|
| 5 |
using System.Diagnostics; |
|
| 6 |
using System.Windows.Forms; |
|
| 7 |
using System.Drawing; |
|
| 8 |
using System.IO; |
|
| 9 |
using System.Text.RegularExpressions; |
|
| 10 |
using System.Data; |
|
| 11 |
using System.Security.Cryptography; |
|
| 12 |
using System.Globalization; |
|
| 13 |
using System.Runtime.InteropServices; |
|
| 14 |
using System.Collections; |
|
| 15 |
|
|
| 16 |
using Microsoft.VisualBasic; //for StrConv |
|
| 17 |
|
|
| 18 |
using log4net; |
|
| 19 |
using log4net.Appender; |
|
| 20 |
using log4net.Repository.Hierarchy; |
|
| 21 |
|
|
| 22 |
using ProcessManagement.DB.Core; |
|
| 23 |
using ProcessManagement.DataModel; |
|
| 24 |
using ProcessManagement.DB.IOAccess; |
|
| 25 |
using ProcessManagement.Forms.CustomControls; |
|
| 26 |
|
|
| 27 |
namespace ProcessManagement.Common |
|
| 28 |
{
|
|
| 29 |
/// <summary> |
|
| 30 |
/// 工事管理システム共通クラス |
|
| 31 |
/// </summary> |
|
| 32 |
public static class CommonMotions |
|
| 33 |
{
|
|
| 34 |
#region 定義部 |
|
| 35 |
/// <summary> |
|
| 36 |
/// log4netログを使用する |
|
| 37 |
/// </summary> |
|
| 38 |
private static readonly ILog logger = LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); |
|
| 39 |
#endregion |
|
| 40 |
|
|
| 41 |
#region 変数 |
|
| 42 |
/// <summary> |
|
| 43 |
/// 定義ファイル読込クラス定義 |
|
| 44 |
/// </summary> |
|
| 45 |
private static DefinitionFileRead m_dfr_model = null; |
|
| 46 |
|
|
| 47 |
/// <summary> |
|
| 48 |
/// 管理マスタデータ保持領域 |
|
| 49 |
/// </summary> |
|
| 50 |
private static SystemMaster m_systemMaster = new SystemMaster(); |
|
| 51 |
|
|
| 52 |
/// <summary> |
|
| 53 |
/// ログインユーザーデータ |
|
| 54 |
/// </summary> |
|
| 55 |
private static PersonInChargeMaster m_LoginUserData = new PersonInChargeMaster(); |
|
| 56 |
|
|
| 57 |
/// <summary> |
|
| 58 |
/// 建築工事費の構成 |
|
| 59 |
/// </summary> |
|
| 60 |
//private static Dictionary<int, string> m_StructureTypeName = new Dictionary<int, string>(); |
|
| 61 |
|
|
| 62 |
/// <summary> |
|
| 63 |
/// 製品ファイルバージョン格納エリア |
|
| 64 |
/// </summary> |
|
| 65 |
private static FileVersionInfo m_ProductVersionInfo = FileVersionInfo.GetVersionInfo(System.Reflection.Assembly.GetExecutingAssembly().Location); |
|
| 66 |
|
|
| 67 |
#endregion |
|
| 68 |
|
|
| 69 |
#region コンストラクタ |
|
| 70 |
/// <summary> |
|
| 71 |
/// 何もしない |
|
| 72 |
/// </summary> |
|
| 73 |
#endregion |
|
| 74 |
|
|
| 75 |
#region プロパティ |
|
| 76 |
/// <summary> |
|
| 77 |
/// 本稼働フラグ |
|
| 78 |
/// </summary> |
|
| 79 |
public static bool ProductionExecution |
|
| 80 |
{
|
|
| 81 |
get { return CommonDefine.m_ProductionExecution; }
|
|
| 82 |
} |
|
| 83 |
/// <summary> |
|
| 84 |
/// 定義ファイル読込クラス |
|
| 85 |
/// </summary> |
|
| 86 |
public static DefinitionFileRead DFRModel |
|
| 87 |
{
|
|
| 88 |
get { return m_dfr_model; }
|
|
| 89 |
} |
|
| 90 |
|
|
| 91 |
/// <summary> |
|
| 92 |
/// 管理マスタデータ |
|
| 93 |
/// </summary> |
|
| 94 |
public static SystemMaster SystemMasterData |
|
| 95 |
{
|
|
| 96 |
get { return m_systemMaster; }
|
|
| 97 |
set { m_systemMaster = value; }
|
|
| 98 |
} |
|
| 99 |
|
|
| 100 |
/// <summary> |
|
| 101 |
/// ログインユーザーデータ |
|
| 102 |
/// </summary> |
|
| 103 |
public static PersonInChargeMaster LoginUserData |
|
| 104 |
{
|
|
| 105 |
get { return m_LoginUserData; }
|
|
| 106 |
set { m_LoginUserData = value; }
|
|
| 107 |
} |
|
| 108 |
|
|
| 109 |
/// <summary> |
|
| 110 |
/// 構成マスタ(大項目マスタ) |
|
| 111 |
/// </summary> |
|
| 112 |
//public static Dictionary<int, string> StructureTypeName |
|
| 113 |
//{
|
|
| 114 |
// get { return m_StructureTypeName; }
|
|
| 115 |
// set { m_StructureTypeName = value; }
|
|
| 116 |
//} |
|
| 117 |
|
|
| 118 |
/// <summary> |
|
| 119 |
/// 製品ファイルバージョン格納エリア |
|
| 120 |
/// </summary> |
|
| 121 |
public static FileVersionInfo ProductVersionInfo |
|
| 122 |
{
|
|
| 123 |
get { return m_ProductVersionInfo; }
|
|
| 124 |
} |
|
| 125 |
|
|
| 126 |
#endregion |
|
| 127 |
|
|
| 128 |
#region 初期化 |
|
| 129 |
|
|
| 130 |
/// <summary> |
|
| 131 |
/// 初期化 |
|
| 132 |
/// </summary> |
|
| 133 |
public static void Initialize() |
|
| 134 |
{
|
|
| 135 |
try |
|
| 136 |
{
|
|
| 137 |
// 定義ファイル読込 |
|
| 138 |
DefinitionFileInit(); |
|
| 139 |
|
|
| 140 |
// 他共通クラス初期化 |
|
| 141 |
DBCommon.Instance.Initialize(); |
|
| 142 |
|
|
| 143 |
// 管理マスタ取得 |
|
| 144 |
SetSystemMaster(); |
|
| 145 |
|
|
| 146 |
} |
|
| 147 |
catch (Exception ex) |
|
| 148 |
{
|
|
| 149 |
logger.ErrorFormat("初期化エラー:{0}:{1}", GetMethodName(), ex.Message);
|
|
| 150 |
} |
|
| 151 |
} |
|
| 152 |
#endregion |
|
| 153 |
|
|
| 154 |
#region プライベートメソッド |
|
| 155 |
/// <summary> |
|
| 156 |
/// 定義ファイル読込 |
|
| 157 |
/// </summary> |
|
| 158 |
private static void DefinitionFileInit() |
|
| 159 |
{
|
|
| 160 |
try |
|
| 161 |
{
|
|
| 162 |
//定義ファイル読込 |
|
| 163 |
System.IO.FileStream fs = new System.IO.FileStream(CommonDefine.s_DefinitionFileName, System.IO.FileMode.Open); |
|
| 164 |
System.Xml.Serialization.XmlSerializer serializer = new System.Xml.Serialization.XmlSerializer(typeof(DefinitionFileRead)); |
|
| 165 |
m_dfr_model = (DefinitionFileRead)serializer.Deserialize(fs); |
|
| 166 |
} |
|
| 167 |
catch (Exception ex) |
|
| 168 |
{
|
|
| 169 |
logger.ErrorFormat("定義ファイル読込エラー:{0}:{1}", GetMethodName(), ex.Message);
|
|
| 170 |
} |
|
| 171 |
} |
|
| 172 |
|
|
| 173 |
#endregion |
|
| 174 |
|
|
| 175 |
#region 管理マスタ取得 |
|
| 176 |
/// <summary> |
|
| 177 |
/// 管理マスタ取得 |
|
| 178 |
/// </summary> |
|
| 179 |
public static bool SetSystemMaster() |
|
| 180 |
{
|
|
| 181 |
// 管理マスタクラス |
|
| 182 |
IOMSystem ocDB = new IOMSystem(); |
|
| 183 |
try |
|
| 184 |
{
|
|
| 185 |
// 管理マスタ取得 |
|
| 186 |
// 1レコードだけなので取り出す |
|
| 187 |
string strSQL = " Where SystemCode = 1"; |
|
| 188 |
if (!ocDB.SelectAction(strSQL, ref m_systemMaster)) return false; |
|
| 189 |
|
|
| 190 |
return true; |
|
| 191 |
} |
|
| 192 |
catch (Exception ex) |
|
| 193 |
{
|
|
| 194 |
logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message);
|
|
| 195 |
return false; |
|
| 196 |
} |
|
| 197 |
finally |
|
| 198 |
{
|
|
| 199 |
ocDB.close(); |
|
| 200 |
ocDB = null; |
|
| 201 |
} |
|
| 202 |
} |
|
| 203 |
#endregion |
|
| 204 |
|
|
| 205 |
#region メソッド名を取得する |
|
| 206 |
/// <summary> |
|
| 207 |
/// メソッド名を取得する |
|
| 208 |
/// </summary> |
|
| 209 |
/// <param name="StackCnt"></param> |
|
| 210 |
/// <returns></returns> |
|
| 211 |
public static string GetMethodName(int stackCnt = 1) |
|
| 212 |
{
|
|
| 213 |
try |
|
| 214 |
{
|
|
| 215 |
StringBuilder sb = new StringBuilder(); |
|
| 216 |
|
|
| 217 |
// 一つ前のスタック情報 |
|
| 218 |
StackFrame stackFrame = new StackFrame(stackCnt); |
|
| 219 |
|
|
| 220 |
// 呼び出し元メソッドの情報出力 |
|
| 221 |
System.Reflection.MethodBase method = stackFrame.GetMethod(); |
|
| 222 |
|
|
| 223 |
// Method取得失敗は戻る |
|
| 224 |
if (method == null) return string.Empty; |
|
| 225 |
|
|
| 226 |
// 正しく取得できているかの判定 |
|
| 227 |
if (method.DeclaringType != null && !string.IsNullOrEmpty(method.DeclaringType.Name)) |
|
| 228 |
{
|
|
| 229 |
// 型名 |
|
| 230 |
sb.AppendFormat("[TYPE]{0}", method.DeclaringType.Name);
|
|
| 231 |
} |
|
| 232 |
|
|
| 233 |
if (!string.IsNullOrEmpty(method.Name)) |
|
| 234 |
{
|
|
| 235 |
// 編集済みの場合は区切りを入れる |
|
| 236 |
if (0 < sb.Length) sb.Append('/');
|
|
| 237 |
|
|
| 238 |
// メソッド名 |
|
| 239 |
sb.AppendFormat("[METHOD]{0}", method.Name);
|
|
| 240 |
} |
|
| 241 |
return sb.ToString(); |
|
| 242 |
} |
|
| 243 |
catch (Exception ex) |
|
| 244 |
{
|
|
| 245 |
logger.ErrorFormat(ex.Message); |
|
| 246 |
} |
|
| 247 |
return string.Empty; |
|
| 248 |
} |
|
| 249 |
#endregion |
|
| 250 |
|
|
| 251 |
#region 日付より年を取得する |
|
| 252 |
/// <summary> |
|
| 253 |
/// 日付より年を取得する |
|
| 254 |
/// </summary> |
|
| 255 |
/// <returns></returns> |
|
| 256 |
public static int DateToPeriodYear(DateTime TargetDate) |
|
| 257 |
{
|
|
| 258 |
try |
|
| 259 |
{
|
|
| 260 |
// 今の年を取得する |
|
| 261 |
int iYear = DateTime.Now.Year; |
|
| 262 |
// 今年の期首日を取得する |
|
| 263 |
DateTime BeginninDate = DateTime.Parse(iYear.ToString() + "/" + CommonMotions.SystemMasterData.BusinessBeginningDate); |
|
| 264 |
// 日付を今年の期首日と比較して小さい場合は今の年より-1して期首年を求める |
|
| 265 |
if (TargetDate.Date < BeginninDate.Date) |
|
| 266 |
--iYear; |
|
| 267 |
|
|
| 268 |
return iYear; |
|
| 269 |
} |
|
| 270 |
catch (Exception ex) |
|
| 271 |
{
|
|
| 272 |
logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message);
|
|
| 273 |
return 0; |
|
| 274 |
} |
|
| 275 |
} |
|
| 276 |
#endregion |
|
| 277 |
|
|
| 278 |
#region 期数から期の年を取得する |
|
| 279 |
/// <summary> |
|
| 280 |
/// 期数から期の年を取得する |
|
| 281 |
/// </summary> |
|
| 282 |
/// <param name="PeriodCount"></param> |
|
| 283 |
/// <returns></returns> |
|
| 284 |
public static int PeriodCountToYear(int PeriodCount) |
|
| 285 |
{
|
|
| 286 |
try |
|
| 287 |
{
|
|
| 288 |
// 今の年を取得する |
|
| 289 |
int iYear = DateTime.Now.Year; |
|
| 290 |
// 今年の期首日を取得する |
|
| 291 |
DateTime BeginninDate = DateTime.Parse(iYear.ToString() + "/" + CommonMotions.SystemMasterData.BusinessBeginningDate); |
|
| 292 |
// 今日を今年の期首日と比較して小さい場合は今の年より-1して期首年を求める |
|
| 293 |
if (DateTime.Now.Date < BeginninDate.Date) |
|
| 294 |
--iYear; |
|
| 295 |
|
|
| 296 |
// 管理マスタの期数と比較して年を計算する |
|
| 297 |
if (PeriodCount < CommonMotions.SystemMasterData.BusinessPeriod) |
|
| 298 |
{
|
|
| 299 |
iYear -= (CommonMotions.SystemMasterData.BusinessPeriod - PeriodCount); |
|
| 300 |
} |
|
| 301 |
else if (PeriodCount > CommonMotions.SystemMasterData.BusinessPeriod) |
|
| 302 |
{
|
|
| 303 |
iYear += (PeriodCount - CommonMotions.SystemMasterData.BusinessPeriod); |
|
| 304 |
} |
|
| 305 |
|
|
| 306 |
return iYear; |
|
| 307 |
} |
|
| 308 |
catch (Exception ex) |
|
| 309 |
{
|
|
| 310 |
logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message);
|
|
| 311 |
return 0; |
|
| 312 |
} |
|
| 313 |
} |
|
| 314 |
#endregion |
|
| 315 |
|
|
| 316 |
#region 期の最大・最少を取得する |
|
| 317 |
/// <summary> |
|
| 318 |
/// 期の最大・最少を取得する |
|
| 319 |
/// </summary> |
|
| 320 |
/// <param name="StartDate"></param> |
|
| 321 |
/// <returns></returns> |
|
| 322 |
public static void GetPeriodYear(ref int min, ref int max) |
|
| 323 |
{
|
|
| 324 |
IOConstructionBaseInfo cbiDB = new IOConstructionBaseInfo(); |
|
| 325 |
try |
|
| 326 |
{
|
|
| 327 |
int StatusCode = CommonDefine.ProjectsStatus.First(x => x.Value.Equals("非 受 注")).Key;
|
|
| 328 |
|
|
| 329 |
string strSQL = "SELECT A.CONSTRUCTIONPERIOD FROM CONSTRUCTIONBASEINFO A"; |
|
| 330 |
strSQL += string.Format(" WHERE A.CONSTRUCTIONSTATUSFLG <> {0}", StatusCode);
|
|
| 331 |
strSQL += " GROUP BY A.CONSTRUCTIONPERIOD"; |
|
| 332 |
|
|
| 333 |
ArrayList arList = new ArrayList(); |
|
| 334 |
if (!cbiDB.ExecuteReader(strSQL, ref arList)) return; |
|
| 335 |
|
|
| 336 |
int[] iNumber = new int[arList.Count]; |
|
| 337 |
int i = 0; |
|
| 338 |
foreach (object[] wrkobj in arList) |
|
| 339 |
{
|
|
| 340 |
iNumber[i++] = CommonMotions.cnvInt(wrkobj[0].ToString()); |
|
| 341 |
} |
|
| 342 |
min = iNumber.Min(); |
|
| 343 |
max = iNumber.Max(); |
|
| 344 |
} |
|
| 345 |
catch (Exception ex) |
|
| 346 |
{
|
|
| 347 |
logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message);
|
|
| 348 |
} |
|
| 349 |
finally |
|
| 350 |
{
|
|
| 351 |
cbiDB.close(); cbiDB = null; |
|
| 352 |
} |
|
| 353 |
} |
|
| 354 |
#endregion |
|
| 355 |
|
|
| 356 |
#region データ変換メソッド |
|
| 357 |
#region 西暦を和暦に変換する |
|
| 358 |
/// <summary> |
|
| 359 |
/// 西暦を和暦に変換する |
|
| 360 |
/// </summary> |
|
| 361 |
/// <returns></returns> |
|
他の形式にエクスポート: Unified diff