リビジョン 83
マージ済みソース(元Div79)
| branches/src/ProcessManagement/ProcessManagement/Common/CommonDefine.cs | ||
|---|---|---|
| 92 | 92 | /// </summary> | 
| 93 | 93 | public static int AdminSecurityManagement = -1; | 
| 94 | 94 |  | 
| 95 | #region 旧機密管理 | |
| 95 | 96 | /// <summary> | 
| 96 | 97 | /// 旧機密管理番号 | 
| 97 | 98 | /// </summary> | 
| ... | ... | |
| 122 | 123 | new KeyValuePair<int,string>(2,"統括責任者"), | 
| 123 | 124 | new KeyValuePair<int,string>(3,"所 属 長"), | 
| 124 | 125 | new KeyValuePair<int,string>(4,"一般使用者")}; | 
| 126 | #endregion | |
| 127 |  | |
| 125 | 128 | /// <summary> | 
| 126 | 129 | /// 機密管理番号 | 
| 127 | 130 | /// </summary> | 
| ... | ... | |
| 480 | 483 | public enum ApprovalStatus | 
| 481 | 484 |         {
 | 
| 482 | 485 | /// <summary> | 
| 483 | /// 申請中 | |
| 486 |             /// 0:申請中
 | |
| 484 | 487 | /// </summary> | 
| 485 | 488 | Petition = 0, | 
| 486 | 489 | /// <summary> | 
| 487 | /// 保 留 | |
| 490 |             /// 1:保 留
 | |
| 488 | 491 | /// </summary> | 
| 489 | 492 | Pending, | 
| 490 | 493 | /// <summary> | 
| 491 | /// 承 認 | |
| 494 |             /// 2:承 認
 | |
| 492 | 495 | /// </summary> | 
| 493 | 496 | Approval, | 
| 494 | 497 | /// <summary> | 
| 495 | /// 不承認 | |
| 498 |             /// 3:不承認
 | |
| 496 | 499 | /// </summary> | 
| 497 | 500 | NotApproval, | 
| 498 | 501 | /// <summary> | 
| 499 | /// 未 定 | |
| 502 |             /// 4:未 定
 | |
| 500 | 503 | /// </summary> | 
| 501 | 504 | Undecided, | 
| 502 | 505 | /// <summary> | 
| 503 | /// 未申請 | |
| 506 |             /// 5:未申請
 | |
| 504 | 507 | /// </summary> | 
| 505 | 508 | Unclaimed, | 
| 506 | 509 | } | 
| 507 | 510 | /// <summary> | 
| 508 | 511 | /// 申請状態色 | 
| 509 | 512 | /// </summary> | 
| 510 |         public static Color[] ApprovalBackColorStatusColor = new Color[] { Color.Blue, Color.Yellow, Color.MediumSpringGreen, Color.Red, Color.LightSkyBlue, Color.LightBlue };
 | |
| 511 |         public static Color[] ApprovalForeColorStatusColor = new Color[] { Color.White, Color.Black, Color.Black, Color.Black, Color.Black, Color.Black };
 | |
| 513 |         public static Color[] ApprovalBackStatusColor = new Color[] { Color.Blue, Color.Yellow, Color.MediumSpringGreen, Color.Red, Color.LightSkyBlue, Color.LightBlue };
 | |
| 514 |         public static Color[] ApprovalForeStatusColor = new Color[] { Color.White, Color.Black, Color.Black, Color.Black, Color.Black, Color.Black };
 | |
| 512 | 515 |  | 
| 513 | 516 | /// <summary> | 
| 514 | 517 | /// 承認状態文字 | 
| ... | ... | |
| 1660 | 1663 | new KeyValuePair<int,string>(1,"総務業務可能")}; | 
| 1661 | 1664 | #endregion | 
| 1662 | 1665 |  | 
| 1666 | #region 承認対象区分 | |
| 1667 | /// <summary> | |
| 1668 | /// 承認対象区分 | |
| 1669 | /// </summary> | |
| 1670 | public enum ApprovalDivision | |
| 1671 |         {
 | |
| 1672 | /// <summary> | |
| 1673 | /// 工事対象承認 | |
| 1674 | /// </summary> | |
| 1675 | ConstrApproval = 1, | |
| 1676 | /// <summary> | |
| 1677 | /// 担当者対象承認 | |
| 1678 | /// </summary> | |
| 1679 | PerosonApproval, | |
| 1680 | } | |
| 1681 | #endregion | |
| 1663 | 1682 | #region 業者手間区分 | 
| 1664 | 1683 | /// <summary> | 
| 1665 | 1684 | /// 業者手間区分 // Add BIT 2017/02/23 | 
| branches/src/ProcessManagement/ProcessManagement/Common/CommonMotions.cs | ||
|---|---|---|
| 1795 | 1795 | wrk.BackColor = CommonDefine.s_clrError; | 
| 1796 | 1796 | } | 
| 1797 | 1797 | } | 
| 1798 | else if (objCtrl.GetType().Equals(typeof(NumericUpDown))) | |
| 1799 |             {
 | |
| 1800 | NumericUpDown wrk = (NumericUpDown)objCtrl; | |
| 1801 | if (bPara) | |
| 1802 |                 {
 | |
| 1803 | wrk.BackColor = CommonDefine.s_clrNormal; | |
| 1804 | } | |
| 1805 | else | |
| 1806 |                 {
 | |
| 1807 | wrk.BackColor = CommonDefine.s_clrError; | |
| 1808 | } | |
| 1809 | } | |
| 1798 | 1810 | } | 
| 1799 | 1811 |  | 
| 1800 | 1812 | #endregion | 
| branches/src/ProcessManagement/ProcessManagement/Common/Process/ClsCreateLedgerData.cs | ||
|---|---|---|
| 1 | using System; | |
| 2 | using System.Collections.Generic; | |
| 3 | using System.ComponentModel; | |
| 4 | using System.Data; | |
| 5 | using System.Drawing; | |
| 6 | using System.Linq; | |
| 7 | using System.Text; | |
| 8 | using System.Windows.Forms; | |
| 9 | using System.Collections; | |
| 10 | using System.Diagnostics; | |
| 11 |  | |
| 12 | using log4net; | |
| 13 | using log4net.Appender; | |
| 14 | using log4net.Repository.Hierarchy; | |
| 15 |  | |
| 16 | using ProcessManagement.Common; | |
| 17 | using ProcessManagement.DB.IOAccess; | |
| 18 | using ProcessManagement.DataModel; | |
| 19 | using ProcessManagement.Forms.Master; | |
| 20 | using ProcessManagement.Forms.DataEntry; | |
| 21 | using ProcessManagement.Forms.ControlsAction; | |
| 22 | using ProcessManagement.Forms.SubForms; | |
| 23 |  | |
| 24 | //*----------------------- 工事詳細台帳データ引込クラス -----------------------* | |
| 25 | // 2016/05/31 Ver1.0.0.0 Create Source | |
| 26 | // | |
| 27 | // | |
| 28 | // | |
| 29 | //*----------------------------------------------------------------------------* | |
| 30 | namespace ProcessManagement.Common | |
| 31 | {
 | |
| 32 | //*--------------------- 経費データを工事詳細台帳データ引込む -----------------* | |
| 33 | // 2015/08/12 Ver1.0.0.0 Create Source | |
| 34 | // | |
| 35 | // | |
| 36 | // | |
| 37 | //*----------------------------------------------------------------------------* | |
| 38 | /// <summary> | |
| 39 | /// 経費データを工事詳細台帳データ引込む | |
| 40 | /// </summary> | |
| 41 | public static class ClsCreateLedgerData | |
| 42 |     {
 | |
| 43 | #region ログ定義 | |
| 44 | /// <summary> | |
| 45 | /// log4netログを使用する | |
| 46 | /// </summary> | |
| 47 | private static readonly ILog logger = LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | |
| 48 | #endregion | |
| 49 |  | |
| 50 | #region 定数 | |
| 51 |  | |
| 52 | #endregion | |
| 53 |  | |
| 54 | #region 変数 | |
| 55 | /// <summary> | |
| 56 | /// 工事施工台帳支払い実績先頭カラム数 | |
| 57 | /// </summary> | |
| 58 | private static int m_LedgerColumnCount = 0; | |
| 59 | #endregion | |
| 60 |  | |
| 61 | #region 対象月の工事詳細台帳実行データを作成する | |
| 62 | /// <summary> | |
| 63 | /// 対象月の工事詳細台帳実行データを作成する | |
| 64 | /// </summary> | |
| 65 | /// <param name="PersonCode">担当者コード</param> | |
| 66 | /// <param name="TargetMonth">対象年月</param> | |
| 67 | /// <returns></returns> | |
| 68 | public static bool MakeLedgerData(int PersonCode, string TargetMonth) | |
| 69 |         {
 | |
| 70 | IOCostDataOfPerson CostDB = new IOCostDataOfPerson(); | |
| 71 | IOConstructionLedger LedgerDB = new IOConstructionLedger(); | |
| 72 | IOConstructionLedgerDetail LedgerDetailDB = new IOConstructionLedgerDetail(); | |
| 73 | IOConstructionLedgerExcute LedgerExcuteDB = new IOConstructionLedgerExcute(); | |
| 74 | try | |
| 75 |             {
 | |
| 76 | // 一括処理で登録を行う | |
| 77 | CostDB.connect(); | |
| 78 | LedgerDB.connect(); | |
| 79 | LedgerDetailDB.connect(); | |
| 80 | LedgerExcuteDB.connect(); LedgerExcuteDB.beginTran(); | |
| 81 |  | |
| 82 | // 詳細台帳よりグリッドのカラムを取得する | |
| 83 | GetLedgerColumnCount(); | |
| 84 |  | |
| 85 | // 対象をまず削除する | |
| 86 | string strDelSQL = "DELETE CONSTRUCTIONLEDGEREXCUTE"; | |
| 87 | strDelSQL += " WHERE CONSTRUCTIONCODE IN"; | |
| 88 | strDelSQL += " (SELECT CONSTRUCTIONCODE FROM CONSTRUCTIONBASEINFO"; | |
| 89 |                 strDelSQL += string.Format(" WHERE (SALESPERSONCODE = {0} OR CONSTRUCTIONPERSONCODE = {0} OR CONSTRSUBPERSONCODE = {0} OR CONSTRUCTIONINSTRUCTOR = {0}))", PersonCode);
 | |
| 90 |                 strDelSQL += string.Format(" AND GROUPCOUNT IN ({0}, {1}, {2}, {3}, {4})"
 | |
| 91 | , GetConstructionLedgerGroupNo((int)CommonDefine.CostDataNo.Transport) | |
| 92 | , GetConstructionLedgerGroupNo((int)CommonDefine.CostDataNo.Purchase) | |
| 93 | , GetConstructionLedgerGroupNo((int)CommonDefine.CostDataNo.Lease) | |
| 94 | , GetConstructionLedgerGroupNo((int)CommonDefine.CostDataNo.StoragePlace) | |
| 95 | , GetConstructionLedgerGroupNo((int)CommonDefine.CostDataNo.Lodging)); | |
| 96 |                 strDelSQL += string.Format(" AND TARGETMONTH = TO_DATE('{0}','YYYY/MM/DD')", (TargetMonth + "/01"));
 | |
| 97 | LedgerExcuteDB.ExecuteNonQuery(strDelSQL, false); | |
| 98 |  | |
| 99 | for (int i = (int)CommonDefine.CostDataNo.Transport; i <= (int)CommonDefine.CostDataNo.Lodging; i++) | |
| 100 |                 {
 | |
| 101 | string strSQL = "SELECT CONSTRUCTIONCODE, DATATYPE, TO_CHAR(ACTIONDATE,'YYYY/MM'), SUM(ENTRYPRICE) FROM COSTDATAOFPERSON"; | |
| 102 |                     strSQL += String.Format(" WHERE TO_CHAR(ACTIONDATE,'YYYY/MM') = '{0}'", TargetMonth);
 | |
| 103 |                     strSQL += String.Format(" AND DATATYPE = {0}", i);
 | |
| 104 | strSQL += " AND CONSTRUCTIONCODE IN (SELECT CONSTRUCTIONCODE FROM CONSTRUCTIONBASEINFO"; | |
| 105 |                     strSQL += string.Format(" WHERE (SALESPERSONCODE = {0} OR CONSTRUCTIONPERSONCODE = {0} OR CONSTRSUBPERSONCODE = {0} OR CONSTRUCTIONINSTRUCTOR = {0}))", PersonCode);
 | |
| 106 | strSQL += " GROUP BY CONSTRUCTIONCODE, DATATYPE, TO_CHAR(ACTIONDATE,'YYYY/MM')"; | |
| 107 | strSQL += " ORDER BY CONSTRUCTIONCODE, DATATYPE"; | |
| 108 | ArrayList arList = new ArrayList(); | |
| 109 | if (!CostDB.ExecuteReader(strSQL, ref arList, false)) continue; | |
| 110 | if (arList.Count == 0) continue; | |
| 111 |  | |
| 112 | foreach (object[] wrkrec in arList) | |
| 113 |                     {
 | |
| 114 |  | |
| 115 | // 支払金額 | |
| 116 | int PaymentPrice = CommonMotions.cnvInt(wrkrec[3]); | |
| 117 | // 支払金額無は処理しない | |
| 118 | if (PaymentPrice == 0) continue; | |
| 119 |  | |
| 120 | // 工事番号 | |
| 121 | int ConstructionCode = CommonMotions.cnvInt(wrkrec[0]); | |
| 122 |  | |
| 123 | // グループ番号 | |
| 124 | int DataType = i; | |
| 125 | int GroupNo = GetConstructionLedgerGroupNo(DataType); | |
| 126 |  | |
| 127 | // 工事詳細台帳よりデータの行・列を取得する | |
| 128 | int LineCnt = 0; | |
| 129 | int ColCnt = 0; | |
| 130 | // 台帳が無ければ処理しない | |
| 131 | if (!SearchTatgetConstructionLedger(LedgerDB, LedgerDetailDB, ConstructionCode, GroupNo, TargetMonth, ref LineCnt, ref ColCnt)) continue; | |
| 132 |  | |
| 133 | ConstructionLedgerExcute excRec = new ConstructionLedgerExcute(); | |
| 134 | // データ編集 | |
| 135 | excRec.ConstructionCode = ConstructionCode; | |
| 136 | excRec.GroupCount = GroupNo; | |
| 137 | excRec.LineCount = LineCnt; | |
| 138 | excRec.ColumnCount = ColCnt; | |
| 139 | excRec.PaymentAmount = PaymentPrice; | |
| 140 | excRec.TargetMonth = CommonMotions.cnvDate(TargetMonth + "/01"); | |
| 141 |  | |
| 142 | if (!LedgerExcuteDB.InsertAction(excRec, false)) | |
| 143 |                         {
 | |
| 144 | LedgerExcuteDB.rollback(); | |
| 145 | return false; | |
| 146 | } | |
| 147 | } | |
| 148 | } | |
| 149 | // DBコミット | |
| 150 | LedgerExcuteDB.commit(); | |
| 151 |  | |
| 152 | return true; | |
| 153 | } | |
| 154 | catch (System.Exception ex) | |
| 155 |             {
 | |
| 156 |                 logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message);
 | |
| 157 | LedgerExcuteDB.rollback(); | |
| 158 | return false; | |
| 159 | } | |
| 160 | finally | |
| 161 |             {
 | |
| 162 | CostDB.close(); CostDB = null; | |
| 163 | LedgerDB.close(); LedgerDB = null; | |
| 164 | LedgerDetailDB.close(); LedgerDetailDB = null; | |
| 165 | LedgerExcuteDB.close(); LedgerExcuteDB = null; | |
| 166 | } | |
| 167 | } | |
| 168 | #endregion | |
| 169 |  | |
| 170 | #region 工事詳細台帳より対象データを探して実行データの行番号・列番号を返す | |
| 171 | /// <summary> | |
| 172 | /// 工事詳細台帳より対象データを探して実行データの行番号・列番号を返す | |
| 173 | /// </summary> | |
| 174 | /// <returns></returns> | |
| 175 | private static bool SearchTatgetConstructionLedger(IOConstructionLedger LedgerDB, IOConstructionLedgerDetail LedgerDetailDB | |
| 176 | ,int ConstructionCode, int GroupNo, string TargetMonth, ref int LineCnt, ref int ColCnt) | |
| 177 |         {
 | |
| 178 | try | |
| 179 |             {
 | |
| 180 | // 台帳データよりカラム数を取得する | |
| 181 | string strLedger = LedgerDB.CreatePrimarykeyString(ConstructionCode); | |
| 182 | ConstructionLedger LedgerRec = new ConstructionLedger(); | |
| 183 | if (!LedgerDB.SelectAction(strLedger, ref LedgerRec, false)) return false; | |
| 184 |  | |
| 185 | // 現在の処理年月をDateTime型に変換する | |
| 186 | DateTime NowDates = CommonMotions.cnvDate(TargetMonth + "/01"); | |
| 187 | // 経過月数を取得する | |
| 188 | int DiffMonth = NowDates.Month - LedgerRec.ConstructionStart.Month; | |
| 189 |  | |
| 190 | // 列番号取得 | |
| 191 | ColCnt = m_LedgerColumnCount + DiffMonth; | |
| 192 |  | |
| 193 | // 工事詳細台帳明細データ読込み | |
| 194 | string strSQL = LedgerDetailDB.CreatePrimarykeyString(ConstructionCode, GroupNo); | |
| 195 | List<ConstructionLedgerDetail> DetailList = new List<ConstructionLedgerDetail>(); | |
| 196 | if (!LedgerDetailDB.SelectAction(strSQL, ref DetailList, false)) return false; | |
| 197 | // 行番号取得 | |
| 198 | LineCnt = DetailList[0].LineCount; | |
| 199 |  | |
| 200 | return true; | |
| 201 | } | |
| 202 | catch (System.Exception ex) | |
| 203 |             {
 | |
| 204 |                 logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message);
 | |
| 205 | return false; | |
| 206 | } | |
| 207 | } | |
| 208 | #endregion | |
| 209 |  | |
| 210 | #region 工事台帳のグループ番号を取得する | |
| 211 | /// <summary> | |
| 212 | /// 工事台帳のグループ番号を取得する | |
| 213 | /// </summary> | |
| 214 | /// <param name="TargetData"></param> | |
| 215 | /// <returns></returns> | |
| 216 | public static int GetConstructionLedgerGroupNo(int TargetData) | |
| 217 |         {
 | |
| 218 | int GroupNo = 0; | |
| 219 | // 工事台帳のグループ番号を取得する | |
| 220 | switch (TargetData) | |
| 221 |             {
 | |
| 222 | case (int)CommonDefine.CostDataNo.Transport: | |
| 223 | // 交通費(通行料・電車代) | |
| 224 | GroupNo = (int)GroupName_ConstructionLedger.TransportationCosts; | |
| 225 | break; | |
| 226 | case (int)CommonDefine.CostDataNo.Purchase: | |
| 227 | // 購入品 | |
| 228 | GroupNo = (int)GroupName_ConstructionLedger.PurchaseCosts; | |
| 229 | break; | |
| 230 | case (int)CommonDefine.CostDataNo.Lease: | |
| 231 | // 車両リース代 | |
| 232 | GroupNo = (int)GroupName_ConstructionLedger.VehicleLeaseFee; | |
| 233 | break; | |
| 234 | case (int)CommonDefine.CostDataNo.StoragePlace: | |
| 235 | // 駐車場・資材置き場 | |
| 236 | GroupNo = (int)GroupName_ConstructionLedger.ParkingCosts; | |
| 237 | break; | |
| 238 | case (int)CommonDefine.CostDataNo.Lodging: | |
| 239 | // 宿泊費 | |
| 240 | GroupNo = (int)GroupName_ConstructionLedger.RoomChargeCosts; | |
| 241 | break; | |
| 242 | } | |
| 243 | return GroupNo; | |
| 244 | } | |
| 245 | #endregion | |
| 246 |  | |
| 247 | #region 工事詳細台帳より支払金額グリッドの先頭カラム数を取得する | |
| 248 | /// <summary> | |
| 249 | /// 工事詳細台帳より支払金額グリッドの先頭カラム数を取得する | |
| 250 | /// </summary> | |
| 251 | private static void GetLedgerColumnCount() | |
| 252 |         {
 | |
| 253 | FrmConstructionLedger frm = new FrmConstructionLedger(); | |
| 254 | try | |
| 255 |             {
 | |
| 256 | m_LedgerColumnCount = frm.GetGridColumsCount - 1; | |
| 257 | } | |
| 258 | catch (System.Exception ex) | |
| 259 |             {
 | |
| 260 |                 logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message);
 | |
| 261 | } | |
| 262 | finally | |
| 263 |             {
 | |
| 264 | frm.Dispose(); frm = null; | |
| 265 | } | |
| 266 | } | |
| 267 | #endregion | |
| 268 |  | |
| 269 | #region 個人毎経費データから工事詳細台帳の工事毎のデータ再計算更新処理 | |
| 270 | /// <summary> | |
| 271 | /// 個人毎経費データから工事詳細台帳の工事毎のデータ再計算更新処理 | |
| 272 | /// </summary> | |
| 273 | /// <param name="PersonCode"></param> | |
| 274 | /// <param name="TargetMonth"></param> | |
| 275 | /// <returns></returns> | |
| 276 | public static bool UpdateRecalLedgerDataFromTAndPCost(int PersonCode, string TargetMonth) | |
| 277 |         {
 | |
| 278 | IOCostDataOfPerson CostDB = new IOCostDataOfPerson(); | |
| 279 | FrmConstructionLedger frm = new FrmConstructionLedger(); | |
| 280 | try | |
| 281 |             {
 | |
| 282 | string strSQL = "SELECT PERSONCODE, TO_CHAR(ACTIONDATE,'YYYY/MM'), CONSTRUCTIONCODE FROM COSTDATAOFPERSON"; | |
| 283 |                 strSQL += String.Format(" WHERE PERSONCODE = {0} AND TO_CHAR(ACTIONDATE,'YYYY/MM') = '{1}'", PersonCode, TargetMonth);
 | |
| 284 | strSQL += " GROUP BY PERSONCODE, TO_CHAR(ACTIONDATE,'YYYY/MM'), CONSTRUCTIONCODE"; | |
| 285 | strSQL += " ORDER BY CONSTRUCTIONCODE"; | |
| 286 |  | |
| 287 | ArrayList arList = new ArrayList(); | |
| 288 | if (!CostDB.ExecuteReader(strSQL, ref arList)) return false; | |
| 289 | if (arList.Count == 0) return true; | |
| 290 |  | |
| 291 | bool bInit = true; | |
| 292 | foreach (object[] wrkobj in arList) | |
| 293 |                 {
 | |
| 294 | int ConstructionCode = CommonMotions.cnvInt(wrkobj[2]); | |
| 295 | // 工事番号が存在しないデータは更新にしない | |
| 296 | if (ConstructionCode == 0) continue; | |
| 297 |  | |
| 298 | // 工事コードのセット | |
| 299 | frm.ConstructionCode = ConstructionCode; | |
| 300 |  | |
| 301 | if (bInit) | |
| 302 |                     {
 | |
| 303 | // 見えない画面を出す | |
| 304 | frm.Show(); | |
| 305 | // フォーム非表示 | |
| 306 | frm.Visible = false; | |
| 307 | bInit = false; | |
| 308 | } | |
| 309 | // 再計算処理 | |
| 310 | bool bret = frm.RecalculateLedger; | |
| 311 | } | |
| 312 |  | |
| 313 | // 画面を閉じる | |
| 314 | frm.Close(); | |
| 315 | } | |
| 316 | catch (System.Exception ex) | |
| 317 |             {
 | |
| 318 |                 logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message);
 | |
| 319 | return false; | |
| 320 | } | |
| 321 | finally | |
| 322 |             {
 | |
| 323 | CostDB.close(); CostDB = null; | |
| 324 | frm.Dispose(); frm = null; | |
| 325 | } | |
| 326 | return true; | |
| 327 | } | |
| 328 | #endregion | |
| 329 |  | |
| 330 | #region 工事詳細台帳データを新規作成する | |
| 331 | /// <summary> | |
| 332 | /// 工事詳細台帳データを新規作成する | |
| 333 | /// </summary> | |
| 334 | /// <param name="ConstructionCode"></param> | |
| 335 | /// <returns></returns> | |
| 336 | public static bool MakingLedgerData(int ConstructionCode) | |
| 337 |         {
 | |
| 338 | IOConstructionLedger LedgerDB = new IOConstructionLedger(); | |
| 339 | FrmConstructionLedger frm = new FrmConstructionLedger(); | |
| 340 | try | |
| 341 |             {
 | |
| 342 | // 工事番号が存在しないデータは更新しない | |
| 343 | if (ConstructionCode == 0) return false; | |
| 344 |  | |
| 345 | // 工事詳細台帳データが既にあれば作成しない | |
| 346 | string strExists = LedgerDB.CreatePrimarykeyString(ConstructionCode); | |
| 347 | List<ConstructionLedger> LedgerList = new List<ConstructionLedger>(); | |
| 348 | LedgerDB.SelectAction(strExists, ref LedgerList); | |
| 349 | if (LedgerList.Count > 0) return true; | |
| 350 |  | |
| 351 | // 工事コードのセット | |
| 352 | frm.ConstructionCode = ConstructionCode; | |
| 353 |  | |
| 354 | // 見えない画面を出す | |
| 355 | frm.WindowState = FormWindowState.Minimized; | |
| 356 | frm.Show(); | |
| 357 | // フォーム非表示 | |
| 358 | frm.Visible = false; | |
| 359 |  | |
| 360 | // データ作成処理 | |
| 361 | if (!frm.SaveLedgerData) | |
| 362 |                 {
 | |
| 363 | frm.Close(); // 画面を閉じる | |
| 364 | return false; | |
| 365 | } | |
| 366 |  | |
| 367 | // 画面を閉じる | |
| 368 | frm.Close(); | |
| 369 |  | |
| 370 | return true; | |
| 371 | } | |
| 372 | catch (System.Exception ex) | |
| 373 |             {
 | |
| 374 |                 logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message);
 | |
| 375 | return false; | |
| 376 | } | |
| 377 | finally | |
| 378 |             {
 | |
| 379 | frm.Dispose(); frm = null; | |
| 380 | LedgerDB.close(); LedgerDB = null; | |
| 381 | } | |
| 382 | } | |
| 383 | #endregion | |
| 384 |  | |
| 385 | #region 工事詳細台帳データに増減データを追加する | |
| 386 | /// <summary> | |
| 387 | /// 工事詳細台帳データに増減データを追加する | |
| 388 | /// </summary> | |
| 389 | /// <param name="ConstructionCode"></param> | |
| 390 | /// <returns></returns> | |
| 391 | public static bool AddingLedgerData(int ConstructionCode) | |
| 392 |         {
 | |
| 393 | IOConstructionLink LinkDB = new IOConstructionLink(); | |
| 394 | IOConstructionLedger LedgerDB = new IOConstructionLedger(); | |
| 395 | FrmConstructionLedger frm = new FrmConstructionLedger(); | |
| 396 | try | |
| 397 |             {
 | |
| 398 |  | |
| 399 | // 工事番号が存在しないデータは更新しない | |
| 400 | if (ConstructionCode == 0) return false; | |
| 401 |  | |
| 402 | // 親の工事を探す | |
| 403 |                 string strParent = string.Format(" WHERE FluctuationCode = {0}", ConstructionCode);
 | |
| 404 | ConstructionLink LinkRec = new ConstructionLink(); | |
| 405 | if (!LinkDB.SelectAction(strParent, ref LinkRec)) return false; | |
| 406 |  | |
| 407 | // 工事詳細台帳データが無い場合は処理しない | |
| 408 | string strExists = LedgerDB.CreatePrimarykeyString(LinkRec.ConstructionCode); | |
| 409 | ConstructionLedger LedgerList = new ConstructionLedger(); | |
| 410 | if (!LedgerDB.SelectAction(strExists, ref LedgerList)) return false; | |
| 411 |  | |
| 412 | // 工事コードのセット | |
| 413 | frm.ConstructionCode = LinkRec.ConstructionCode; | |
| 414 |  | |
| 415 | // 見えない画面を出す | |
| 416 | frm.WindowState = FormWindowState.Minimized; | |
| 417 | frm.Show(); | |
| 418 | // フォーム非表示 | |
| 419 | frm.Visible = false; | |
| 420 |  | |
| 421 | // データを追加する | |
| 422 | frm.AddingConstrCode = ConstructionCode; | |
| 423 | if (!frm.AddDataLedger) | |
| 424 |                 {
 | |
| 425 | frm.Close(); // 画面を閉じる | |
| 426 | return false; | |
| 427 | } | |
| 428 |  | |
| 429 | // データ作成処理 | |
| 430 | if (!frm.SaveLedgerData) | |
| 431 |                 {
 | |
| 432 | frm.Close(); // 画面を閉じる | |
| 433 | return false; | |
| 434 | } | |
| 435 |  | |
| 436 | // 画面を閉じる | |
| 437 | frm.Close(); | |
| 438 |  | |
| 439 | return true; | |
| 440 | } | |
| 441 | catch (System.Exception ex) | |
| 442 |             {
 | |
| 443 |                 logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message);
 | |
| 444 | return false; | |
| 445 | } | |
| 446 | finally | |
| 447 |             {
 | |
| 448 | frm.Dispose(); frm = null; | |
| 449 | LedgerDB.close(); LedgerDB = null; | |
| 450 | LinkDB.close(); LinkDB = null; | |
| 451 | } | |
| 452 | } | |
| 453 | #endregion | |
| 454 | } | |
| 455 | } | |
| branches/src/ProcessManagement/ProcessManagement/Common/Process/ClsApprovalPermission.cs | ||
|---|---|---|
| 1 | 1 | using System; | 
| 2 | 2 | using System.Collections.Generic; | 
| 3 | using System.Collections; | |
| 3 | 4 | using System.Linq; | 
| 4 | 5 | using System.Text; | 
| 5 | 6 | using System.Threading.Tasks; | 
| ... | ... | |
| 26 | 27 | private static readonly log4net.ILog logger = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | 
| 27 | 28 | #endregion | 
| 28 | 29 |  | 
| 29 | #region 承認申請・承認をする | |
| 30 | #region 定数 | |
| 31 |  | |
| 32 | #region 申請レコード番号 | |
| 30 | 33 | /// <summary> | 
| 31 |         /// 案件の承認申請・承認をする
 | |
| 34 |         /// 申請レコード枝番
 | |
| 32 | 35 | /// </summary> | 
| 33 | /// <param name="ConstructionCode">工事番号</param> | |
| 34 | /// <param name="ApprovalCode">機能番号</param> | |
| 35 | /// <param name="Status">承認状態</param> | |
| 36 | private const int s_PrimartyRecord = 1; | |
| 37 | #endregion | |
| 38 | #endregion | |
| 39 |  | |
| 40 | #region 承認申請・承認をする(工事承認) | |
| 41 | /// <summary> | |
| 42 | /// 案件の承認申請・承認をする(工事承認) | |
| 43 | /// </summary> | |
| 36 | 44 | /// <returns>成功:true 失敗:false</returns> | 
| 37 | 45 | public static bool CreatePetitionApproval(ProcessApproval Rec) | 
| 38 | 46 |         {
 | 
| ... | ... | |
| 68 | 76 | } | 
| 69 | 77 | #endregion | 
| 70 | 78 |  | 
| 71 |         #region 申請レコード更新
 | |
| 79 |         #region 承認申請・承認をする(担当者承認)
 | |
| 72 | 80 | /// <summary> | 
| 73 |         /// 申請レコードを更新する
 | |
| 81 |         /// 案件の承認申請・承認をする(担当者承認)
 | |
| 74 | 82 | /// </summary> | 
| 83 | /// <returns>成功:true 失敗:false</returns> | |
| 84 | public static bool CreatePetitionApproval(PersonApproval Rec) | |
| 85 |         {
 | |
| 86 | IOPersonApproval ApprDB = new IOPersonApproval(); | |
| 87 | try | |
| 88 |             {
 | |
| 89 | string strSQL = ApprDB.CreatePrimarykeyString(Rec.PersonCode, Rec.ApprovalCode, Rec.OrderDate, Rec.OrderNo, Rec.SeqNo); | |
| 90 | List<PersonApproval> DataList = new List<PersonApproval>(); | |
| 91 | // データがあるかをチェックする | |
| 92 | if (!ApprDB.SelectAction(strSQL, ref DataList)) return false; | |
| 93 |  | |
| 94 | // データ追加時 | |
| 95 | if (DataList.Count == 0) | |
| 96 |                 {
 | |
| 97 | if (!ApprDB.InsertAction(Rec)) return false; | |
| 98 | return true; | |
| 99 | } | |
| 100 |  | |
| 101 | // データ更新時 | |
| 102 | if (!ApprDB.UpdateAction(strSQL, Rec)) return false; | |
| 103 |  | |
| 104 | return true; | |
| 105 | } | |
| 106 | catch (Exception ex) | |
| 107 |             {
 | |
| 108 |                 logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message);
 | |
| 109 | return false; | |
| 110 | } | |
| 111 | finally | |
| 112 |             {
 | |
| 113 | ApprDB.close(); ApprDB = null; | |
| 114 | } | |
| 115 | } | |
| 116 | #endregion | |
| 117 |  | |
| 118 | #region 申請レコード更新(工事承認) | |
| 119 | /// <summary> | |
| 120 | /// 申請レコードを更新する(工事承認) | |
| 121 | /// </summary> | |
| 75 | 122 | /// <param name="ConstructionCode"></param> | 
| 76 | 123 | /// <param name="ApprovalCode"></param> | 
| 77 | 124 | /// <param name="Status"></param> | 
| ... | ... | |
| 81 | 128 | IOProcessApproval ApprDB = new IOProcessApproval(); | 
| 82 | 129 | try | 
| 83 | 130 |             {
 | 
| 84 | // 申請レコードを取得する | |
| 85 | //string strSQL = ApprDB.CreatePrimarykeyString(ConstructionCode, ApprovalCode, OrderNO, 1); | |
| 86 | //ProcessApproval DataRec = new ProcessApproval(); | |
| 87 | //// データがあるかをチェックする | |
| 88 | //if (!ApprDB.SelectAction(strSQL, ref DataRec)) return false; | |
| 89 |  | |
| 90 | // レコードのステータスを変える | |
| 91 | //DataRec.ApprovalStatus = Status; | |
| 92 | //if (!ApprDB.UpdateAction(strSQL, DataRec)) return false; | |
| 93 | 131 | if (!ApprDB.UpdateFeild(ConstructionCode, | 
| 94 | 132 | (int)IOProcessApproval.ColumnName.ApprovalStatus, | 
| 95 | 133 | Status, | 
| 96 | 134 | true, | 
| 97 | 135 | ApprovalCode, | 
| 98 | 136 | OrderNO, | 
| 99 |                                         1)) return false;
 | |
| 137 |                                         s_PrimartyRecord)) return false;
 | |
| 100 | 138 |  | 
| 101 | 139 | return true; | 
| 102 | 140 | } | 
| ... | ... | |
| 112 | 150 | } | 
| 113 | 151 | #endregion | 
| 114 | 152 |  | 
| 115 |         #region 申請確認
 | |
| 153 |         #region 申請レコード更新(担当者承認)
 | |
| 116 | 154 | /// <summary> | 
| 155 | /// 申請レコードを更新する(担当者承認) | |
| 156 | /// </summary> | |
| 157 | /// <param name="PersonCode"></param> | |
| 158 | /// <param name="ApprovalCode"></param> | |
| 159 | /// <param name="Status"></param> | |
| 160 | /// <returns></returns> | |
| 161 | public static bool SetPrimaryRecStatus(int PersonCode, int ApprovalCode, DateTime OrderDate, int OrderNo, int Status) | |
| 162 |         {
 | |
| 163 | IOPersonApproval ApprDB = new IOPersonApproval(); | |
| 164 | try | |
| 165 |             {
 | |
| 166 | if (!ApprDB.UpdateFeild(PersonCode, | |
| 167 | ApprovalCode, | |
| 168 | OrderDate, | |
| 169 | (int)IOPersonApproval.ColumnName.ApprovalStatus, | |
| 170 | Status, | |
| 171 | true, | |
| 172 | OrderNo, | |
| 173 | s_PrimartyRecord)) return false; | |
| 174 |  | |
| 175 | return true; | |
| 176 | } | |
| 177 | catch (Exception ex) | |
| 178 |             {
 | |
| 179 |                 logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message);
 | |
| 180 | return false; | |
| 181 | } | |
| 182 | finally | |
| 183 |             {
 | |
| 184 | ApprDB.close(); ApprDB = null; | |
| 185 | } | |
| 186 | } | |
| 187 | #endregion | |
| 188 |  | |
| 189 | #region 申請確認(工事承認) | |
| 190 | /// <summary> | |
| 117 | 191 | /// 案件に対して申請がされているかを確認する | 
| 118 | 192 | /// </summary> | 
| 119 | 193 | /// <param name="ConstructionCode"></param> | 
| 120 | 194 | /// <param name="ApprovalCode"></param> | 
| 121 | 195 | /// <returns></returns> | 
| 122 |         public static bool CheckPetition(int ConstructionCode, int ApprovalCode, int ApprovalCount)
 | |
| 196 |         public static bool CheckProcessPetition(int ConstructionCode, int ApprovalCode, int OrderNo)
 | |
| 123 | 197 |         {
 | 
| 124 | 198 | IOProcessApproval ApprDB = new IOProcessApproval(); | 
| 125 | 199 | try | 
| 126 | 200 |             {
 | 
| 127 | 201 | bool bPetition = false; | 
| 128 | 202 | // 申請データ取得 | 
| 129 |                 string strSQL = ApprDB.CreatePrimarykeyString(ConstructionCode, ApprovalCode, ApprovalCount, 1);
 | |
| 203 |                 string strSQL = ApprDB.CreatePrimarykeyString(ConstructionCode, ApprovalCode, OrderNo, s_PrimartyRecord);
 | |
| 130 | 204 | List<ProcessApproval> PetitionList = new List<ProcessApproval>(); | 
| 131 | 205 | if (!ApprDB.SelectAction(strSQL, ref PetitionList)) return bPetition; | 
| 132 | 206 | // 申請データが無い場合 | 
| ... | ... | |
| 146 | 220 | } | 
| 147 | 221 | #endregion | 
| 148 | 222 |  | 
| 149 |         #region 最終承認確認
 | |
| 223 |         #region 申請確認(担当者承認)
 | |
| 150 | 224 | /// <summary> | 
| 225 | /// 担当者申請がされているかを確認する | |
| 226 | /// </summary> | |
| 227 | /// <param name="PersonCode"></param> | |
| 228 | /// <param name="ApprovalCode"></param> | |
| 229 | /// <returns></returns> | |
| 230 | public static bool CheckPersonPetition(int PersonCode, int ApprovalCode, DateTime ApprovalDate, int OrderNo) | |
| 231 |         {
 | |
| 232 | IOPersonApproval ApprDB = new IOPersonApproval(); | |
| 233 | try | |
| 234 |             {
 | |
| 235 | bool bPetition = false; | |
| 236 | // 申請データ取得 | |
| 237 | string strSQL = ApprDB.CreatePrimarykeyString(PersonCode, ApprovalCode, ApprovalDate, OrderNo); | |
| 238 | List<PersonApproval> PetitionList = new List<PersonApproval>(); | |
| 239 | if (!ApprDB.SelectAction(strSQL, ref PetitionList)) return bPetition; | |
| 240 | // 申請データが無い場合 | |
| 241 | if (PetitionList.Count != 0) bPetition = true; | |
| 242 |  | |
| 243 | return bPetition; | |
| 244 | } | |
| 245 | catch (Exception ex) | |
| 246 |             {
 | |
| 247 |                 logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message);
 | |
| 248 | return false; | |
| 249 | } | |
| 250 | finally | |
| 251 |             {
 | |
| 252 | ApprDB.close(); ApprDB = null; | |
| 253 | } | |
| 254 | } | |
| 255 | #endregion | |
| 256 |  | |
| 257 | #region 最終承認確認(工事承認) | |
| 258 | /// <summary> | |
| 151 | 259 | /// 案件に対して承認がされているかを確認する | 
| 152 | 260 | /// </summary> | 
| 153 | 261 | /// <param name="ConstructionCode"></param> | 
| 154 | 262 | /// <param name="ApprovalCode"></param> | 
| 155 | 263 | /// <returns></returns> | 
| 156 | public static bool CheckApproval(int ConstructionCode, int ApprovalCode, int Approvalcount) | |
| 264 |         public static bool CheckProcessApproval(int ConstructionCode, int ApprovalCode, int Approvalcount)
 | |
| 157 | 265 |         {
 | 
| 158 | 266 | IOMApproval mApprDB = new IOMApproval(); | 
| 159 | 267 | IOProcessApproval ApprDB = new IOProcessApproval(); | 
| 160 | 268 | try | 
| 161 | 269 |             {
 | 
| 162 | 270 | // 承認データを取得する(申請データを除く) | 
| 163 |                 string strData = ApprDB.CreatePrimarykeyString(ConstructionCode, ApprovalCode, Approvalcount, 1);
 | |
| 271 |                 string strData = ApprDB.CreatePrimarykeyString(ConstructionCode, ApprovalCode, Approvalcount, s_PrimartyRecord);
 | |
| 164 | 272 | ProcessApproval DataRec = new ProcessApproval(); | 
| 165 | 273 | if (!ApprDB.SelectAction(strData, ref DataRec)) return false; | 
| 166 | 274 |  | 
| ... | ... | |
| 181 | 289 | } | 
| 182 | 290 | #endregion | 
| 183 | 291 |  | 
| 184 |         #region 承認確認
 | |
| 292 |         #region 最終承認確認(担当者承認)
 | |
| 185 | 293 | /// <summary> | 
| 186 |         /// 案件に対して最終承認がされているかを確認する
 | |
| 294 |         /// 担当者申請に対して承認がされているかを確認する
 | |
| 187 | 295 | /// </summary> | 
| 296 | /// <param name="PersonCode"></param> | |
| 297 | /// <param name="ApprovalCode"></param> | |
| 298 | /// <returns></returns> | |
| 299 | public static bool CheckPersonApproval(int PersonCode, int ApprovalCode, DateTime OrderDate, int OrderNo) | |
| 300 |         {
 | |
| 301 | IOPersonApproval ApprDB = new IOPersonApproval(); | |
| 302 | try | |
| 303 |             {
 | |
| 304 | // 承認データを取得する(申請データを除く) | |
| 305 | string strData = ApprDB.CreatePrimarykeyString(PersonCode, ApprovalCode, OrderDate, OrderNo, s_PrimartyRecord); | |
| 306 | PersonApproval DataRec = new PersonApproval(); | |
| 307 | if (!ApprDB.SelectAction(strData, ref DataRec)) return false; | |
| 308 |  | |
| 309 | if (DataRec.ApprovalStatus != (int)CommonDefine.ApprovalStatus.Approval) return false; | |
| 310 |  | |
| 311 | return true; | |
| 312 | } | |
| 313 | catch (Exception ex) | |
| 314 |             {
 | |
| 315 |                 logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message);
 | |
| 316 | return false; | |
| 317 | } | |
| 318 | finally | |
| 319 |             {
 | |
| 320 | ApprDB.close(); ApprDB = null; | |
| 321 | } | |
| 322 | } | |
| 323 | #endregion | |
| 324 |  | |
| 325 | #region 承認確認(工事承認) | |
| 326 | /// <summary> | |
| 327 | /// 工事案件に対して最終承認がされているかを確認する | |
| 328 | /// </summary> | |
| 188 | 329 | /// <param name="ConstructionCode"></param> | 
| 189 | 330 | /// <param name="ApprovalCode"></param> | 
| 190 | 331 | /// <returns></returns> | 
| 191 | public static bool CheckApprovalData(int ConstructionCode, int ApprovalCode, int OrderNo) | |
| 332 |         public static bool CheckProcessApprovalData(int ConstructionCode, int ApprovalCode, int OrderNo)
 | |
| 192 | 333 |         {
 | 
| 193 | 334 | IOConstructionBaseInfo cbiDB = new IOConstructionBaseInfo(); | 
| 194 | 335 | IOMApproval mApprDB = new IOMApproval(); | 
| ... | ... | |
| 204 | 345 |  | 
| 205 | 346 | // 承認データを取得する(申請データを除く) | 
| 206 | 347 | string strData = ApprDB.CreatePrimarykeyString(ConstructionCode, ApprovalCode, OrderNo); | 
| 207 |                 strData += string.Format(" And SeqNo != 1 And ApprovalStatus = {0}", (int)CommonDefine.ApprovalStatus.Approval);
 | |
| 348 |                 strData += string.Format(" And SeqNo != {0} And ApprovalStatus = {1}", s_PrimartyRecord, (int)CommonDefine.ApprovalStatus.Approval);
 | |
| 208 | 349 | List<ProcessApproval> DataList = new List<ProcessApproval>(); | 
| 209 | 350 | if (!ApprDB.SelectAction(strData, ref DataList)) return false; | 
| 210 | 351 | if (DataList.Count == 0) return false; | 
| ... | ... | |
| 260 | 401 | } | 
| 261 | 402 | #endregion | 
| 262 | 403 |  | 
| 404 | #region 承認確認(担当者承認) | |
| 405 | /// <summary> | |
| 406 | /// 担当者申請に対して最終承認がされているかを確認する | |
| 407 | /// </summary> | |
| 408 | /// <param name="PersonCode"></param> | |
| 409 | /// <param name="ApprovalCode"></param> | |
| 410 | /// <returns></returns> | |
| 411 | public static bool CheckPersonApprovalData(int PersonCode, int ApprovalCode, DateTime OrderDate, int OrderNo) | |
| 412 |         {
 | |
| 413 | IOConstructionBaseInfo cbiDB = new IOConstructionBaseInfo(); | |
| 414 | IOMApproval mApprDB = new IOMApproval(); | |
| 415 | IOPersonApproval ApprDB = new IOPersonApproval(); | |
| 416 | try | |
| 417 |             {
 | |
| 418 | bool bApproval = false; | |
| 419 |  | |
| 420 | // 承認データを取得する(申請データを除く) | |
| 421 | string strSQL = "SELECT A.DISPLAYORDER, A.APPROVALPERSON, A.APPROVALAUTHORITY, B.SEQNO, B.APPROVALSTATUS"; | |
| 422 | strSQL += " FROM APPROVALMASTER A"; | |
| 423 | strSQL += " LEFT JOIN PERSONAPPROVAL B ON B.PERSONCODEAPPROVAL = A.APPROVALPERSON AND B.APPROVALCODE = A.APPROVALCODE"; | |
| 424 |                 strSQL += string.Format(" AND B.ORDERDATE = STR_TO_DATE('{0}','%Y/%m/%d')", OrderDate.ToShortDateString());
 | |
| 425 |                 strSQL += string.Format(" AND B.ORDERNO = {0} AND B.SEQNO != {1}", OrderNo, s_PrimartyRecord);
 | |
| 426 |                 strSQL += string.Format(" WHERE A.APPROVALCODE = {0}", ApprovalCode);
 | |
| 427 | strSQL += " AND A.DEPARTMENTCODE = (SELECT C.DEPARTMENTCODE FROM PERSONINCHARGEMASTER C"; | |
| 428 |                 strSQL += string.Format(" WHERE C.PERSONCODE = {0})", PersonCode);
 | |
| 429 | strSQL += " ORDER BY A.DISPLAYORDER"; | |
| 430 |  | |
| 431 | ArrayList DataList = new ArrayList(); | |
| 432 | if (!ApprDB.ExecuteReader(strSQL, ref DataList)) return false; | |
| 433 | if (DataList.Count == 0) return false; | |
| 434 |  | |
| 435 | int NoCnt = DataList.Count; | |
| 436 | foreach (object[] DataRec in DataList) | |
| 437 |                 {
 | |
| 438 | // 承認以外は対象にしない | |
| 439 | int StatData= CommonMotions.cnvInt(DataRec[4]); | |
| 440 | if (StatData != (int)CommonDefine.ApprovalStatus.Approval) continue; | |
| 441 |  | |
| 442 | // 最終承認権限が設定されていれば承認済み | |
| 443 | int ApprovalAuthority = CommonMotions.cnvInt(DataRec[2]); | |
| 444 | if (ApprovalAuthority == 1) | |
| 445 |                     {
 | |
| 446 | bApproval = true; | |
| 447 | break; | |
| 448 | } | |
| 449 |  | |
| 450 | // 承認していればデータ件数からマイナス | |
| 451 | --NoCnt; | |
| 452 | } | |
| 453 | // マスタに設定されている承認者全員が承認していれば承認 | |
| 454 | if (NoCnt == 0) bApproval = true; | |
| 455 |  | |
| 456 | return bApproval; | |
| 457 | } | |
| 458 | catch (Exception ex) | |
| 459 |             {
 | |
| 460 |                 logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message);
 | |
| 461 | return false; | |
| 462 | } | |
| 463 | finally | |
| 464 |             {
 | |
| 465 | ApprDB.close(); ApprDB = null; | |
| 466 | mApprDB.close(); mApprDB = null; | |
| 467 | cbiDB.close(); cbiDB = null; | |
| 468 | } | |
| 469 | } | |
| 470 | #endregion | |
| 471 |  | |
| 263 | 472 | #region ログインユーザーの承認者確認 | 
| 264 | 473 | /// <summary> | 
| 265 | 474 | /// ログインユーザーは承認者かどうかを確認する | 
| ... | ... | |
| 270 | 479 | public static bool CheckUserForApprover(int ApprovalCode, int DepartmentCode) | 
| 271 | 480 |         {
 | 
| 272 | 481 | IOMApproval mApprDB = new IOMApproval(); | 
| 273 | IOProcessApproval ApprDB = new IOProcessApproval(); | |
| 274 | 482 | try | 
| 275 | 483 |             {
 | 
| 276 | 484 | // システム管理者は全ての権限を持つ | 
| ... | ... | |
| 306 | 514 | } | 
| 307 | 515 | finally | 
| 308 | 516 |             {
 | 
| 309 | ApprDB.close(); ApprDB = null; | |
| 310 | 517 | mApprDB.close(); mApprDB = null; | 
| 311 | 518 | } | 
| 312 | 519 | } | 
| ... | ... | |
| 370 | 577 | /// <summary> | 
| 371 | 578 | /// 工事コードと承認機能コードより現在管理担当部署コードを取得する | 
| 372 | 579 | /// </summary> | 
| 373 | /// <param name="PersonCode"></param> | |
| 374 | 580 | /// <returns></returns> | 
| 375 | 581 | public static int GetFromConstructionAndApprovalTheDepartment(int ConstructionCode, int ApprovalCode, int OrderNo) | 
| 376 | 582 |         {
 | 
| ... | ... | |
| 379 | 585 | try | 
| 380 | 586 |             {
 | 
| 381 | 587 | // 管理担当者コードを取得する | 
| 382 |                 string strSQL = ApprovalDB.CreatePrimarykeyString(ConstructionCode, ApprovalCode, OrderNo, 1);
 | |
| 588 |                 string strSQL = ApprovalDB.CreatePrimarykeyString(ConstructionCode, ApprovalCode, OrderNo, s_PrimartyRecord);
 | |
| 383 | 589 | ProcessApproval ApprovalRec = new ProcessApproval(); | 
| 384 | 590 | int CurrentPersonCode = 0; | 
| 385 | 591 | if (ApprovalDB.SelectAction(strSQL, ref ApprovalRec)) | 
| ... | ... | |
| 412 | 618 | } | 
| 413 | 619 | #endregion | 
| 414 | 620 |  | 
| 621 | #region 担当者コードと承認機能コードより現在管理担当部署コードを取得 | |
| 622 | /// <summary> | |
| 623 | /// 担当者コードと承認機能コードより現在管理担当部署コードを取得する | |
| 624 | /// </summary> | |
| 625 | /// <returns></returns> | |
| 626 | public static int GetFromPersonAndApprovalTheDepartment(int PersonCode, int ApprovalCode, DateTime OrderDate, int OrderNo) | |
| 627 |         {
 | |
| 628 | IOMPersonInCharge picDB = new IOMPersonInCharge(); | |
| 629 | IOPersonApproval ApprovalDB = new IOPersonApproval(); | |
| 630 | try | |
| 631 |             {
 | |
| 632 | // 管理担当者コードを取得する | |
| 633 | string strSQL = ApprovalDB.CreatePrimarykeyString(PersonCode, ApprovalCode, OrderDate, OrderNo, s_PrimartyRecord); | |
| 634 | PersonApproval ApprovalRec = new PersonApproval(); | |
| 635 | int CurrentPersonCode = 0; | |
| 636 | if (ApprovalDB.SelectAction(strSQL, ref ApprovalRec)) | |
| 637 |                 {   // 申請データがある時はそのデータ
 | |
| 638 | CurrentPersonCode = ApprovalRec.PersonCode; | |
| 639 | } | |
| 640 | else | |
| 641 |                 {
 | |
| 642 | // データが無い場合(申請時)は申請ユーザー | |
| 643 | CurrentPersonCode = PersonCode; | |
| 644 | } | |
| 645 |  | |
| 646 | // 担当者部署取得 | |
| 647 | PersonInChargeMaster PersonRec = new PersonInChargeMaster(); | |
| 648 | string strPerson = picDB.CreatePrimarykeyString(CurrentPersonCode); | |
| 649 | if (!picDB.SelectAction(strPerson, ref PersonRec)) return 0; | |
| 650 |  | |
| 651 | return PersonRec.DepartmentCode; | |
| 652 | } | |
| 653 | catch (Exception ex) | |
| 654 |             {
 | |
| 655 |                 logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message);
 | |
| 656 | return 0; | |
| 657 | } | |
| 658 | finally | |
| 659 |             {
 | |
| 660 | ApprovalDB.close(); ApprovalDB = null; | |
| 661 | picDB.close(); picDB = null; | |
| 662 | } | |
| 663 | } | |
| 664 | #endregion | |
| 665 |  | |
| 415 | 666 | #region 工事コードと承認機能コードより現在管理担当者コードを取得 | 
| 416 | 667 | /// <summary> | 
| 417 | 668 | /// 工事コードと承認機能コードより現在管理担当者コードを取得する | 
| ... | ... | |
| 481 | 732 | } | 
| 482 | 733 | #endregion | 
| 483 | 734 |  | 
| 484 | #region 承認数取得 | |
| 735 |         #region 承認数取得(工事承認)
 | |
| 485 | 736 | /// <summary> | 
| 486 | 737 | /// 該当工事より承認数取得する | 
| 487 | 738 | /// </summary> | 
| 488 | 739 | /// <returns></returns> | 
| 489 | public static int GetApprovalDataCount(int ConstructionCode, int ApprovalCode, int ApprovalCount) | |
| 740 |         public static int GetProcessApprovalDataCount(int ConstructionCode, int ApprovalCode, int ApprovalCount)
 | |
| 490 | 741 |         {
 | 
| 491 | 742 | IOProcessApproval paDB = new IOProcessApproval(); | 
| 492 | 743 | try | 
| 493 | 744 |             {
 | 
| 494 | 745 | // 承認データ取得 | 
| 495 | 746 | string strSQL = paDB.CreatePrimarykeyString(ConstructionCode, ApprovalCode, ApprovalCount); | 
| 496 |                 strSQL += " And SeqNo != 1 And ApprovalStatus = 2";
 | |
| 747 |                 strSQL += string.Format(" And SeqNo != {0} And ApprovalStatus = {1}", s_PrimartyRecord, (int)CommonDefine.ApprovalStatus.Approval);
 | |
| 497 | 748 | List<ProcessApproval> ApprovalList = new List<ProcessApproval>(); | 
| 498 | 749 | if (!paDB.SelectAction(strSQL, ref ApprovalList)) return 0; | 
| 499 | 750 |  | 
| ... | ... | |
| 511 | 762 | } | 
| 512 | 763 | #endregion | 
| 513 | 764 |  | 
| 765 | #region 承認数取得(担当者承認) | |
| 766 | /// <summary> | |
| 767 | /// 担当者申請より承認数取得する | |
| 768 | /// </summary> | |
| 769 | /// <returns></returns> | |
| 770 | public static int GetPersonApprovalDataCount(int PersonCode, int ApprovalCode, DateTime ApprovalDate) | |
| 771 |         {
 | |
| 772 | IOPersonApproval paDB = new IOPersonApproval(); | |
| 773 | try | |
| 774 |             {
 | |
| 775 | // 承認データ取得 | |
| 776 | string strSQL = paDB.CreatePrimarykeyString(PersonCode, ApprovalCode, ApprovalDate); | |
| 777 |                 strSQL += string.Format(" And SeqNo != {0} And ApprovalStatus = {1}", s_PrimartyRecord, (int)CommonDefine.ApprovalStatus.Approval);
 | |
| 778 | List<PersonApproval> ApprovalList = new List<PersonApproval>(); | |
| 779 | if (!paDB.SelectAction(strSQL, ref ApprovalList)) return 0; | |
| 780 |  | |
| 781 | return ApprovalList.Count; | |
| 782 | } | |
| 783 | catch (Exception ex) | |
| 784 |             {
 | |
| 785 |                 logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message);
 | |
| 786 | return 0; | |
| 787 | } | |
| 788 | finally | |
| 789 |             {
 | |
| 790 | paDB.close(); paDB = null; | |
| 791 | } | |
| 792 | } | |
| 793 | #endregion | |
| 794 |  | |
| 514 | 795 | #region 承認経路数を取得する | 
| 515 | 796 | /// <summary> | 
| 516 | 797 | /// 承認マスタより承認経路数を取得する | 
| ... | ... | |
| 548 | 829 | /// 承認画面が起動しているかを確認する | 
| 549 | 830 | /// </summary> | 
| 550 | 831 | /// <returns></returns> | 
| 551 | public static bool ExceApprovalScreen() | |
| 832 |         public static bool ExceApprovalScreen(int ApprovalNo = (int)ClsExcute.SubFormExecuteNo.ApprovalScreen)
 | |
| 552 | 833 |         {
 | 
| 553 | 834 | try | 
| 554 | 835 |             {
 | 
| ... | ... | |
| 556 | 837 | // 承認画面からの画面遷移は1画面(対象画面)のみになったのですぐ前にあるはず | 
| 557 | 838 | for (int i = ClsExcute.GetNowProcessPoint() - 1; 0 <= i; i--) | 
| 558 | 839 |                 {
 | 
| 559 |                     if (ClsExcute.ProcControlPara[i].ProcNo == (int)ClsExcute.SubFormExecuteNo.ApprovalScreen)
 | |
| 840 |                     if (ClsExcute.ProcControlPara[i].ProcNo == ApprovalNo)
 | |
| 560 | 841 |                     {
 | 
| 561 | 842 | bRet = true; | 
| 562 | 843 | break; | 
| branches/src/ProcessManagement/ProcessManagement/Common/Process/ClsCalendar.cs | ||
|---|---|---|
| 77 | 77 | int Holidays = 0; | 
| 78 | 78 |  | 
| 79 | 79 | string strSQL = "SELECT COUNT(*) FROM HOLIDAYCALENDERMASTER"; | 
| 80 |                 strSQL += string.Format(" WHERE TO_DATE('{0}','YYYY/MM/DD') <= HOLIDAY", Startdate.ToShortDateString());
 | |
| 81 |                 strSQL += string.Format(" AND HOLIDAY <= TO_DATE('{0}','YYYY/MM/DD')", Complatedate.ToShortDateString());
 | |
| 80 |                 strSQL += string.Format(" WHERE STR_TO_DATE('{0}','%Y/%m/%d') <= HOLIDAY", Startdate.ToShortDateString());
 | |
| 81 |                 strSQL += string.Format(" AND HOLIDAY <= STR_TO_DATE('{0}','%Y/%m/%d')", Complatedate.ToShortDateString());
 | |
| 82 | 82 |  | 
| 83 | 83 | ArrayList datalist = new ArrayList(); | 
| 84 | 84 | if (!calDB.ExecuteReader(strSQL, ref datalist)) return 0; | 
| branches/src/ProcessManagement/ProcessManagement/Common/Process/ClsChangeBaseInfoData.cs | ||
|---|---|---|
| 103 | 103 | IOPurchaseOrderDetail DB18 = new IOPurchaseOrderDetail(); // 注文書明細データ | 
| 104 | 104 |  | 
| 105 | 105 | IOProceedingsData DB19 = new IOProceedingsData(); // 発注者打ち合わせ議事録データ | 
| 106 |             IOProceedingsDataAttendee DB20 = new IOProceedingsDataAttendee();       // 発注者打ち合わせ議事録データ(出席者)
 | |
| 106 |             IOProceedingsDataAttend DB20 = new IOProceedingsDataAttend();           // 発注者打ち合わせ議事録データ(出席者)
 | |
| 107 | 107 | IOProceedingsDataDetail DB21 = new IOProceedingsDataDetail(); // 発注者打ち合わせ議事録データ(明細) | 
| 108 | 108 | IODailyDataConstruction DB22 = new IODailyDataConstruction(); // 日報データ | 
| 109 | 109 | IODailyDataDetail DB23 = new IODailyDataDetail(); // 日報データ (明細) | 
| branches/src/ProcessManagement/ProcessManagement/Common/Process/ClsExcute.cs | ||
|---|---|---|
| 66 | 66 | PurchaseOrderStatus = 19, // 19:注文書発給一覧 | 
| 67 | 67 | OrderJoin = 20, // 20:工事結合 | 
| 68 | 68 | ConstructionSplit = 21, // 21:工事分割 | 
| 69 |             DRTransport = 22,                   // 22:通勤交通費
 | |
| 69 |             PersonApprovalList = 22,            // 22:担当者承認一覧
 | |
| 70 | 70 | MaterialList = 23, // 23:資材一覧 | 
| 71 | 71 | MaterialHistory = 24, // 24:資材履歴画面 | 
| 72 | 72 | MaterialCountEntry = 25, // 25:資材数変更画面 | 
| ... | ... | |
| 77 | 77 | PaymentConfirmation = 30, // 30:入金確認 | 
| 78 | 78 | RequestInput = 31, // 31:請求入力 | 
| 79 | 79 | RequestPrint = 32, // 32:請求書印刷 | 
| 80 | CostomerRegistList = 33, // 33:発注者登録申請一覧 | |
| 81 | CostomerRegist = 34, // 34:発注者登録申請 | |
| 82 | SubConstrRegistList = 35, // 35:協力会社登録申請一覧 | |
| 83 | SubConstrRegist = 36 // 36:協力会社登録申請 | |
| 80 | 84 | } | 
| 81 | 85 | #endregion | 
| 82 | 86 |  | 
| ... | ... | |
| 128 | 132 | MessageReader = 202, // 202:掲示板読込 | 
| 129 | 133 | ActionSchdule = 203, // 203:行動予定入力 | 
| 130 | 134 | VehicleSchdule = 204, // 204:車両予約入力 | 
| 131 | ApprovalScreen = 205, // 205:承認画面 | |
| 135 |             ApprovalScreen = 205,               // 205:工事承認画面
 | |
| 132 | 136 | SubconstractorDiag = 206, // 206:協力会社検索画面 | 
| 133 | 137 | SuppliersDiag = 207, // 207:仕入先検索 | 
| 134 | 138 | SubConJobDiag = 208, // 208:協力会社職種検索画面 | 
| 139 | ApprovalPerson = 209, // 209:担当者承認画面 | |
| 135 | 140 | } | 
| 136 | 141 | #endregion | 
| 137 | 142 |  | 
| 138 | #region 処理名称 | |
| 143 |         #region 通常処理名称
 | |
| 139 | 144 | /// <summary> | 
| 140 | /// 処理名称一覧 | |
| 145 |         /// 通常処理名称一覧
 | |
| 141 | 146 | /// </summary> | 
| 142 | 147 |         public static Dictionary<int, string> ProcessExecuteName = new Dictionary<int, string>(){
 | 
| 143 | 148 |                                                                                 { (int)ProcessExecuteNo.MainMenu,               "メインメニュー"},
 | 
| ... | ... | |
| 151 | 156 |                                                                                 { (int)ProcessExecuteNo.ConstructionCopyList,   "工事案件コピー-機能"},
 | 
| 152 | 157 |                                                                                 { (int)ProcessExecuteNo.PurchaseOrderEntry,     "注文書-入力"},
 | 
| 153 | 158 |                                                                                 { (int)ProcessExecuteNo.PurchaseOrderPrint,     "注文書-印刷"},
 | 
| 154 |                                                                                 { (int)ProcessExecuteNo.DepartmentExpenssList,  "部署別台帳-一覧"},
 | |
| 155 |                                                                                 { (int)ProcessExecuteNo.ConstructionLedgerList, "工事詳細台帳-一覧"},
 | |
| 159 |                                                                                 { (int)ProcessExecuteNo.DepartmentExpenssList,  "部署別台帳-表示"},
 | |
| 160 |                                                                                 { (int)ProcessExecuteNo.ConstructionLedgerList, "工事台帳まとめ-表示"},
 | |
| 156 | 161 |                                                                                 { (int)ProcessExecuteNo.ConstructionLedger,     "工事詳細台帳-入力"},
 | 
| 157 | 162 |                                                                                 { (int)ProcessExecuteNo.TAndPCosts,             "交通費及び購入品等-入力"},
 | 
| 158 |                                                                                 { (int)ProcessExecuteNo.DRList,                 "工事日報-一覧"},
 | |
| 163 |                                                                                 { (int)ProcessExecuteNo.DRList,                 "工事日報一覧-表示"},
 | |
| 159 | 164 |                                                                                 { (int)ProcessExecuteNo.DRConstruction,         "工事日報-入力"},
 | 
| 160 | 165 |                                                                                 { (int)ProcessExecuteNo.Proceedings,            "打合せ議事録-入力"},
 | 
| 161 |                                                                                 { (int)ProcessExecuteNo.MaterialList,           "資材入力"},
 | |
| 162 |                                                                                 { (int)ProcessExecuteNo.MaterialReserveEntry,   "資材貸出"},
 | |
| 163 |                                                                                 { (int)ProcessExecuteNo.MaterialReturnEntry,    "資材返却"},
 | |
| 164 |                                                                                 { (int)ProcessExecuteNo.RequestSummaryList,     "請求まとめ"},
 | |
| 165 |                                                                                 { (int)ProcessExecuteNo.PaymentConfirmation,    "入金確認"},
 | |
| 166 |                                                                                 { (int)ProcessExecuteNo.RequestInput,           "請求入力"},
 | |
| 167 |                                                                                 { (int)ProcessExecuteNo.RequestPrint,           "請求書印刷"},
 | |
| 168 |                                                                                 //{ (int)ProcessExecuteNo.DailyReportList,        "出勤日報-入力"},
 | |
| 169 |                                                                                 //{ (int)ProcessExecuteNo.PurchaseOrderStatus,    "注文書発給状況-一覧"},
 | |
| 170 |                                                                                 //{ (int)ProcessExecuteNo.OrderJoin,              "工事結合-入力"},
 | |
| 171 |                                                                                 //{ (int)ProcessExecuteNo.ConstructionSplit,      "工事分割-入力"},
 | |
| 172 |                                                                                 //{ (int)ProcessExecuteNo.DRTransport,            "通勤交通費-入力"},
 | |
| 166 |                                                                                 { (int)ProcessExecuteNo.DRWork,                 "出勤日報-入力"},
 | |
| 167 |                                                                                 { (int)ProcessExecuteNo.PurchaseOrderStatus,    "注文書発給一覧-表示"},
 | |
| 168 |                                                                                 { (int)ProcessExecuteNo.OrderJoin,              "工事結合-入力"},
 | |
| 169 |                                                                                 { (int)ProcessExecuteNo.ConstructionSplit,      "見積分割-入力"},
 | |
| 170 |                                                                                 { (int)ProcessExecuteNo.PersonApprovalList,     "担当者承認一覧-表示"},
 | |
| 171 |                                                                                 { (int)ProcessExecuteNo.MaterialList,           "資材入力-入力"},
 | |
| 172 |                                                                                 { (int)ProcessExecuteNo.MaterialHistory,        "資材履歴画面-表示"},
 | |
| 173 |                                                                                 { (int)ProcessExecuteNo.MaterialCountEntry,     "資材数変更画面-入力"},
 | |
| 174 |                                                                                 { (int)ProcessExecuteNo.MaterialReserveEntry,   "資材貸出-入力"},
 | |
| 175 |                                                                                 { (int)ProcessExecuteNo.MaterialReturnEntry,    "資材返却-入力"},
 | |
| 176 |                                                                                 { (int)ProcessExecuteNo.MaterialSelect,         "資材選択-入力"},
 | |
| 177 |                                                                                 { (int)ProcessExecuteNo.RequestSummaryList,     "請求まとめ-入力"},
 | |
| 178 |                                                                                 { (int)ProcessExecuteNo.PaymentConfirmation,    "入金確認-入力"},
 | |
| 179 |                                                                                 { (int)ProcessExecuteNo.RequestInput,           "請求入力-入力"},
 | |
| 180 |                                                                                 { (int)ProcessExecuteNo.RequestPrint,           "請求書-印刷"},
 | |
| 181 |                                                                                 { (int)ProcessExecuteNo.CostomerRegistList,     "発注者登録申請一覧-表示"},
 | |
| 182 |                                                                                 { (int)ProcessExecuteNo.CostomerRegist,         "発注者登録申請-入力"},
 | |
| 183 |                                                                                 { (int)ProcessExecuteNo.SubConstrRegistList,    "協力会社登録申請一覧-表示"},
 | |
| 184 |                                                                                 { (int)ProcessExecuteNo.SubConstrRegist,        "協力会社登録申請-入力"}
 | |
| 173 | 185 | }; | 
| 174 | 186 |  | 
| 175 | 187 | #endregion | 
| ... | ... | |
| 205 | 217 |                                                                                 { (int)MaintenanceExecuteNo.Security,                   "セキュリティ区分登録"},       // 124
 | 
| 206 | 218 |                                                                                 { (int)MaintenanceExecuteNo.OrderDivision,              "発注者区分登録"},             // 125
 | 
| 207 | 219 |                                                                                 { (int)MaintenanceExecuteNo.ConstructionExpenses,       "施工経費区分登録"},           // 126
 | 
| 208 |                                                                                 { (int)MaintenanceExecuteNo.MaterialKind,               "資材種類登録"},              // 127
 | |
| 209 |                                                                                 { (int)MaintenanceExecuteNo.MaterialItem,               "資材品目登録"},              // 128
 | |
| 210 |                                                                                 { (int)MaintenanceExecuteNo.SalesConfirm,               "売上確認"},              // 128
 | |
| 220 |                                                                                 { (int)MaintenanceExecuteNo.MaterialKind,               "資材種類登録"},               // 127
 | |
| 221 |                                                                                 { (int)MaintenanceExecuteNo.MaterialItem,               "資材品目登録"},               // 128
 | |
| 222 |                                                                                 { (int)MaintenanceExecuteNo.SalesConfirm,               "売上確認"},                   // 129
 | |
| 211 | 223 | }; | 
| 212 | 224 | #endregion | 
| 213 | 225 |  | 
| 226 | #region サブフォーム処理名定義 | |
| 227 | /// <summary> | |
| 228 | /// サブフォーム処理名定義 | |
| 229 | /// </summary> | |
| 230 |         public static Dictionary<int, string> subFormExecuteName = new Dictionary<int, string>(){
 | |
| 231 |                                                                                 { (int)SubFormExecuteNo.MessageWriter,       "掲示板入力-入力"  },            // 201
 | |
| 232 |                                                                                 { (int)SubFormExecuteNo.MessageReader,       "掲示板読込-表示"  },            // 202
 | |
| 233 |                                                                                 { (int)SubFormExecuteNo.ActionSchdule,       "行動予定-入力" },               // 203
 | |
| 234 |                                                                                 { (int)SubFormExecuteNo.VehicleSchdule,      "車両予約-入力" },               // 204
 | |
| 235 |                                                                                 { (int)SubFormExecuteNo.ApprovalScreen,      "工事承認画面-機能" },           // 205
 | |
| 236 |                                                                                 { (int)SubFormExecuteNo.SubconstractorDiag,  "協力会社検索画面-機能" },       // 206
 | |
| 237 |                                                                                 { (int)SubFormExecuteNo.SuppliersDiag,       "仕入先検索-機能" },             // 207
 | |
| 238 |                                                                                 { (int)SubFormExecuteNo.SubConJobDiag,       "協力会社職種検索画面-機能" },   // 208
 | |
| 239 |                                                                                 { (int)SubFormExecuteNo.ApprovalPerson,      "担当者承認画面-機能" },         // 209
 | |
| 240 | }; | |
| 241 | #endregion | |
| 242 |  | |
| 214 | 243 | #region 承認処理定義 | 
| 215 | 244 | /// <summary> | 
| 216 | 245 | /// 承認一覧 | 
| ... | ... | |
| 245 | 274 | /// 6:工事日報承認 | 
| 246 | 275 | /// </summary> | 
| 247 | 276 | DRConstructionApproval, | 
| 277 | /// <summary> | |
| 278 | /// 7:議事録承認 | |
| 279 | /// </summary> | |
| 280 | DRProceedingsApproval, | |
| 281 | /// <summary> | |
| 282 | /// 8:出勤管理承認 | |
| 283 | /// </summary> | |
| 284 | DRWorkApproval, | |
| 285 | /// <summary> | |
| 286 | /// 9:発注者登録承認 | |
| 287 | /// </summary> | |
| 288 | CostomerRegistApproval, | |
| 289 | /// <summary> | |
| 290 | ///10:協力会社登録承認 | |
| 291 | /// </summary> | |
| 292 | SubConstregistApproval | |
| 248 | 293 | } | 
| 249 | 294 | #endregion | 
| 250 | 295 |  | 
| ... | ... | |
| 280 | 325 |                                                                                 {5, "請求書承認"},
 | 
| 281 | 326 |                                                                                 {6, "工事日報承認"},
 | 
| 282 | 327 |                                                                                 {7, "議事録承認"},
 | 
| 283 |                                                                                 {8, "質疑承認"},
 | |
| 328 |                                                                                 {8, "出勤管理承認"},
 | |
| 329 |                                                                                 {9, "発注者登録承認"},
 | |
| 330 |                                                                                 {10, "協力会社登録承認"}
 | |
| 284 | 331 | }; | 
| 285 | 332 |  | 
| 286 | 333 | #endregion | 
| ... | ... | |
| 289 | 336 | /// <summary> | 
| 290 | 337 | /// 承認種別カラーテーブル(承認処理定義と同じ並び) | 
| 291 | 338 | /// </summary> | 
| 292 |         public static Color[] ApprovalTypeColorList = new Color[]{  Color.White,
 | |
| 339 |         //public static Color[] ApprovalTypeColorList = new Color[]{  Color.White,
 | |
| 340 | // Color.RoyalBlue, | |
| 341 | // Color.DarkOrange, | |
| 342 | // Color.IndianRed, | |
| 343 | // Color.Gray, | |
| 344 | // Color.Chartreuse, | |
| 345 | // Color.SpringGreen, | |
| 346 | // Color.SlateGray, | |
| 347 | // Color.LightSeaGreen, | |
| 348 | // Color.SteelBlue, | |
| 349 | // Color.LawnGreen, | |
| 350 | // Color.DarkViolet, | |
| 351 | // Color.MediumVioletRed, | |
| 352 | // Color.MediumSeaGreen, | |
| 353 | // }; | |
| 354 |         public static Color[] ApprovalTypeColorList = new Color[]{  
 | |
| 355 | Color.White, | |
| 293 | 356 | Color.RoyalBlue, | 
| 294 | 357 | Color.DarkOrange, | 
| 295 | 358 | Color.IndianRed, | 
| 296 | 359 | Color.Gray, | 
| 297 | 360 | Color.Chartreuse, | 
| 298 | Color.SpringGreen, | |
| 299 | Color.SlateGray, | |
| 361 | Color.SteelBlue, | |
| 300 | 362 | Color.LightSeaGreen, | 
| 301 | Color.SteelBlue, | |
| 302 | 363 | Color.LawnGreen, | 
| 303 | 364 | Color.DarkViolet, | 
| 365 | Color.MediumVioletRed, | |
| 366 | Color.MediumSeaGreen, | |
| 367 | Color.Chocolate, | |
| 368 | Color.DarkGoldenrod, | |
| 369 | Color.OrangeRed, | |
| 370 | Color.DimGray, | |
| 371 | Color.LimeGreen, | |
| 372 | Color.Crimson, | |
| 373 | Color.Sienna, | |
| 374 | Color.OliveDrab, | |
| 375 | Color.DarkMagenta, | |
| 376 | Color.DarkCyan, | |
| 377 | Color.DarkSlateBlue, | |
| 378 | Color.SeaGreen, | |
| 379 | Color.Olive, | |
| 380 | Color.Teal, | |
| 381 | Color.Purple, | |
| 382 | Color.Blue, | |
| 383 | Color.Red, | |
| 384 | Color.Lime, | |
| 385 | Color.Brown, | |
| 386 | Color.Firebrick, | |
| 387 | Color.DarkOliveGreen, | |
| 388 | Color.SaddleBrown, | |
| 389 | Color.ForestGreen, | |
| 390 | Color.DarkSlateGray, | |
| 391 | Color.Indigo, | |
| 392 | Color.MediumBlue, | |
| 393 | Color.MidnightBlue, | |
| 394 | Color.DarkRed, | |
| 395 | Color.DarkBlue, | |
| 396 | Color.Green, | |
| 397 | Color.Navy, | |
| 398 | Color.Maroon, | |
| 399 | Color.DarkGreen, | |
| 400 | Color.Black | |
| 304 | 401 | }; | 
| 402 |  | |
| 305 | 403 | #endregion | 
| 306 | 404 |  | 
| 307 | 405 | #region 変数 | 
| ... | ... | |
| 437 | 535 | ProcessExecuteNo_ConstructionSplit(m_ProcControlPara[NowPoint]); | 
| 438 | 536 | break; | 
| 439 | 537 |  | 
| 440 | case (int)ProcessExecuteNo.MaterialList: // 22:資材一覧 | |
| 538 | case (int)ProcessExecuteNo.PersonApprovalList: // 22:担当者承認申請一覧 | |
| 539 | ProcessExecuteNo_PersonAppList(m_ProcControlPara[NowPoint]); | |
| 540 | break; | |
| 541 |  | |
| 542 | case (int)ProcessExecuteNo.MaterialList: // 23:資材一覧 | |
| 441 | 543 | ProcessExecuteNo_MaterialList(m_ProcControlPara[NowPoint]); | 
| 442 | 544 | break; | 
| 443 | 545 |  | 
| ... | ... | |
| 472 | 574 | case (int)ProcessExecuteNo.RequestInput: // 31:請求入力 | 
| 473 | 575 | ProcessExecuteNo_RequestInput(m_ProcControlPara[NowPoint]); | 
| 474 | 576 | break; | 
| 577 |  | |
| 475 | 578 | case (int)ProcessExecuteNo.RequestPrint: // 32:請求書印刷 | 
| 476 | 579 | ProcessExecuteNo_RequestPrint(m_ProcControlPara[NowPoint]); | 
| 477 | 580 | break; | 
| 478 | 581 |  | 
| 479 | #endregion | |
| 582 | case (int)ProcessExecuteNo.CostomerRegistList: // 33:発注者登録申請一覧 | |
| 583 | ProcessExecuteNo_CostomerRegistList(m_ProcControlPara[NowPoint]); | |
| 584 | break; | |
| 480 | 585 |  | 
| 586 | case (int)ProcessExecuteNo.CostomerRegist: // 34:発注者登録申請 | |
| 587 | ProcessExecuteNo_CostomerRegist(m_ProcControlPara[NowPoint]); | |
| 588 | break; | |
| 589 |  | |
| 590 | case (int)ProcessExecuteNo.SubConstrRegistList: // 35:協力会社登録申請一覧 | |
| 591 | ProcessExecuteNo_SubConstrRegistList(m_ProcControlPara[NowPoint]); | |
| 592 | break; | |
| 593 |  | |
| 594 | case (int)ProcessExecuteNo.SubConstrRegist: // 36:協力会社登録申請 | |
| 595 | ProcessExecuteNo_SubConstrRegist(m_ProcControlPara[NowPoint]); | |
| 596 | break; | |
| 597 |  | |
| 598 | #endregion | |
| 599 |  | |
| 481 | 600 | #region マスタメンテ | 
| 482 | 601 | // ----- マスタメンテ | 
| 483 | 602 | case (int)MaintenanceExecuteNo.System: // 1:システム管理 | 
| ... | ... | |
| 573 | 692 |  | 
| 574 | 693 | #region サブフォーム | 
| 575 | 694 | // ----- サブフォーム | 
| 576 |                         case (int)SubFormExecuteNo.MessageWriter:                       //  1:掲示板入力(新バージョン)
 | |
| 695 |                         case (int)SubFormExecuteNo.MessageWriter:                       // 201:掲示板入力(新バージョン)
 | |
| 577 | 696 | SubFormExecuteNo_MessageWriter(m_ProcControlPara[NowPoint]); | 
| 578 | 697 | break; | 
| 579 | 698 |  | 
| 580 |                         case (int)SubFormExecuteNo.MessageReader:                       //  2:掲示板読込
 | |
| 699 |                         case (int)SubFormExecuteNo.MessageReader:                       // 202:掲示板読込
 | |
| 581 | 700 | SubFormExecuteNo_MessageReader(m_ProcControlPara[NowPoint]); | 
| 582 | 701 | break; | 
| 583 | 702 |  | 
| 584 |                         case (int)SubFormExecuteNo.ActionSchdule:                       //  3:行動予定入力
 | |
| 703 |                         case (int)SubFormExecuteNo.ActionSchdule:                       // 203:行動予定入力
 | |
| 585 | 704 | SubFormExecuteNo_ActionSchdule(m_ProcControlPara[NowPoint]); | 
| 586 | 705 | break; | 
| 587 | 706 |  | 
| 588 |                         case (int)SubFormExecuteNo.VehicleSchdule:                      //  4:車両予約入力
 | |
| 707 |                         case (int)SubFormExecuteNo.VehicleSchdule:                      // 204:車両予約入力
 | |
| 589 | 708 | SubFormExecuteNo_VehicleSchdule(m_ProcControlPara[NowPoint]); | 
| 590 | 709 | break; | 
| 591 | 710 |  | 
| 592 |                         case (int)SubFormExecuteNo.ApprovalScreen:                      //  5:承認画面
 | |
| 711 |                         case (int)SubFormExecuteNo.ApprovalScreen:                      // 205:承認画面
 | |
| 593 | 712 | SubFormExecuteNo_ApprovalScreen(m_ProcControlPara[NowPoint]); | 
| 594 | 713 | break; | 
| 714 |  | |
| 715 | case (int)SubFormExecuteNo.ApprovalPerson: // 209:担当者承認画面 | |
| 716 | SubFormExecuteNo_ApprovalPerson(m_ProcControlPara[NowPoint]); | |
| 717 | break; | |
| 718 |  | |
| 595 | 719 | #endregion | 
| 720 |  | |
| 721 | default: | |
| 722 | BackProcess(); | |
| 723 | break; | |
| 596 | 724 | } | 
| 597 | 725 | } | 
| 598 | 726 | } | 
| ... | ... | |
| 1366 | 1494 |  | 
| 1367 | 1495 | // パラメータセット | 
| 1368 | 1496 | frm.ConstructionCode = CurrentPara.IntExecParameter[0]; | 
| 1369 | frm.PersonCode = CurrentPara.IntExecParameter[1]; | |
| 1497 | frm.OrderNo = CurrentPara.IntExecParameter[1]; | |
| 1498 | frm.PersonCode = CurrentPara.IntExecParameter[2]; | |
| 1370 | 1499 | frm.CreateData = CurrentPara.BoolExecParameter[0]; | 
| 1371 | 1500 |  | 
| 1372 | 1501 | // フォーム表示 | 
| ... | ... | |
| 1411 | 1540 |  | 
| 1412 | 1541 | // パラメータセット | 
| 1413 | 1542 | frm.ConstructionCode = CurrentPara.IntExecParameter[0]; | 
| 1543 | frm.OrderNo = CurrentPara.IntExecParameter[1]; | |
| 1544 | frm.PersonCode = CurrentPara.IntExecParameter[2]; | |
| 1545 | frm.CreateData = CurrentPara.BoolExecParameter[0]; | |
| 1414 | 1546 |  | 
| 1415 | 1547 | // フォーム表示 | 
| 1416 | 1548 | frm.ShowDialog(); | 
| ... | ... | |
| 1593 | 1725 | } | 
| 1594 | 1726 | #endregion | 
| 1595 | 1727 |  | 
| 1728 | #region 担当者承認申請一覧リスト | |
| 1729 | /// <summary> | |
| 1730 | /// 担当者承認申請一覧リスト | |
| 1731 | /// </summary> | |
| 1732 | /// <param name="CurrentPara"></param> | |
| 1733 | public static void ProcessExecuteNo_PersonAppList(ProcessParameter CurrentPara) | |
| 1734 |         {
 | |
| 1735 | // 担当者承認申請一覧 | |
| 1736 | FrmPersonApprList frm = new FrmPersonApprList(); | |
| 1737 | try | |
| 1738 |             {
 | |
| 1739 | // 次起動プロセスが設定されていない場合は終了 | |
| 1740 | if (CurrentPara.IntExecParameter[0] == 0) | |
| 1741 |                 {
 | |
| 1742 | // 前プロセスに戻る | |
| 1743 | BackProcess(); | |
| 1744 | return; | |
| 1745 | } | |
| 1746 |  | |
| 1747 | // 次起動プロセスセット | |
| 1748 | frm.ExecuteFlg = CurrentPara.IntExecParameter[0]; | |
| 1749 |  | |
他の形式にエクスポート: Unified diff