プロジェクト

全般

プロフィール

リビジョン 491

堀内約4年前に追加

製品版を最新にマージ:オリジナルリビジョン607相当

差分を表示:

trunk/src/ProcessManagement/ProcessManagement/Common/CommonMotions.cs
1073 1073
        }
1074 1074
        #endregion
1075 1075

  
1076
        #region TimeSpanから年数を取得する
1077
        /// <summary>
1078
        /// TimeSpanから年数を取得する(切り上げ)
1079
        /// </summary>
1080
        /// <param name="timespan"></param>
1081
        /// <returns></returns>
1082
        public static int GetTimeSpanYears(this TimeSpan timespan)
1083
        {
1084
            return CommonMotions.cnvRoundUp((double)timespan.Days / 365.2425);
1085
        }
1076 1086
        #endregion
1077 1087

  
1088
        #region TimeSpanから月数を取得する
1089
        /// <summary>
1090
        /// TimeSpanから月数を取得する
1091
        /// </summary>
1092
        /// <param name="timespan"></param>
1093
        /// <returns></returns>
1094
        public static int GetTimeSpanMonths(this TimeSpan timespan)
1095
        {
1096
            return (int)((double)timespan.Days / 30.436875);
1097
        }
1098
        #endregion
1099

  
1100
        #endregion
1101

  
1078 1102
        #region ---------- データチェックメソッド
1079 1103
        #region ディレクトリの存在チェック
1080 1104
        /// <summary>
......
2375 2399

  
2376 2400
                strSQL.AppendFormat(" WHERE (DATE(BeginDate) <= DATE('{0}'))", NowDay.ToShortDateString());
2377 2401
                strSQL.AppendFormat(" AND (DATE('{0}') <= DATE(CompleteDate))", NowDay.ToShortDateString());
2378
                strSQL.AppendFormat(" And PeriodFlag = {0}", CommonMotions.SystemMasterData.ConstructionNoBase);
2402

  
2403
                int nFlag = (int)BizPeriodHistory.PeriodFlagDef.BizPeriod;
2404
                if (CommonMotions.BasePeriodYear())
2405
                {
2406
                    // 期を選択している場合
2407
                    nFlag = (int)BizPeriodHistory.PeriodFlagDef.BizPeriod;
2408
                }
2409
                else
2410
                {
2411
                    // 年を選択している場合
2412
                    nFlag = (int)BizPeriodHistory.PeriodFlagDef.ConstrYear;
2413
                }
2414
                strSQL.AppendFormat(" And PeriodFlag = {0}", nFlag);
2379 2415
                strSQL.Append(" Order By PeriodFlag Asc, PeriodYear Asc");
2380 2416

  
2381 2417
                List<BizPeriodHistory> BizList = new List<BizPeriodHistory>();
......
2987 3023
        }
2988 3024
        #endregion
2989 3025

  
2990
        #region TimeSpanから年数を取得する
2991
        /// <summary>
2992
        /// TimeSpanから年数を取得する(切り上げ)
2993
        /// </summary>
2994
        /// <param name="timespan"></param>
2995
        /// <returns></returns>
2996
        public static int GetTimeSpanYears(this TimeSpan timespan)
2997
        {
2998
            return CommonMotions.cnvRoundUp((double)timespan.Days / 365.2425);
2999
        }
3000
        #endregion
3001

  
3002
        #region TimeSpanから月数を取得する
3003
        /// <summary>
3004
        /// TimeSpanから月数を取得する
3005
        /// </summary>
3006
        /// <param name="timespan"></param>
3007
        /// <returns></returns>
3008
        public static int GetTimeSpanMonths(this TimeSpan timespan)
3009
        {
3010
            return (int)((double)timespan.Days / 30.436875);
3011
        }
3012
        #endregion
3013

  
3014 3026
        #region 工事種別より工事詳細台帳が作成OKかどうかをチェックする
3015 3027
        /// <summary>
3016 3028
        /// 工事種別より工事詳細台帳が作成OKかどうかをチェックする
......
3028 3040
                                            };
3029 3041
                for (int i = 0; i < Status.Length; i++)
3030 3042
                {
3031
                    //if (ConstructionStatusFlg == Status[i] && ConstructionType == CommonDefine.s_CreateLedgerData[i])
3032 3043
                    if (ConstructionStatusFlg == Status[i])
3033 3044
                    {
3034 3045
                        ExcuteFlg = true;
......
3061 3072
                // 日当計算
3062 3073
                double DairySalary = 0;
3063 3074
                if (bSalaryCorrection)
3075
                {
3064 3076
                    DairySalary = (MonthryCost * CommonDefine.s_SalaryCorrection) / CommonDefine.s_ManHourUnitMonth;
3077
                }
3065 3078
                else
3066 3079
                {
3067 3080
                    DairySalary = MonthryCost / CommonDefine.s_ManHourUnitMonth;
......
4076 4089
                strSQL.Append("       On AB.PersonCode = AA.PersonCode");
4077 4090
                strSQL.Append(" INNER JOIN DEPARTMENTMASTER As A");
4078 4091
                strSQL.Append("       On A.DepartmentCode = AA.DepartmentCode");
4079
                if (bNowSeason)
4092
                if (!bNowSeason)
4080 4093
                {
4081
                    // 今期のプライマリテーブルは部署マスタ
4082
                    //strSQL.AppendFormat(" And A.DELETEFLG = {0}", (int)CommonDefine.DataDeleteDef.Exists);
4083
                }
4084
                else
4085
                {
4086 4094
                    if (bConstrBase)
4087 4095
                    {
4088 4096
                        // 過去のデータは工事情報より取得する
......
4192 4200
                    strSQL.Append("       On C.ConstrDepCode = A.DepartmentCode");
4193 4201
                }
4194 4202

  
4195
                // 台帳計算対象外は外す
4196
                //if (bLedgerDivNo) strSQL.Append(", PERSONINCHARGEMASTER B");
4197

  
4198 4203
                strSQL.Append(" WHERE");
4199 4204
                strSQL.AppendFormat(" AA.PersonCode = {0}", CommonMotions.LoginUserData.PersonCode);
4200 4205

  
......
4204 4209
                if (bNowSeason)
4205 4210
                {
4206 4211
                    // 対象が今期の場合
4207
                    //strSQL.AppendFormat(" And DATE(A.StartDate) <= DATE('{0}')", dtDefaultEnd.ToShortDateString());
4208 4212
                    // 開始日が今日より小さい
4209 4213
                    strSQL.AppendFormat(" And DATE(A.StartDate) <= DATE('{0}')", DateTime.Today.ToShortDateString());
4210 4214

  
......
4220 4224
                else
4221 4225
                {
4222 4226
                    strSQL.AppendFormat(" AND DATE('{0}') <= DATE(AB.CompDate)", dtDefaultEnd.ToShortDateString());
4223

  
4224
                    //strSQL.AppendFormat(" AND ((DATE(AB.STARTDATE) <= DATE('{0}'))", dtDefaultEnd.ToShortDateString());
4225
                    //strSQL.AppendFormat(" AND(DATE('{0}') <= DATE(AB.CompDate)", dtDefaultStart.ToShortDateString());
4226
                    //strSQL.AppendFormat(" OR DATE('{0}') = DATE(AB.CompDate)))", DateTime.MinValue.ToShortDateString());
4227 4227
                }
4228 4228

  
4229
                strSQL.Append(" And");
4230

  
4229 4231
                if (bNowSeason)
4230
                    strSQL.Append(" And (");
4231
                else
4232
                    strSQL.Append(" And");
4232
                    strSQL.Append(" (");
4233 4233

  
4234
                strSQL.Append(" (0 < (SELECT COUNT(*) FROM constructionbaseinfo AS BX");
4234
                strSQL.Append(" Exists (SELECT * FROM constructionbaseinfo AS BX");
4235 4235

  
4236 4236
                if (CommonMotions.BasePeriodYear())
4237 4237
                    strSQL.AppendFormat(" Where BX.ConstructionPeriod = {0}", nTargetCount);
4238 4238
                else
4239 4239
                    strSQL.AppendFormat(" Where BX.ConstructionYear = {0}", nTargetCount);
4240

  
4240 4241
                strSQL.Append("                 AND (BX.SalesDepCode = AA.DepartmentCode");
4242
                strSQL.Append("                 Or BX.SalesSubDepCode = AA.DepartmentCode");
4241 4243
                strSQL.Append("                 Or BX.ConstrDepCode = AA.DepartmentCode");
4242 4244
                strSQL.Append("                 Or BX.ConstrSubDepCode = AA.DepartmentCode");
4243
                strSQL.Append("                 Or BX.ConstrInstrDepCode = AA.DepartmentCode)))");
4245
                strSQL.Append("                 Or BX.ConstrInstrDepCode = AA.DepartmentCode))");
4244 4246

  
4245 4247
                if (bNowSeason)
4246 4248
                {
4247
                    strSQL.Append(" Or (0 < (SELECT COUNT(*) FROM PERSONINCHARGEMASTER AS B");
4249
                    strSQL.Append(" Or Exists (SELECT * FROM PERSONINCHARGEMASTER AS B");
4248 4250
                    strSQL.Append("                           WHERE B.DepartmentCode = AA.DepartmentCode");
4249 4251
                    // 台帳計算対象のみ
4250 4252
                    if (!bLedgerDivNo) strSQL.AppendFormat("  And B.LedgerFlg = {0}", (int)PersonInChargeMaster.LedgerDivNoDef.CalcTarget);
4251 4253
                    // 今期は削除されていないもののみ
4252
                    strSQL.AppendFormat("                     And B.DeleteFlg = {0})))", (int)CommonDefine.DataDeleteDef.Exists);
4254
                    strSQL.AppendFormat("                     And B.DeleteFlg = {0}))", (int)CommonDefine.DataDeleteDef.Exists);
4253 4255
                }
4254 4256

  
4255 4257
                strSQL.Append(" GROUP BY A.DEPARTMENTCODE, A.DEPARTMENTSTRING, A.DISPLAYORDER");
......
4281 4283
                DateTime dtDefaultStart = CommonMotions.GetOpeningEndDate(nTargetYear, true);
4282 4284
                DateTime dtDefaultEnd = CommonMotions.GetOpeningEndDate(nTargetYear, false);
4283 4285

  
4284
                strSQL.AppendFormat("Select {0} From", IOMPersonInCharge.CreateFieldNameList("A."));
4285
                strSQL.Append(" personinchargemaster As A");
4286
                strSQL.Append(" Left Join chgchargedep As B");
4287
                strSQL.Append("       On B.PersonCode = A.PersonCode");
4286
                strSQL.Append("Select");
4287
                strSQL.AppendFormat(" {0}", IOMPersonInCharge.CreateFieldNameList("A."));
4288
                strSQL.Append(" From personinchargemaster As A");
4289
                strSQL.Append("      Left Join chgchargedep As B");
4290
                strSQL.Append("           On B.PersonCode = A.PersonCode");
4288 4291

  
4289 4292
                strSQL.Append(" WHERE");
4290 4293
                strSQL.AppendFormat("     ((DATE(A.STARTDATE) <= DATE('{0}'))", dtDefaultEnd.ToShortDateString());
trunk/src/ProcessManagement/ProcessManagement/Common/CommonVersion.cs
14 14
        /// <summary>
15 15
        /// 本体バージョン
16 16
        /// </summary>
17
        public static int s_SystemVersion = 1;
17
        public static int s_SystemVersion = 4;
18 18

  
19 19
        /// <summary>
20 20
        /// コピー・環境バージョン
21 21
        /// </summary>
22
        public static int s_UpDateCopyVersion = 1;
22
        public static int s_UpDateCopyVersion = 2;
23 23
    }
24 24
}
trunk/src/ProcessManagement/ProcessManagement/Common/Office/UsedExcel.cs
1055 1055
                                                                        , null,
1056 1056
                                                                        xlsWorkSheets
1057 1057
                                                                        , new object[1] { m_sPrintPage });
1058
                // シート名セット
1059
                if (strSheetName.Length != 0)
1058
                // シート名が無ければ以下を処理しない
1059
                if (strSheetName.Length == 0) return;
1060

  
1061
                // ブック内のシートで名前が既にあるかを検索する
1062
                int nNameCnt = 0;
1063
                object xlsNameSheet = null;
1064
                object NameSheet = null;
1065
                for (int ix = (m_sPrintPage - 1); 0 < ix; ix--)
1060 1066
                {
1061
                    xlsWorkSheet.GetType().InvokeMember("Name"
1062
                                                        , BindingFlags.SetProperty
1063
                                                        , null
1064
                                                        , xlsWorkSheet
1065
                                                        , new object[1] { strSheetName });
1067
                    xlsNameSheet = xlsWorkSheets.GetType().InvokeMember("Item"
1068
                                                                            , BindingFlags.GetProperty
1069
                                                                            , null,
1070
                                                                            xlsWorkSheets
1071
                                                                            , new object[1] { ix });
1072
                    NameSheet = xlsNameSheet.GetType().InvokeMember("Name"
1073
                                                                        , BindingFlags.GetProperty
1074
                                                                        , null
1075
                                                                        , xlsNameSheet
1076
                                                                        , null);
1077
                    if (CommonMotions.cnvString(NameSheet).IndexOf(strSheetName) > -1) nNameCnt++;
1066 1078
                }
1079
                CommonMotions.ReleaseCom(ref xlsNameSheet); xlsNameSheet = null;
1080
                CommonMotions.ReleaseCom(ref NameSheet); NameSheet = null;
1067 1081

  
1082
                string strSetName = strSheetName;
1083
                if (nNameCnt > 0) strSetName = string.Format("{0}({1})", strSheetName, nNameCnt);
1084

  
1085
                // シート名セット
1086
                xlsWorkSheet.GetType().InvokeMember("Name"
1087
                                                   , BindingFlags.SetProperty
1088
                                                   , null
1089
                                                   , xlsWorkSheet
1090
                                                   , new object[1] { strSetName });
1091

  
1068 1092
            }
1069 1093
            catch (Exception ex)
1070 1094
            {
trunk/src/ProcessManagement/ProcessManagement/Common/Process/ClsChangeBaseInfoData.cs
113 113
        }
114 114
        #endregion
115 115

  
116
        #region 対象コードデータを一括で削除できるかのチェックを行う
117
        /// <summary>
118
        /// 対象コードデータを一括で削除できるかのチェックを行う
119
        /// </summary>
120
        /// <returns></returns>
121
        public static bool CheckRemoveAllData(int RemoveCode)
122
        {
123
            IOAllFreeSQL FreeDB = new IOAllFreeSQL();
124
            try
125
            {
126
                return true;
127
            }
128
            catch (Exception ex)
129
            {
130
                logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message);
131
                return false;
132
            }
133
            finally
134
            {
135
                FreeDB.close();FreeDB = null;
136
            }
137
        }
138
        #endregion
139

  
116 140
        #region 関連データすべて削除
117 141
        /// <summary>
118 142
        /// 関連データすべて削除
119 143
        /// </summary>
120 144
        /// <returns></returns>
121
        public static bool RemoveAllelationData(int RemoveCode)
145
        public static bool RemoveAllData(int RemoveCode)
122 146
        {
123 147
            IOConstructionBaseInfo DB01 = new IOConstructionBaseInfo();		        // 工事基本情報
124 148
            IOConstructionBaseInfoDetail DB02 = new IOConstructionBaseInfoDetail(); // 工事基本情報明細
......
150 174
            IODailyDataField DB27 = new IODailyDataField();                         // 日報データ (現場巡回)
151 175
            IOProcessApprovalDetail DB28 = new IOProcessApprovalDetail();           // 承認明細データ
152 176
            IOProcessApprovalComment DB29 = new IOProcessApprovalComment();         // 承認コメントデータ
177

  
178
            //IORequestData DB30 = new IORequestData();                               // 請求データ
179
            //IORequestDataDetail DB31 = new IORequestDataDetail();                   // 請求データ明細
180
            //IORequestHead DB32 = new IORequestHead();                               // 請求ヘッダ
181
            //IORequestOrderDate DB33 = new IORequestOrderDate();                     // 請求書日付データ 
182

  
183
            //IORemoveRequest DB34 = new IORemoveRequest();                           // 請求取消データ
184
            //IORemoveRequestDetail DB35 = new IORemoveRequestDetail();               // 請求取消データ明細
185

  
186
            //IOInvoiceData DB36 = new IOInvoiceData();                               // 請求書データ
187
            //IORemInvoiceData DB37 = new IORemInvoiceData();                         // 請求書削除データ 
188
            //IORemInvoiceDataDetail DB38 = new IORemInvoiceDataDetail();             // 請求書削除明細データ
189

  
153 190
            try
154 191
            {
155 192
                // 工事情報存在確認
trunk/src/ProcessManagement/ProcessManagement/Common/Process/ClsChangeLedgerData.cs
111 111

  
112 112
                    // ----- 工事詳細台帳更新
113 113
                    strSQL.Clear();
114
                    strSQL.Append("UPDATE CONSTRUCTIONLEDGER SET");
115
                    strSQL.AppendFormat(" TOTALPAYMENT = {0}", Payment);
116
                    strSQL.AppendFormat(", GROSSPROFIT = {0}", (Billing - (Payment + Compensation)));
117
                    strSQL.AppendFormat(", Allowance = {0}", Allowance);
118
                    strSQL.AppendFormat(", NETPROFIT = {0}", (Billing - ((Payment + Compensation) + Allowance + PExpenses)));
114
                    strSQL.Append("UPDATE CONSTRUCTIONLEDGER");
115
                    strSQL.Append(" SET");
116
                    strSQL.AppendFormat(" TOTALPAYMENT = {0}", Payment);                                                                        // ----- 総支払額
117
                    strSQL.AppendFormat(", GROSSPROFIT = {0}", (Billing - (Payment + Compensation)));                                           // ----- 粗利
118
                    strSQL.AppendFormat(", Allowance = {0}", Allowance);                                                                        // ----- 給与
119
                    strSQL.AppendFormat(", NETPROFIT = {0}", (Billing - (Payment + Compensation + Allowance + PExpenses)));                     // ----- 純利益
120
                    strSQL.Append("      , UpdateDate = NOW()");
119 121
                    strSQL.AppendFormat(" WHERE CONSTRUCTIONCODE = {0}", ConstrCode);
120 122
                    if (!LedgerExcuteDB.ExecuteNonQuery(strSQL.ToString(), false))
121 123
                    {
trunk/src/ProcessManagement/ProcessManagement/Common/Process/ClsExcute.cs
104 104
            PurchaseOrderList = 57,             // 57:注文書入力一覧
105 105
            WebInputBillingList = 58,           // 58:Web業者請求データ一覧
106 106
            PaymentNotice = 59,                 // 59:支払通知書印刷
107
            SubcontrInvoice = 60,               // 60:協力会社請求
107 108
        }
108 109
        #endregion
109 110

  
......
922 923
                            ProcessExecuteNo_PaymentNotice(m_ProcControlPara[NowPoint]);
923 924
                            break;
924 925

  
926
                        case (int)ProcessExecuteNo.SubcontrInvoice:                     // 60:協力会社請求
927
                            ProcessExecuteNo_SubcontrInvoice(m_ProcControlPara[NowPoint]);
928
                            break;
929

  
925 930
                        #endregion
926 931

  
927 932
                        #region マスタメンテ
......
1310 1315
            finally
1311 1316
            {
1312 1317
                frm.Dispose(); frm = null;
1318
                // フォームのクリア
1319
                ClsOtherProc.ProcFormClose(ProcessNo);
1313 1320
            }
1314 1321
        }
1315 1322
        #endregion
......
1349 1356
            finally
1350 1357
            {
1351 1358
                frm.Dispose(); frm = null;
1359
                // フォームのクリア
1360
                ClsOtherProc.ProcFormClose(ProcessNo);
1352 1361
            }
1353 1362
        }
1354 1363
        #endregion
......
1389 1398
            finally
1390 1399
            {
1391 1400
                frm.Dispose(); frm = null;
1401
                // フォームのクリア
1402
                ClsOtherProc.ProcFormClose(ProcessNo);
1392 1403
            }
1393 1404
        }
1394 1405
        #endregion
......
1402 1413
        {
1403 1414
            // 積算予算書入力
1404 1415
            FrmEstimateBudget frm = new FrmEstimateBudget();
1416
            int ProcessNo = (int)ClsExcute.ProcessExecuteNo.EstimateBudget;
1405 1417
            try
1406 1418
            {
1407 1419
                // 自分のハンドルをリストへセットする
1408
                int ProcessNo = (int)ClsExcute.ProcessExecuteNo.EstimateBudget;
1409 1420
                ClsExcute.SubFormHandleList[ProcessNo].ProcessNo = ProcessNo;
1410 1421
                ClsExcute.SubFormHandleList[ProcessNo].SubFormHandle = (Form)frm;
1411 1422

  
......
1428 1439
            finally
1429 1440
            {
1430 1441
                frm.Dispose(); frm = null;
1442
                // フォームのクリア
1443
                ClsOtherProc.ProcFormClose(ProcessNo);
1431 1444
            }
1432 1445
        }
1433 1446
        #endregion
......
1467 1480
            finally
1468 1481
            {
1469 1482
                frm.Dispose(); frm = null;
1483
                // フォームのクリア
1484
                ClsOtherProc.ProcFormClose(ProcessNo);
1470 1485
            }
1471 1486
        }
1472 1487
        #endregion
......
1528 1543
            finally
1529 1544
            {
1530 1545
                frm.Dispose(); frm = null;
1546
                // フォームのクリア
1547
                ClsOtherProc.ProcFormClose(ProcessNo);
1531 1548
            }
1532 1549
        }
1533 1550
        #endregion
......
1569 1586
            finally
1570 1587
            {
1571 1588
                frm.Dispose(); frm = null;
1589
                // フォームのクリア
1590
                ClsOtherProc.ProcFormClose(ProcessNo);
1572 1591
            }
1573 1592
        }
1574 1593
        #endregion
......
1727 1746
            finally
1728 1747
            {
1729 1748
                frm.Dispose(); frm = null;
1749
                // フォームのクリア
1750
                ClsOtherProc.ProcFormClose(ProcessNo);
1730 1751
            }
1731 1752
        }
1732 1753
        #endregion
......
1771 1792
            finally
1772 1793
            {
1773 1794
                frm.Dispose(); frm = null;
1795
                // フォームのクリア
1796
                ClsOtherProc.ProcFormClose(ProcessNo);
1774 1797
            }
1775 1798
        }
1776 1799
        #endregion
......
1864 1887
            finally
1865 1888
            {
1866 1889
                frm.Dispose(); frm = null;
1890
                // フォームのクリア
1891
                ClsOtherProc.ProcFormClose(ProcessNo);
1867 1892
            }
1868 1893
        }
1869 1894
        #endregion
......
1907 1932
            finally
1908 1933
            {
1909 1934
                frm.Dispose(); frm = null;
1935
                // フォームのクリア
1936
                ClsOtherProc.ProcFormClose(ProcessNo);
1910 1937
            }
1911 1938
        }
1912 1939
        #endregion
......
2155 2182
            finally
2156 2183
            {
2157 2184
                frm.Dispose(); frm = null;
2185
                // フォームのクリア
2186
                ClsOtherProc.ProcFormClose(ProcessNo);
2158 2187
            }
2159 2188
        }
2160 2189
        #endregion
......
2320 2349
        {
2321 2350
            // 資材貸出
2322 2351
            FrmMaterialReserveEntry frm = new FrmMaterialReserveEntry();
2352
            int ProcessNo = (int)ClsExcute.ProcessExecuteNo.MaterialReserveEntry;
2323 2353
            try
2324 2354
            {
2325 2355
                // 自分のハンドルをリストへセットする
2326
                int ProcessNo = (int)ClsExcute.ProcessExecuteNo.MaterialReserveEntry;
2327 2356
                ClsExcute.SubFormHandleList[ProcessNo].ProcessNo = ProcessNo;
2328 2357
                ClsExcute.SubFormHandleList[ProcessNo].SubFormHandle = (Form)frm;
2329 2358

  
......
2349 2378
            }
2350 2379
            finally
2351 2380
            {
2352
                frm.Dispose();
2353
                frm = null;
2381
                frm.Dispose(); frm = null;
2382
                // フォームのクリア
2383
                ClsOtherProc.ProcFormClose(ProcessNo);
2354 2384
            }
2355 2385
        }
2356 2386
        #endregion
......
2364 2394
        {
2365 2395
            // 資材返却
2366 2396
            FrmMaterialReturnEntry frm = new FrmMaterialReturnEntry();
2367

  
2397
            int ProcessNo = (int)ClsExcute.ProcessExecuteNo.MaterialReturnEntry;
2368 2398
            try
2369 2399
            {
2370 2400
                // 自分のハンドルをリストへセットする
2371
                int ProcessNo = (int)ClsExcute.ProcessExecuteNo.MaterialReturnEntry;
2372 2401
                ClsExcute.SubFormHandleList[ProcessNo].ProcessNo = ProcessNo;
2373 2402
                ClsExcute.SubFormHandleList[ProcessNo].SubFormHandle = (Form)frm;
2374 2403

  
......
2395 2424
            }
2396 2425
            finally
2397 2426
            {
2398
                frm.Dispose();
2399
                frm = null;
2427
                frm.Dispose(); frm = null;
2428
                // フォームのクリア
2429
                ClsOtherProc.ProcFormClose(ProcessNo);
2400 2430
            }
2401 2431
        }
2402 2432
        #endregion
......
2499 2529
            finally
2500 2530
            {
2501 2531
                frm.Dispose(); frm = null;
2532
                // フォームのクリア
2533
                ClsOtherProc.ProcFormClose(ProcessNo);
2502 2534
            }
2503 2535
        }
2504 2536
        #endregion
......
2635 2667
        {
2636 2668
            // 発注者登録申請
2637 2669
            FrmCostomerRegist frm = new FrmCostomerRegist();
2670
            int ProcessNo = (int)ClsExcute.ProcessExecuteNo.CostomerRegist;
2638 2671
            try
2639 2672
            {
2640 2673
                // 自分のハンドルをリストへセットする
2641
                int ProcessNo = (int)ClsExcute.ProcessExecuteNo.CostomerRegist;
2642 2674
                ClsExcute.SubFormHandleList[ProcessNo].ProcessNo = ProcessNo;
2643 2675
                ClsExcute.SubFormHandleList[ProcessNo].SubFormHandle = (Form)frm;
2644 2676

  
......
2667 2699
            finally
2668 2700
            {
2669 2701
                frm.Dispose(); frm = null;
2702
                // フォームのクリア
2703
                ClsOtherProc.ProcFormClose(ProcessNo);
2670 2704
            }
2671 2705
        }
2672 2706
        #endregion
......
2714 2748
        {
2715 2749
            // 協力会社登録申請
2716 2750
            FrmSubConstrRegist frm = new FrmSubConstrRegist();
2751
            int ProcessNo = (int)ClsExcute.ProcessExecuteNo.SubConstrRegist;
2717 2752
            try
2718 2753
            {
2719 2754
                // 自分のハンドルをリストへセットする
2720
                int ProcessNo = (int)ClsExcute.ProcessExecuteNo.SubConstrRegist;
2721 2755
                ClsExcute.SubFormHandleList[ProcessNo].ProcessNo = ProcessNo;
2722 2756
                ClsExcute.SubFormHandleList[ProcessNo].SubFormHandle = (Form)frm;
2723 2757

  
......
2746 2780
            finally
2747 2781
            {
2748 2782
                frm.Dispose(); frm = null;
2783
                // フォームのクリア
2784
                ClsOtherProc.ProcFormClose(ProcessNo);
2749 2785
            }
2750 2786
        }
2751 2787
        #endregion
......
2759 2795
        {
2760 2796
            // 台帳状況確認画面
2761 2797
            FrmPriceOfBudget frm = new FrmPriceOfBudget();
2798
            int ProcessNo = (int)ClsExcute.ProcessExecuteNo.PriceOfBudget;
2762 2799
            try
2763 2800
            {
2764 2801
                // 自分のハンドルをリストへセットする
2765
                int ProcessNo = (int)ClsExcute.ProcessExecuteNo.PriceOfBudget;
2766 2802
                ClsExcute.SubFormHandleList[ProcessNo].ProcessNo = ProcessNo;
2767 2803
                ClsExcute.SubFormHandleList[ProcessNo].SubFormHandle = (Form)frm;
2768 2804

  
......
2777 2813
            finally
2778 2814
            {
2779 2815
                frm.Dispose(); frm = null;
2816
                // フォームのクリア
2817
                ClsOtherProc.ProcFormClose(ProcessNo);
2780 2818
            }
2781 2819
        }
2782 2820
        #endregion
......
2954 2992
        {
2955 2993
            // 安全パトロール申請
2956 2994
            FrmSafetyPatrol frm = new FrmSafetyPatrol();
2995
            int ProcessNo = (int)ClsExcute.ProcessExecuteNo.ConstructionBaseInfo;
2957 2996
            try
2958 2997
            {
2959 2998
                // 自分のハンドルをリストへセットする
2960
                int ProcessNo = (int)ClsExcute.ProcessExecuteNo.ConstructionBaseInfo;
2961 2999
                ClsExcute.SubFormHandleList[ProcessNo].ProcessNo = ProcessNo;
2962 3000
                ClsExcute.SubFormHandleList[ProcessNo].SubFormHandle = (Form)frm;
2963 3001

  
......
2982 3020
            finally
2983 3021
            {
2984 3022
                frm.Dispose(); frm = null;
3023
                // フォームのクリア
3024
                ClsOtherProc.ProcFormClose(ProcessNo);
2985 3025
            }
2986 3026
        }
2987 3027
        #endregion
......
2995 3035
        {
2996 3036
            // 手間・通常業者一覧
2997 3037
            FrmReqSumTotalList frm = new FrmReqSumTotalList();
3038
            int ProcessNo = (int)ClsExcute.ProcessExecuteNo.ReqSumTotalList;
2998 3039
            try
2999 3040
            {
3000 3041
                // 自分のハンドルをリストへセットする
3001
                int ProcessNo = (int)ClsExcute.ProcessExecuteNo.ReqSumTotalList;
3002 3042
                ClsExcute.SubFormHandleList[ProcessNo].ProcessNo = ProcessNo;
3003 3043
                ClsExcute.SubFormHandleList[ProcessNo].SubFormHandle = (Form)frm;
3004 3044

  
......
3013 3053
            finally
3014 3054
            {
3015 3055
                frm.Dispose(); frm = null;
3056
                // フォームのクリア
3057
                ClsOtherProc.ProcFormClose(ProcessNo);
3016 3058
            }
3017 3059
        }
3018 3060
        #endregion
......
3344 3386
            finally
3345 3387
            {
3346 3388
                frm.Dispose(); frm = null;
3389
                // フォームのクリア
3390
                ClsOtherProc.ProcFormClose(ProcessNo);
3347 3391
            }
3348 3392
        }
3349 3393
        #endregion
......
3388 3432
            finally
3389 3433
            {
3390 3434
                frm.Dispose(); frm = null;
3435
                // フォームのクリア
3436
                ClsOtherProc.ProcFormClose(ProcessNo);
3391 3437
            }
3392 3438
        }
3393 3439
        #endregion
......
3401 3447
        {
3402 3448
            // 注文書入力一覧
3403 3449
            FrmInputBillingList frm = new FrmInputBillingList();
3404
            int ProcessNo = (int)ClsExcute.ProcessExecuteNo.PurchaseOrderList;
3450
            int ProcessNo = (int)ClsExcute.ProcessExecuteNo.WebInputBillingList;
3405 3451
            try
3406 3452
            {
3407 3453
                // 自分のハンドルをリストへセットする
......
3429 3475
            finally
3430 3476
            {
3431 3477
                frm.Dispose(); frm = null;
3478
                // フォームのクリア
3479
                ClsOtherProc.ProcFormClose(ProcessNo);
3432 3480
            }
3433 3481
        }
3434 3482
        #endregion
3435 3483

  
3436
        #region 59:支払通知書印刷
3484
        #region 支払通知書印刷
3437 3485
        /// <summary>
3438
        /// 59:支払通知書印刷
3486
        /// 支払通知書印刷
3439 3487
        /// </summary>
3440 3488
        /// <returns></returns>
3441 3489
        public static void ProcessExecuteNo_PaymentNotice(ProcessParameter CurrentPara)
3442 3490
        {
3443 3491
            // 注文書入力一覧
3444 3492
            FrmPaymentNotice frm = new FrmPaymentNotice();
3445
            int ProcessNo = (int)ClsExcute.ProcessExecuteNo.PurchaseOrderList;
3493
            int ProcessNo = (int)ClsExcute.ProcessExecuteNo.PaymentNotice;
3446 3494
            try
3447 3495
            {
3448 3496
                // 自分のハンドルをリストへセットする
......
3470 3518
            finally
3471 3519
            {
3472 3520
                frm.Dispose(); frm = null;
3521
                // フォームのクリア
3522
                ClsOtherProc.ProcFormClose(ProcessNo);
3473 3523
            }
3474 3524
        }
3475 3525
        #endregion
3476 3526

  
3527
        #region 協力会社請求
3528
        /// <summary>
3529
        /// 協力会社請求
3530
        /// </summary>
3531
        /// <returns></returns>
3532
        public static void ProcessExecuteNo_SubcontrInvoice(ProcessParameter CurrentPara)
3533
        {
3534
            // 注文書入力一覧
3535
            FrmSubcontrInvoice frm = new FrmSubcontrInvoice();
3536
            int ProcessNo = (int)ClsExcute.ProcessExecuteNo.SubcontrInvoice;
3537
            try
3538
            {
3539
                // 自分のハンドルをリストへセットする
3540
                ClsExcute.SubFormHandleList[ProcessNo].ProcessNo = ProcessNo;
3541
                ClsExcute.SubFormHandleList[ProcessNo].SubFormHandle = (Form)frm;
3542

  
3543
                // 起動・編集フラグ
3544
                int EditFlg = (int)CommonDefine.ProcessDataEdit.Reference;
3545
                if (!ClsSecurityPermission.GetExecutePermission(ProcessNo, ref EditFlg)) return;
3546

  
3547
                // ----- パラメータセット
3548
                // 対象年月
3549
                frm.RequestMonth = CurrentPara.IntExecParameter[0];
3550
                // 支払区分
3551
                frm.LabourLind = CurrentPara.IntExecParameter[1];
3552

  
3553
                // フォーム表示
3554
                frm.ShowDialog();
3555
            }
3556
            catch (Exception ex)
3557
            {
3558
                logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message);
3559
                BackProcess();
3560
            }
3561
            finally
3562
            {
3563
                frm.Dispose(); frm = null;
3564
                // フォームのクリア
3565
                ClsOtherProc.ProcFormClose(ProcessNo);
3566
            }
3567
        }
3477 3568
        #endregion
3478 3569

  
3570
        #endregion
3571

  
3479 3572
        #region マスタメンテナンス
3480 3573
        // ----------------- メンテナンス起動
3481 3574
        #region 管理マスタ
trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOConstructionProgressDate.cs
35 35
        {
36 36
            ConstructionCode,
37 37
            ConstructionStatusFlg,
38
            SeqNo,
38 39
            PreviousStatusFlg,
39 40
            ChangeDate,
40 41
            ChangePersonCode,
......
55 56

  
56 57
        #endregion
57 58

  
59
        #region テーブルのフィールドリストを作成する
60
        /// <summary>
61
        /// テーブルのフィールドリストを作成する
62
        /// </summary>
63
        /// <returns></returns>
64
        public static string CreateFieldNameList(string strAlias = "")
65
        {
66
            StringBuilder strcmd = new StringBuilder();
67
            try
68
            {
69
                strcmd.Append(" ");
70
                bool bColFirst = true;
71
                string strWork = string.Empty;
72
                foreach (var gender in Enum.GetValues(typeof(ColumnName)))
73
                {
74
                    strWork = gender.ToString();
75
                    if (!bColFirst) strcmd.Append(",");
76
                    if (strWork.Equals("EntryDate") || strWork.Equals("UpdateDate") || strWork.Equals("ChangeDate"))
77
                    {
78
                        strcmd.AppendFormat(" DATE_FORMAT({0}{1}, '%Y/%m/%d %H:%i:%s') As {1}", strAlias, strWork);
79
                    }
80
                    else
81
                    {
82
                        strcmd.AppendFormat(" {0}{1}", strAlias, strWork);
83
                    }
84
                    bColFirst = false;
85
                }
86

  
87
                return strcmd.ToString();
88
            }
89
            catch (Exception ex)
90
            {
91
                logger.ErrorFormat("システムエラー:{0}:{1}:{2}", CommonMotions.GetMethodName(2), ex.Message, strcmd.ToString());
92
                return string.Empty;
93
            }
94
        }
95
        #endregion
96

  
58 97
        #region SQL作成
59 98
        /// <summary>
60 99
        /// SQL作成
......
64 103
        {
65 104
            // SQL作成(DateTime型が変換できないのでCharに変換しておく)
66 105
            StringBuilder strcmd = new StringBuilder();
67
            strcmd.Append("SELECT");
68
            strcmd.Append(" ConstructionCode");
69
            strcmd.Append(",ConstructionStatusFlg");
70
            strcmd.Append(",PreviousStatusFlg");
71
            strcmd.Append(",DATE_FORMAT(ChangeDate, '%Y/%m/%d %H:%i:%s')");
72
            strcmd.Append(",ChangePersonCode");
73 106

  
74
            strcmd.Append(",DATE_FORMAT(EntryDate, '%Y/%m/%d %H:%i:%s')");
75
            strcmd.Append(",DATE_FORMAT(UpdateDate, '%Y/%m/%d %H:%i:%s')");
76
            strcmd.Append(" FROM ConstructionProgressDate");
107
            strcmd.AppendFormat("SELECT {0} FROM ConstructionProgressDate", CreateFieldNameList());
77 108

  
78 109
            return strcmd.ToString();
79 110
        }
......
149 180

  
150 181
                    strcmd.AppendFormat("  {0}", work.ConstructionCode.ToString());
151 182
                    strcmd.AppendFormat(", {0}", work.ConstructionStatusFlg.ToString());
183
                    strcmd.AppendFormat(", {0}", work.SeqNo.ToString());
152 184
                    strcmd.AppendFormat(", {0}", work.PreviousStatusFlg.ToString());
153 185
                    strcmd.AppendFormat(", STR_TO_DATE('{0}','%Y/%m/%d %H:%i:%s')", work.ChangeDate.ToString());
154 186
                    strcmd.AppendFormat(", {0}", work.ChangePersonCode.ToString());
......
191 223

  
192 224
                strcmd.AppendFormat("  {0}", data.ConstructionCode.ToString());
193 225
                strcmd.AppendFormat(", {0}", data.ConstructionStatusFlg.ToString());
226
                strcmd.AppendFormat(", {0}", data.SeqNo.ToString());
194 227
                strcmd.AppendFormat(", {0}", data.PreviousStatusFlg.ToString());
195 228
                strcmd.AppendFormat(", STR_TO_DATE('{0}','%Y/%m/%d %H:%i:%s')", data.ChangeDate.ToString());
196 229
                strcmd.AppendFormat(", {0}", data.ChangePersonCode.ToString());
......
230 263

  
231 264
                strcmd.AppendFormat(" ConstructionCode = {0}", data.ConstructionCode.ToString());
232 265
                strcmd.AppendFormat(",ConstructionStatusFlg = {0}", data.ConstructionStatusFlg.ToString());
266
                strcmd.AppendFormat(",SeqNo = {0}", data.SeqNo.ToString());
233 267
                strcmd.AppendFormat(",PreviousStatusFlg = {0}", data.PreviousStatusFlg.ToString());
234 268
                strcmd.AppendFormat(",ChangeDate = STR_TO_DATE('{0}','%Y/%m/%d %H:%i:%s')", data.ChangeDate.ToString());
235 269
                strcmd.AppendFormat(",ChangePersonCode = {0}", data.ChangePersonCode.ToString());
......
281 315
        /// 1項目の更新を行う
282 316
        /// </summary>
283 317
        /// <returns></returns>
284
        public bool UpdateFeild(int ConstructionCode, DateTime ChangeDate, int FeildNo, object value, bool bConnect = true)
318
        public bool UpdateFeild(int ConstructionCode,
319
                                int ConstructionStatusFlg,
320
                                int SeqNo,
321
                                int FeildNo,
322
                                object value,
323
                                bool bConnect = true)
285 324
        {
286 325
            StringBuilder strcmd = new StringBuilder();
287 326
            try
......
297 336
                    case (int)ColumnName.ConstructionStatusFlg:
298 337
                        strcmd.AppendFormat(" ConstructionStatusFlg = {0}", ((int)value).ToString());
299 338
                        break;
339
                    case (int)ColumnName.SeqNo:
340
                        strcmd.AppendFormat(" SeqNo = {0}", ((int)value).ToString());
341
                        break;
300 342
                    case (int)ColumnName.PreviousStatusFlg:
301 343
                        strcmd.AppendFormat(" PreviousStatusFlg = {0}", ((int)value).ToString());
302 344
                        break;
......
309 351
                }
310 352

  
311 353
                strcmd.Append(", UpdateDate = NOW()");
312
                strcmd.Append(CreatePrimarykeyString(ConstructionCode, ChangeDate));
354
                strcmd.Append(CreatePrimarykeyString(ConstructionCode, ConstructionStatusFlg, SeqNo));
313 355

  
314 356
                if (!ExecuteNonQuery(strcmd.ToString(), bConnect)) return false;
315 357

  
......
336 378
                // データ取得
337 379
                wrk.ConstructionCode = int.Parse(objwrk[(int)ColumnName.ConstructionCode].ToString());
338 380
                wrk.ConstructionStatusFlg = int.Parse(objwrk[(int)ColumnName.ConstructionStatusFlg].ToString());
381
                wrk.SeqNo = int.Parse(objwrk[(int)ColumnName.SeqNo].ToString());
339 382
                wrk.PreviousStatusFlg = int.Parse(objwrk[(int)ColumnName.PreviousStatusFlg].ToString());
340 383
                wrk.ChangeDate = DateTime.Parse(objwrk[(int)ColumnName.ChangeDate].ToString());
341 384
                wrk.ChangePersonCode = int.Parse(objwrk[(int)ColumnName.ChangePersonCode].ToString());
......
359 402
        /// <summary>
360 403
        /// 主キー検索の文字列を返す
361 404
        /// </summary>
362
        /// <param name="BusinessTypeCode"></param>
363 405
        /// <returns>Where文字列</returns>
364
        public string CreatePrimarykeyString(int ConstructionCode)
406
        public string CreatePrimarykeyString(int ConstructionCode, int ConstructionStatusFlg = 0, int SeqNo = 0)
365 407
        {
366 408
            StringBuilder strWork = new StringBuilder();
367 409
            try
368 410
            {
369 411
                strWork.AppendFormat(" Where ConstructionCode = {0}", ConstructionCode.ToString());
412
                if (ConstructionStatusFlg > 0)
413
                {
414
                    strWork.AppendFormat(" And ConstructionStatusFlg = {0}", ConstructionStatusFlg.ToString());
415
                }
416
                if (SeqNo > 0)
417
                {
418
                    strWork.AppendFormat(" And SeqNo = {0}", SeqNo.ToString());
419
                }
370 420

  
371 421
                return strWork.ToString();
372 422
            }
......
376 426
                return string.Empty;
377 427
            }
378 428
        }
379
        public string CreatePrimarykeyString(int ConstructionCode, DateTime ChangeDate)
429
        #endregion
430

  
431
        #region 対象データの新規シーケンス番号を取得する
432
        /// <summary>
433
        /// 対象データの新規シーケンス番号を取得する
434
        /// </summary>
435
        /// <returns></returns>
436
        public int CreateNewSeqNo(int ConstrCode, int StatusCode, bool bConnect = true)
380 437
        {
381
            StringBuilder strWork = new StringBuilder();
382 438
            try
383 439
            {
384
                strWork.AppendFormat(" Where ConstructionCode = {0}", ConstructionCode.ToString());
385
                strWork.AppendFormat(" And ChangeDate = STR_TO_DATE('{0}', '%Y/%m/%d %H:%i:%s')", ChangeDate.ToString());
440
                // 最大値の番号取得
441
                StringBuilder strSQL = new StringBuilder();
442
                strSQL.Append("Select");
443
                strSQL.Append(" IFNULL(MAX(SeqNo), 0)");
444
                strSQL.Append(" FROM ConstructionProgressDate");
445
                strSQL.AppendFormat(" WHERE ConstructionCode = {0}", ConstrCode);
446
                strSQL.AppendFormat(" AND ConstructionStatusFlg = {0}", StatusCode);
386 447

  
387
                return strWork.ToString();
448
                // データが無ければ抜ける
449
                ArrayList arData = new ArrayList();
450
                if (!ExecuteReader(strSQL.ToString(), ref arData, bConnect)) return 1;
451

  
452
                object[] wrkobj = (object[])arData[0];
453

  
454
                return CommonMotions.cnvInt(wrkobj[0]) + 1;
388 455
            }
389
            catch (Exception ex)
456
            catch (System.Exception ex)
390 457
            {
391
                logger.ErrorFormat("システムエラー:{0}:{1}:{2}", CommonMotions.GetMethodName(2), ex.Message, strWork.ToString());
392
                return string.Empty;
458
                logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message);
459
                return -1;
393 460
            }
394 461
        }
395 462
        #endregion
trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOMConstructionItem.cs
339 339
        }
340 340
        #endregion
341 341

  
342
        #region 1項目更新処理
343
        /// <summary>
344
        /// 1項目の更新を行う
345
        /// </summary>
346
        /// <returns></returns>
347
        public bool UpdateFeild(int ItemCode,
348
                                int FeildNo,
349
                                object value,
350
                                bool bConnect = true)
351
        {
352
            StringBuilder strcmd = new StringBuilder();
353
            try
354
            {
355
                strcmd.Append("UPDATE ConstructionItemMaster");
356

  
357
                strcmd.Append(" SET");
358
                switch (FeildNo)
359
                {
360
                    case (int)NameColumn.ItemCode:
361
                        strcmd.AppendFormat(" ItemCode = {0}", ((int)value).ToString());
362
                        break;
363
                    case (int)NameColumn.DisplayOrder:
364
                        strcmd.AppendFormat(" DisplayOrder = {0}", ((int)value).ToString());
365
                        break;
366
                    case (int)NameColumn.ItemName:
367
                        strcmd.AppendFormat(" ItemName = {0}", SeparateString(value.ToString()));
368
                        break;
369
                    case (int)NameColumn.SubitemsFlg:
370
                        strcmd.AppendFormat(" SubitemsFlg = {0}", ((int)value).ToString());
371
                        break;
372
                    case (int)NameColumn.MyExpensesFlg:
373
                        strcmd.AppendFormat(" MyExpensesFlg = {0}", ((int)value).ToString());
374
                        break;
375
                    case (int)NameColumn.DeleteFlg:
376
                        strcmd.AppendFormat(" DeleteFlg = {0}", ((int)value).ToString());
377
                        break;
378
                }
379

  
380
                strcmd.Append(", UpdateDate = NOW()");
381
                strcmd.Append(CreatePrimarykeyString(ItemCode));
382

  
383
                if (!ExecuteNonQuery(strcmd.ToString(), bConnect)) return false;
384

  
385
                return true;
386
            }
387
            catch (Exception ex)
388
            {
389
                logger.ErrorFormat("システムエラー:{0}:{1}:{2}", CommonMotions.GetMethodName(2), ex.Message, strcmd.ToString());
390
                return false;
391
            }
392
        }
393
        #endregion
394

  
342 395
        #region 削除処理
343 396
        /// <summary>
344 397
        /// 工事項目マスタ削除
trunk/src/ProcessManagement/ProcessManagement/DataModel/CalenderDate.cs
209 209
                            // 日付セット
210 210
                            MonthryData[i].lblDayData[ix + (iy * 7)].Text = iDay.ToString();
211 211

  
212
                            // ここで休日設定、日曜日・第二・第四土曜は赤にする
212
                            // ここで休日設定は赤にする
213 213
                            DateTime dtweek = CommonMotions.cnvDate(CurYear + "/" + CurMonth + "/" + iDay.ToString("00"));
214 214
                            DayOfWeek dayofweek = dtweek.DayOfWeek;
215 215
                            Color clrFore = Color.Black;
......
221 221
                            }
222 222
                            else if (dayofweek == DayOfWeek.Saturday)
223 223
                            {
224
                                int weekcnt = CommonMotions.NthWeek(dtweek);
225
                                int nCnt = Array.IndexOf(m_Sat_Off_Week, weekcnt);
226
                                if (nCnt >= 0)
224
                                // 土曜日は基本出勤
225
                                clrFore = Color.Black;
226
                                clrBack = Color.White;
227

  
228
                                // オリジナル版は第二・第四土曜を休日にする
229
                                if (ProductDefine.ProductType == (int)ProductDefine.ProductTypeDef.Originals)
227 230
                                {
228
                                    clrFore = Color.White;
229
                                    clrBack = Color.Red;
231
                                    int weekcnt = CommonMotions.NthWeek(dtweek);
232
                                    int nCnt = Array.IndexOf(m_Sat_Off_Week, weekcnt);
233
                                    if (nCnt >= 0)
234
                                    {
235
                                        clrFore = Color.White;
236
                                        clrBack = Color.Red;
237
                                    }
230 238
                                }
231 239
                            }
232 240
                            else
trunk/src/ProcessManagement/ProcessManagement/DataModel/ChgConstrCharge.cs
22 22
            /// </summary>
23 23
            None = 0,
24 24
            /// <summary>
25
            /// 営業担当者
25
            /// 1:営業担当者
26 26
            /// </summary>
27 27
            SalesMain,
28 28
            /// <summary>
29
            /// 営業副担当者
29
            /// 2:営業副担当者
30 30
            /// </summary>
31 31
            SalesSub,
32 32
            /// <summary>
33
            /// 1:指導員
33
            /// 3:指導員
34 34
            /// </summary>
35 35
            Instructor,
36 36
            /// <summary>
37
            /// 2:副担当者
37
            /// 4:副担当者
38 38
            /// </summary>
39 39
            Assistant,
40 40
            /// <summary>
41
            /// 3:担当者
41
            /// 5:担当者
42 42
            /// </summary>
43 43
            Payroll,
44 44
        }
trunk/src/ProcessManagement/ProcessManagement/DataModel/ConstructionProgressDate.cs
20 20
        /// </summary>
21 21
        private int         m_ConstructionStatusFlg = 0;
22 22
        /// <summary>
23
        /// 変更回数
24
        /// </summary>
25
        private int         m_SeqNo = 1; 
26
        /// <summary>
23 27
        /// 変更前状態
24 28
        /// </summary>
25 29
        private int         m_PreviousStatusFlg = 0;
......
62 66
            set { m_ConstructionStatusFlg = value; }
63 67
        }
64 68
        /// <summary>
69
        /// 変更回数
70
        /// </summary>
71
        public int SeqNo
72
        {
73
            get { return m_SeqNo; }
74
            set { m_SeqNo = value; }
75
        }
76
        /// <summary>
65 77
        /// 変更前状態
66 78
        /// </summary>
67 79
        public int PreviousStatusFlg
trunk/src/ProcessManagement/ProcessManagement/Forms/1_Type1_ProtectForm/ProtectForm.cs
1
using System;
2
using System.Collections.Generic;
3
using System.ComponentModel;
4
using System.Data;
5
using System.Drawing;
6
using System.Text;
7
using System.Windows.Forms;
8

  
9
namespace ProcessManagement.Forms
10
{
11
	public partial class ProtectForm : Form
12
	{
13
		private bool getProtectInfo;
14
		
15
		public ProtectForm()
16
		{
17
			InitializeComponent();
18
			getProtectInfo = false;
19
		}
20

  
21
		private void ProtectForm_Load(object sender, EventArgs e)
22
		{
23
			string strProInfo = "";
24

  
25
			if (IntPtr.Size == 4)
26
			{
27
				passwordProtect1.DllFileName = "ProFuncNET32.dll";
28
				strProInfo = "ProInfo32.dll";
29
			}
30
			if (IntPtr.Size == 8)
31
			{
32
				passwordProtect1.DllFileName = "ProFuncNET64.dll";
33
				strProInfo = "ProInfo64.dll";
34
			}
35

  
36
			// ???????i?K?????s????????????j
37
			int ret = passwordProtect1.Initialize("???????.exe", strProInfo);
38
			if (ret != 0)
39
			{
40
				switch (ret)
41
				{
42
					case -1: MessageBox.Show("?g?p????????B"); break;
43
					case 1: MessageBox.Show("?T?[?r?X??????????????B"); break;
44
					case 2: MessageBox.Show("??????t?@?C?????????G???[????B"); break;
45
					case 3: MessageBox.Show("???b?N???[?h???s??????B"); break;
46
					case 4: MessageBox.Show("???[?J???f?B?X?N????s????????????B"); break;
47
					case 5: MessageBox.Show("?G???[????B"); break;
48
				}
49
                this.Close();
50
            }
51

  
52
			string s = passwordProtect1.GetLockword();
53
            // ?K???uLockWord?v??`?F?b?N???s????????????B
54
            // ???A?A?v???P?[?V???????_???v??????b?N???[?h???????????^???????????L?????`?F?b?N????????????
55
            string ChkLockword = "bIt74807239";    // "AbcdefgH"; // ??????????????????????B 
56
			if (s != ChkLockword)
57
			{
58
				MessageBox.Show("???b?N???[?h???s??????B");
59
				this.Close();
60
            }
61

  
62
            if (!passwordProtect1.QueryProtectInfomation())
63
            {
64
                this.Close();
65
            }
66

  
67
            // ???p???
68
            ret = passwordProtect1.QueryProtect();
69

  
70
            // ?v???e?N?g?^?C?v
71
            //switch (passwordProtect1.ProtectWay)
72
            //{
73
            //    case 0: label6.Text = "?W???v???e?N?g"; break;
74
            //    case 1: label6.Text = "?g?p??"; break;
75
            //    case 2: label6.Text = "?g?p????"; break;
76
            //    case 3: label6.Text = "?g?p????"; break;
77
            //    case 4: label6.Text = "?g?p????"; break;
78
            //}
79

  
80
            switch (ret)
81
            {
82
                case -1: label2.Text = "?g?p?s?????B???i?p?X???[?h????????????????B"; break;
83
                case 0:
84
                    int zan = passwordProtect1.QueryRemainDays();
85
                    if (zan >= 0)
86
                    {
87
                        label2.Text = "???? " + zan.ToString();
88
                        label2.Text += " ??????p???p????????";
89
                        getProtectInfo = true;
90
                        s = passwordProtect1.QueryPassword();
91
                        if (s != String.Empty)
92
                        {
93
                            //MessageBox.Show("?p?X???[?h?????????????B");
94
                            getProtectInfo = true;
95
                            this.Close();
96
                        }
97
                    }
98
                    else
99
                    {
100
                        label2.Text = "?g?p??\";
101
                        s = passwordProtect1.QueryPassword();
102
                        if (s != String.Empty)
103
                        {
104
                            //MessageBox.Show("?p?X???[?h?????????????B");
105
                            getProtectInfo = true;
106
                            this.Close();
107
                        }
108
                        else
109
                        {
110
                            MessageBox.Show("???i?p?X???[?h??????????????B");
111
                            getProtectInfo = false;
112
                        }
113
                    }
114
                    break;
115
                case 1: label2.Text = "?v???e?N?g??"; break;
116
                case 2: label2.Text = "?g?p??I?[?o?["; break;
117
                case 3: label2.Text = "?g?p?????I?[?o?["; break;
118
                case 4: label2.Text = "?g?p?????I?[?o?["; break;
119
                case 5: label2.Text = "?g?p?????I?[?o?["; break;
120
                case 6: label2.Text = "???t????????????"; break;
121
                case 7: label2.Text = "PC???????"; break;
122
                case 8: label2.Text = "?v???e?N?g??????t?@?C??????????????????"; break;
123
                case 9: label2.Text = "???b?N???[?h????????????????"; break;
124
                case 10: label2.Text = "?p?X???[?h????????????????"; break;
125
                case 11: label2.Text = "?????"; break;
126
                case 12: label2.Text = "?s??????g?p??v???e?N?g??????t?@?C?????g?p???????"; break;
127
            }
128

  
129
            // PC????
130
            textBox1.Text = passwordProtect1.QueryPcID();
131

  
132
            // QueryProtect???\?b?h????l??0??v???e?N?g???@???W???v???e?N?g?????AQueryPassword???\?b?h?????s????p?X???[?h?????????????????m?F?????????????B
133
            // ?p?X???[?h????????????????QueryProtect???\?b?h????l??0?????ProFuncNET32(64).dll?????????????\???????????B
134
        }
135

  
136
        private void ProtectForm_FormClosed(object sender, FormClosedEventArgs e)
137
		{
138
			// ?v???e?N?g????X?V?i?K?????s????????????j
139
			passwordProtect1.Finish();
140
            if (!getProtectInfo)
141
            {
142
                Application.Exit();
143
            }
144
            
145
        }
146

  
147
        private void button2_Click(object sender, EventArgs e)
148
		{
149
			if (passwordProtect1.SetPassword(textBox2.Text))
150
            {
151
                getProtectInfo = true;
152
                this.Close();
153
            }
154
            else
155
            {
156
                MessageBox.Show("?p?X???[?h???????");
157
            }
158
        }
159

  
160
        private void button1_Click(object sender, EventArgs e)
161
        {
162
            if (!getProtectInfo)
163
            {
164
                MessageBox.Show("???p????????B");
165
                this.Close();
166
            }
167
            else
168
            {
169
                this.Close();
170
            }
171
        }
172
    }
173
}
trunk/src/ProcessManagement/ProcessManagement/Forms/1_Type1_ProtectForm/ProtectForm.designer.cs
1
using Newtone.ProtectKit.Win;
2

  
3
namespace ProcessManagement.Forms
4
{
5
    partial class ProtectForm
6
    {
7
        /// <summary>
8
        /// 必要なデザイナ変数です。
9
        /// </summary>
10
        private System.ComponentModel.IContainer components = null;
11

  
12
        /// <summary>
13
        /// 使用中のリソースをすべてクリーンアップします。
14
        /// </summary>
15
        /// <param name="disposing">マネージ リソースが破棄される場合 true、破棄されない場合は false です。</param>
16
        protected override void Dispose(bool disposing)
17
        {
18
            if (disposing && (components != null))
19
            {
20
                components.Dispose();
21
            }
22
            base.Dispose(disposing);
23
        }
24

  
25
        #region Windows フォーム デザイナで生成されたコード
26

  
27
        /// <summary>
28
        /// デザイナ サポートに必要なメソッドです。このメソッドの内容を
29
        /// コード エディタで変更しないでください。
30
        /// </summary>
31
        private void InitializeComponent()
32
        {
33
            this.components = new System.ComponentModel.Container();
34
            System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ProtectForm));
35
            this.label1 = new System.Windows.Forms.Label();
36
            this.label2 = new System.Windows.Forms.Label();
37
            this.label3 = new System.Windows.Forms.Label();
38
            this.label4 = new System.Windows.Forms.Label();
39
            this.label5 = new System.Windows.Forms.Label();
40
            this.textBox1 = new System.Windows.Forms.TextBox();
41
            this.textBox2 = new System.Windows.Forms.TextBox();
42
            this.button1 = new System.Windows.Forms.Button();
43
            this.button2 = new System.Windows.Forms.Button();
44
            this.passwordProtect1 = new Newtone.ProtectKit.Win.PasswordProtect(this.components);
45
            this.SuspendLayout();
46
            // 
47
            // label1
48
            // 
49
            this.label1.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
50
            this.label1.Font = new System.Drawing.Font("MS UI Gothic", 10.2F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
51
            this.label1.Location = new System.Drawing.Point(31, 36);
52
            this.label1.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
53
            this.label1.Name = "label1";
54
            this.label1.Size = new System.Drawing.Size(161, 38);
55
            this.label1.TabIndex = 1;
56
            this.label1.Text = "ご利用状態";
57
            this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
58
            // 
59
            // label2
60
            // 
61
            this.label2.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
62
            this.label2.Location = new System.Drawing.Point(193, 36);
63
            this.label2.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
64
            this.label2.Name = "label2";
65
            this.label2.Size = new System.Drawing.Size(462, 38);
66
            this.label2.TabIndex = 9;
67
            this.label2.Text = "label2";
68
            this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
69
            // 
70
            // label3
71
            // 
72
            this.label3.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
73
            this.label3.Font = new System.Drawing.Font("MS UI Gothic", 10.2F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
74
            this.label3.Location = new System.Drawing.Point(31, 101);
75
            this.label3.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
76
            this.label3.Name = "label3";
77
            this.label3.Size = new System.Drawing.Size(161, 46);
78
            this.label3.TabIndex = 0;
79
            this.label3.Text = "PC情報";
80
            this.label3.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
81
            // 
82
            // label4
83
            // 
84
            this.label4.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
85
            this.label4.Location = new System.Drawing.Point(193, 101);
86
            this.label4.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
87
            this.label4.Name = "label4";
88
            this.label4.Size = new System.Drawing.Size(462, 24);
89
            this.label4.TabIndex = 0;
90
            this.label4.Text = "下記のPC情報をメールでお知らせください";
91
            this.label4.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
92
            // 
93
            // label5
94
            // 
95
            this.label5.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
96
            this.label5.Location = new System.Drawing.Point(193, 173);
97
            this.label5.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
98
            this.label5.Name = "label5";
99
            this.label5.Size = new System.Drawing.Size(330, 24);
100
            this.label5.TabIndex = 0;
101
            this.label5.Text = "下記に製品パスワードを入力してください";
102
            this.label5.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
103
            // 
104
            // textBox1
105
            // 
106
            this.textBox1.Location = new System.Drawing.Point(193, 125);
107
            this.textBox1.Margin = new System.Windows.Forms.Padding(4);
108
            this.textBox1.Name = "textBox1";
109
            this.textBox1.Size = new System.Drawing.Size(462, 22);
110
            this.textBox1.TabIndex = 31;
111
            // 
112
            // textBox2
113
            // 
114
            this.textBox2.Location = new System.Drawing.Point(193, 201);
115
            this.textBox2.Margin = new System.Windows.Forms.Padding(4);
116
            this.textBox2.Name = "textBox2";
117
            this.textBox2.Size = new System.Drawing.Size(462, 22);
118
            this.textBox2.TabIndex = 37;
119
            // 
120
            // button1
121
            // 
122
            this.button1.Location = new System.Drawing.Point(673, 36);
123
            this.button1.Margin = new System.Windows.Forms.Padding(4);
124
            this.button1.Name = "button1";
125
            this.button1.Size = new System.Drawing.Size(134, 38);
126
            this.button1.TabIndex = 38;
127
            this.button1.Text = "試用利用";
128
            this.button1.UseVisualStyleBackColor = true;
129
            this.button1.Click += new System.EventHandler(this.button1_Click);
130
            // 
131
            // button2
132
            // 
133
            this.button2.Location = new System.Drawing.Point(306, 247);
134
            this.button2.Margin = new System.Windows.Forms.Padding(4);
135
            this.button2.Name = "button2";
136
            this.button2.Size = new System.Drawing.Size(217, 38);
137
            this.button2.TabIndex = 36;
138
            this.button2.Text = "製品パスワードを設定する";
139
            this.button2.UseVisualStyleBackColor = true;
140
            this.button2.Click += new System.EventHandler(this.button2_Click);
141
            // 
142
            // passwordProtect1
143
            // 
144
            this.passwordProtect1.Stream = ((System.IO.MemoryStream)(resources.GetObject("passwordProtect1.Stream")));
145
            // 
146
            // ProtectForm
147
            // 
148
            this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F);
149
            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
150
            this.ClientSize = new System.Drawing.Size(832, 309);
151
            this.Controls.Add(this.label1);
152
            this.Controls.Add(this.label2);
153
            this.Controls.Add(this.label3);
154
            this.Controls.Add(this.label4);
155
            this.Controls.Add(this.label5);
156
            this.Controls.Add(this.textBox1);
157
            this.Controls.Add(this.textBox2);
158
            this.Controls.Add(this.button1);
159
            this.Controls.Add(this.button2);
160
            this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
161
            this.Margin = new System.Windows.Forms.Padding(4);
162
            this.Name = "ProtectForm";
163
            this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
164
            this.Text = "製品パスワード確認";
165
            this.FormClosed += new System.Windows.Forms.FormClosedEventHandler(this.ProtectForm_FormClosed);
166
            this.Load += new System.EventHandler(this.ProtectForm_Load);
... 差分の行数が表示可能な上限を超えました。超過分は表示しません。

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