プロジェクト

全般

プロフィール

リビジョン 36

堀内約8年前に追加

セキュリティ関連バグ修正

差分を表示:

trunk/src/ProcessManagement/ProcessManagement/Common/Process/ClsExcute.cs
208 208
            /// 4:注文書承認
209 209
            /// </summary>
210 210
            PurchaseOrderEntryApproval,
211
            // ----- 以下プロセス未作成
212 211
            /// <summary>
213 212
            /// 5:請求書承認
214 213
            /// </summary>
215 214
            OrderBillingApproval,
215
            /// <summary>
216
            /// 6:工事日報承認
217
            /// </summary>
218
            DRConstructionApproval,
216 219
        }
217 220
        #endregion
218 221

  
trunk/src/ProcessManagement/ProcessManagement/Common/Process/ClsMessageBoradAccess.cs
354 354
                        object[] objRec = (object[])terList[i];
355 355
                        mbtDB.Reader2Struct(objRec, ref wrkRec);
356 356

  
357
                        // 管理者対象フラグ取得
358
                        int ShareFlag = CommonMotions.cnvInt(objRec[TergetCnt + (int)GetTarget.ShareFlag]);
359
                        // 管理者対象フラグがONの時にログイン者が一般ユーザーの場合はメッセージを見せない
360
                        if (CommonMotions.LoginUserSecurity.SecRank == CommonDefine.SecurityRankList[NRank].Key)
361
                        {
362
                            if (ShareFlag != 0) return false;
363
                        }
364 357

  
365 358
                        // ----------
366 359
                        int CurRecRank = 0;
......
371 364
                            // 所属が対象ならばOK
372 365
                            if (wrkRec.ToCode == CommonMotions.LoginUserData.DepartmentCode) return true;
373 366

  
367
                            // 管理者対象フラグ取得
368
                            int ShareFlag = CommonMotions.cnvInt(objRec[TergetCnt + (int)GetTarget.ShareFlag]);
369
                            // 管理者対象フラグがONの時にログイン者が一般ユーザーの場合はメッセージを見せない
370
                            if (CommonMotions.LoginUserSecurity.SecRank == CommonDefine.SecurityRankList[NRank].Key)
371
                            {
372
                                if (ShareFlag != 0) return false;
373
                            }
374

  
374 375
                            string strSECSQL = "SELECT MAX(B.SECRANK) FROM PERSONINCHARGEMASTER A, SECURITYMASTER B";
375 376
                            strSECSQL += string.Format(" WHERE DEPARTMENTCODE = {0} AND B.SECCODE = A.SECCODE", wrkRec.ToCode);
376 377
                            ArrayList SecarList = new ArrayList();
trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOMApproval.cs
262 262
        /// </summary>
263 263
        /// <param name="BusinessTypeCode"></param>
264 264
        /// <returns>Where文字列</returns>
265
        public string CreatePrimarykeyString(int ApprovalCode, int DepartmentCode = 0, int SeqNo = 0)
265
        public string CreatePrimarykeyString(int ApprovalCode, int DepartmentCode = -1, int SeqNo = -1)
266 266
        {
267 267
            string strWork = string.Empty;
268 268
            try
269 269
            {
270 270
                strWork = string.Format(" Where ApprovalCode = {0}", ApprovalCode.ToString());
271
                if (DepartmentCode!=0)
271
                if (DepartmentCode != -1)
272 272
                    strWork += string.Format(" And DepartmentCode = {0}", DepartmentCode.ToString());
273
                if (SeqNo != 0)
273
                if (SeqNo != -1)
274 274
                    strWork += string.Format(" And SeqNo = {0}", SeqNo.ToString());
275 275

  
276 276
            }
trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ApprovalList/FrmApprovalList.cs
193 193
        /// <param name="e"></param>
194 194
        private void FrmConstructionBaseInfoList_Load(object sender, EventArgs e)
195 195
        {
196
            // ?R???{?{?b?N?X?????\??
197
            InitCombBox();
198

  
199 196
            // ?R???{?{?b?N?X?Z?b?g
200 197
            m_bInitFlg = true;
201 198
            SetcmbDepartment();
202 199
            m_bInitFlg = true;
203 200
            SetcmbPersons();
204 201

  
202
            // ?R???{?{?b?N?X?????\??
203
            InitCombBox();
204

  
205 205
            m_bInitFlg = true;
206 206
            // ?????\??
207 207
            InitDataLoad();
trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ApprovalList/FrmApprovalListAuxiliary.cs
276 276
        {
277 277
            try
278 278
            {
279
                int SRank = (int)CommonDefine.SecurityRankPos.SpecialAuthority;     // ???????
280
                int FRank = (int)CommonDefine.SecurityRankPos.FreeAuthority;        // ?????????
281
                int LRank = (int)CommonDefine.SecurityRankPos.LimitedAuthority;     // ??????????
282
                int NRank = (int)CommonDefine.SecurityRankPos.NormalAuthority;      // ???????
283

  
279
                int AllPath = (int)CommonDefine.SecurityRangePos.AllPath;           // ?S????
280
                int Multiple = (int)CommonDefine.SecurityRangePos.Multiple;         // ????????
284 281
                int Only = (int)CommonDefine.SecurityRangePos.Only;                 // ?????????
285 282
                int None = (int)CommonDefine.SecurityRangePos.None;                 // ???S??????
286 283

  
287 284
                if (CommonMotions.LoginUserData.PersonCode == CommonDefine.AdminCode
288
                    || CommonMotions.LoginUserSecurity.SecRank == CommonDefine.SecurityRankList[SRank].Key
289
                    || CommonMotions.LoginUserSecurity.SecRank == CommonDefine.SecurityRankList[FRank].Key)
285
                    || CommonMotions.LoginUserSecurity.SecRange == CommonDefine.SecurityRangeList[AllPath].Key)
290 286
                {
291 287
                    // ?????E?S????R???{?\??
292 288
                    DispAllCombBoxControl(true);
293 289
                }
294
                else if (CommonMotions.LoginUserSecurity.SecRank == CommonDefine.SecurityRankList[LRank].Key)
290
                else
295 291
                {
296
                    if (CommonMotions.LoginUserSecurity.SecRange == (int)CommonDefine.SecurityRangeList[Only].Key
297
                        || CommonMotions.LoginUserSecurity.SecRange == (int)CommonDefine.SecurityRangeList[None].Key)
292
                    if (CommonMotions.LoginUserSecurity.SecRange == (int)CommonDefine.SecurityRangeList[Multiple].Key)
298 293
                    {
294
                        // ?????E?S????R???{?\??
295
                        DispAllCombBoxControl(true);
296
                    }
297
                    else if (CommonMotions.LoginUserSecurity.SecRange == (int)CommonDefine.SecurityRangeList[Only].Key)
298
                    {
299 299
                        // ?????R???{??\??
300 300
                        NonDispDepCombBox();
301 301
                    }
302
                    else
302
                    else if (CommonMotions.LoginUserSecurity.SecRange == (int)CommonDefine.SecurityRangeList[None].Key)
303 303
                    {
304 304
                        // ?????E?S????R???{?\??
305
                        DispAllCombBoxControl(true);
305
                        DispAllCombBoxControl(false);
306 306
                    }
307 307
                }
308
                else if (CommonMotions.LoginUserSecurity.SecRank == CommonDefine.SecurityRankList[NRank].Key)
308

  
309
                // ???????????R???{?{?b?N?X?f?[?^??????Z?b?g????
310
                for (int i = 0; i < cmbDepartment.Items.Count; i++)
309 311
                {
310
                    if (CommonMotions.LoginUserSecurity.SecRange == (int)CommonDefine.SecurityRangeList[Only].Key
311
                        || CommonMotions.LoginUserSecurity.SecRange == (int)CommonDefine.SecurityRangeList[None].Key)
312
                    KeyValuePair<int, string> wrkPair = (KeyValuePair<int, string>)cmbDepartment.Items[i];
313
                    if (wrkPair.Key == CommonMotions.LoginUserData.DepartmentCode)
312 314
                    {
313
                        // ?????R???{??\??
314
                        NonDispDepCombBox();
315
                        cmbDepartment.SelectedValue = CommonMotions.LoginUserData.DepartmentCode;
315 316
                    }
316
                    else
317
                }
318

  
319
                for (int i = 0; i < cmbConstructionPerson.Items.Count; i++)
320
                {
321
                    KeyValuePair<int, string> wrkPair = (KeyValuePair<int, string>)cmbConstructionPerson.Items[i];
322
                    if (wrkPair.Key == CommonMotions.LoginUserData.PersonCode)
317 323
                    {
318
                        // ?????E?S????R???{?\??
319
                        DispAllCombBoxControl(true);
324
                        cmbConstructionPerson.SelectedValue = CommonMotions.LoginUserData.PersonCode;
320 325
                    }
321 326
                }
327

  
322 328
            }
323 329
            catch (Exception ex)
324 330
            {
......
410 416
                            cmbDepartment.SelectedValue = CommonMotions.LoginUserData.DepartmentCode;
411 417
                    }
412 418
                }
413
                else
414
                {
415
                    // ?????R???{?{?b?N?X?f?[?^??????Z?b?g????
416
                    for (int i = 0; i < cmbDepartment.Items.Count; i++)
417
                    {
418
                        KeyValuePair<int, string> wrkPair = (KeyValuePair<int, string>)cmbDepartment.Items[i];
419
                        if (wrkPair.Key == CommonMotions.LoginUserData.DepartmentCode)
420
                        {
421
                            cmbDepartment.SelectedValue = CommonMotions.LoginUserData.DepartmentCode;
422
                        }
423
                    }
424
                }
425 419

  
426 420
                return true;
427 421
            }
......
536 530
                        cmbConstructionPerson.SelectedValue = CommonMotions.LoginUserData.PersonCode;
537 531
                    }
538 532
                }
539
                else
540
                {
541
                    for (int i = 0; i < cmbConstructionPerson.Items.Count; i++)
542
                    {
543
                        KeyValuePair<int, string> wrkPair = (KeyValuePair<int, string>)cmbConstructionPerson.Items[i];
544
                        if (wrkPair.Key == CommonMotions.LoginUserData.PersonCode)
545
                        {
546
                            cmbConstructionPerson.SelectedValue = CommonMotions.LoginUserData.PersonCode;
547
                        }
548
                    }
549
                }
550 533

  
551 534
                return true;
552 535
            }
......
673 656
            try
674 657
            {
675 658
                // ?L?[?l??
676
                int SAccKey = (int)CommonDefine.SecurityRankPos.SpecialAuthority;   // ?o?c??A?N?Z?X
677
                int FAccKey = (int)CommonDefine.SecurityRankPos.FreeAuthority;      // ??????A?N?Z?X
678
                int LAccKey = (int)CommonDefine.SecurityRankPos.LimitedAuthority;   // ???????A?N?Z?X
679
                int NAccKey = (int)CommonDefine.SecurityRankPos.NormalAuthority;    // ????A?N?Z?X
659
                int AllPath = (int)CommonDefine.SecurityRangePos.AllPath;           // ?S????
660
                int Multiple = (int)CommonDefine.SecurityRangePos.Multiple;         // ????????
661
                int Only = (int)CommonDefine.SecurityRangePos.Only;                 // ?????????
662
                int None = (int)CommonDefine.SecurityRangePos.None;                 // ???S??????
680 663

  
681 664
                // ?f?[?^?A?N?Z?X?????????????????
682
                // ?V?X?e????????????f?[?^?A?N?Z?X???????????
683
                if (CommonMotions.LoginUserData.PersonCode == CommonDefine.AdminCode)
665
                if (CommonMotions.LoginUserData.PersonCode == CommonDefine.AdminCode
666
                || CommonMotions.LoginUserSecurity.SecRange == CommonDefine.SecurityRangeList[AllPath].Key)
684 667
                {
685
                    // ?V?X?e???????i???????j
686
                }
687
                else if (CommonMotions.LoginUserSecurity.SecRank == CommonDefine.SecurityRankList[SAccKey].Key)
688
                {
689 668
                    // ???????i????SQL???j
690

  
691 669
                }
692
                else if (CommonMotions.LoginUserSecurity.SecRank == CommonDefine.SecurityRankList[FAccKey].Key
693
                        || CommonMotions.LoginUserSecurity.SecRank == CommonDefine.SecurityRankList[LAccKey].Key)
670
                else if (CommonMotions.LoginUserSecurity.SecRange == CommonDefine.SecurityRangeList[Multiple].Key
671
                        || CommonMotions.LoginUserSecurity.SecRange == CommonDefine.SecurityRangeList[Only].Key)
694 672
                {
695 673
                    // ???????L
696 674
                    // ?@???????i?????????j
......
715 693
                    strSQL += string.Format(" Or (B.ConstructionStatusFlg = {0}", iStatus2);                                            // ???????p??????p???????????????
716 694
                    strSQL += string.Format(" And B.TransferConstruction = {0}))", CommonMotions.LoginUserData.DepartmentCode);
717 695
                }
718
                else if (CommonMotions.LoginUserSecurity.SecRank == CommonDefine.SecurityRankList[NAccKey].Key)
696
                else if (CommonMotions.LoginUserSecurity.SecRange == CommonDefine.SecurityRangeList[None].Key)
719 697
                {
720 698
                    // ???g?p??
721 699
                    int iStatus = CommonDefine.ProjectsStatus.First(x => x.Value.Equals("?????o")).Key;
722
                    
723
                    strSQL += " And (B.SalesPersonCode IN (Select B1.PersonCode From PersonInChargeMaster B1";
724
                    strSQL += string.Format(" Where B1.DepartmentCode IN (SELECT B2.DEPARTMENTCODE FROM PERSONDEPARTMENTMASTER B2 WHERE B2.PERSONCODE = {0}))", CommonMotions.LoginUserData.PersonCode);
725 700

  
701
                    strSQL += string.Format(" And (B.SalesPersonCode = {0}", CommonMotions.LoginUserData.PersonCode);
702

  
726 703
                    strSQL += string.Format(" Or (B.ConstructionStatusFlg > {0}", iStatus);
727 704

  
728
                    strSQL += " And (B.ConstructionPersonCode IN (Select B3.PersonCode From PersonInChargeMaster B3";
729
                    strSQL += string.Format(" Where B3.DepartmentCode IN (SELECT B4.DEPARTMENTCODE FROM PERSONDEPARTMENTMASTER B4 WHERE B4.PERSONCODE = {0}))", CommonMotions.LoginUserData.PersonCode);
705
                    strSQL += string.Format(" And (B.ConstructionPersonCode = {0}", CommonMotions.LoginUserData.PersonCode);
730 706

  
731
                    strSQL += " Or B.CONSTRSUBPERSONCODE IN (Select B5.PersonCode From PersonInChargeMaster B5";
732
                    strSQL += string.Format(" Where B5.DepartmentCode IN (SELECT B6.DEPARTMENTCODE FROM PERSONDEPARTMENTMASTER B6 WHERE B6.PERSONCODE = {0}))", CommonMotions.LoginUserData.PersonCode);
707
                    strSQL += string.Format(" Or B.CONSTRSUBPERSONCODE = {0}", CommonMotions.LoginUserData.PersonCode);
733 708

  
734
                    strSQL += " Or B.ConstructionInstructor IN (Select B7.PersonCode From PersonInChargeMaster B7";
735
                    strSQL += string.Format(" Where B7.DepartmentCode IN (SELECT B8.DEPARTMENTCODE FROM PERSONDEPARTMENTMASTER B8 WHERE B8.PERSONCODE = {0})))))", CommonMotions.LoginUserData.PersonCode);
709
                    strSQL += string.Format(" Or B.ConstructionInstructor = {0})))", CommonMotions.LoginUserData.PersonCode);
736 710
                }
737 711
            }
738 712
            catch (Exception ex)
trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ApprovalScreen/FrmApprovalScreen.cs
164 164
        /// <param name="e"></param>
165 165
        private void FrmApprovalScreen_Load(object sender, EventArgs e)
166 166
        {
167
            // ???F?o?H????????????????N???????
168
            int CurrentDepartmentCode = ClsApprovalPermission.GetFromConstructionAndApprovalTheDepartment(m_ConstructionCode, m_ApprovalCode);
169
            if (ClsApprovalPermission.GetApprovalMasterCount(m_ApprovalCode, CurrentDepartmentCode) == 0)
170
            {
171
                m_bEndFlg = true;
172
                this.Close();
173
                return;
174
            }
175

  
167 176
            //?R???g???[???I?u?W?F?N?g??
168 177
            SetDisplayObject();
169 178

  
trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ApprovalScreen/FrmApprovalScreenAuxiliary.cs
56 56
                case (int)ClsExcute.ApprovalListNo.ConstructionBudgetApproval:
57 57
                    if (RecPara.ProcNo == (int)ClsExcute.ProcessExecuteNo.ConstructionBudget) bAns = true;
58 58
                    break;
59
                // 4:注文書承認
60
                case (int)ClsExcute.ApprovalListNo.PurchaseOrderEntryApproval:
61
                    if (RecPara.ProcNo == (int)ClsExcute.ProcessExecuteNo.PurchaseOrderEntry) bAns = true;
62
                    break;
63
                // 5:請求書承認
64
                case (int)ClsExcute.ApprovalListNo.OrderBillingApproval:
65
                    //if (RecPara.ProcNo == (int)ClsExcute.ProcessExecuteNo.ConstructionBudget) bAns = true;
66
                    break;
67
                // 6:工事日報承認
68
                case (int)ClsExcute.ApprovalListNo.DRConstructionApproval:
69
                    if (RecPara.ProcNo == (int)ClsExcute.ProcessExecuteNo.DRConstruction) bAns = true;
70
                    break;
59 71
            }
60 72

  
61 73
            return bAns;
......
521 533
        {
522 534
            IOConstructionBaseInfo cbiDB = new IOConstructionBaseInfo();
523 535
            IOMApproval mAppDB = new IOMApproval();
524
            IOProcessApproval ApprovalDB = new IOProcessApproval();
525 536
            try
526 537
            {
527 538
                // 工事基本情報取得
......
529 540
                if (!cbiDB.SelectAction(strSQL, ref m_ConstructionBaseInfo)) return false;
530 541

  
531 542
                // 担当部署取得
532
                string strDep = "SELECT B.DEPARTMENTCODE FROM PROCESSAPPROVAL A, PERSONINCHARGEMASTER B";
533
                strDep += string.Format(" WHERE A.CONSTRUCTIONCODE = {0} AND A.APPROVALCODE = {1} AND A.SEQNO = 1", m_ConstructionCode, m_ApprovalCode);
534
                strDep += " AND B.PERSONCODE = A.PERSONCODE";
535
                ArrayList DepList = new ArrayList();
536
                if (!ApprovalDB.ExecuteReader(strDep, ref DepList)) return false;
537
                int CurrentDepartmentCode = 0;
538
                if (DepList.Count != 0)
539
                {
540
                    object[] DepCnt = (object[])DepList[0];
541
                    CurrentDepartmentCode = CommonMotions.cnvInt(DepCnt[0]);
542
                }
543
                else
544
                {
545
                    CurrentDepartmentCode = ClsApprovalPermission.GetFromConstructionAndApprovalTheDepartment(m_ConstructionCode, m_ApprovalCode);
546
                }
543
                int CurrentDepartmentCode = ClsApprovalPermission.GetFromConstructionAndApprovalTheDepartment(m_ConstructionCode, m_ApprovalCode);
547 544

  
548 545
                // 承認経路マスタ取得
549 546
                strSQL = mAppDB.CreatePrimarykeyString(m_ApprovalCode, CurrentDepartmentCode);
......
561 558
            {
562 559
                cbiDB.close(); cbiDB = null;
563 560
                mAppDB.close(); mAppDB = null;
564
                ApprovalDB.close(); ApprovalDB = null;
565 561
            }
566 562
        }
567 563
        #endregion
trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstractionList/FrmConstructionList.cs
225 225
        /// <param name="e"></param>
226 226
        private void FrmConstructionBaseInfoList_Load(object sender, EventArgs e)
227 227
        {
228
            // ?R???{?{?b?N?X?????\??
229
            InitCombBox();
230

  
231 228
            // ?R???{?{?b?N?X?Z?b?g
232 229
            SetcmbDepartment();
233 230
            SetcmbPersons();
234 231

  
232
            // ?R???{?{?b?N?X?????\??
233
            InitCombBox();
234

  
235 235
            // ?\???X?^?C?????X
236 236
            InitDisplayStyle();
237 237

  
......
317 317
        }
318 318
        #endregion
319 319

  
320
        #region ?S????R???{?{?b?N?X??X
320
        #region ?????R???{?{?b?N?X??X
321 321
        /// <summary>
322
        /// ?S?????X
322
        /// ?????R???{?{?b?N?X??X
323 323
        /// </summary>
324 324
        /// <param name="sender"></param>
325 325
        /// <param name="e"></param>
326
        private void cmbConstructionPerson_SelectedIndexChanged(object sender, EventArgs e)
326
        private void cmbDepartment_SelectedIndexChanged(object sender, EventArgs e)
327 327
        {
328 328
            if (m_initDataLoad) return;
329 329

  
330
            // ?S????I?????????I????????
331
            SetPerosonToDepartment();
330
            // ?S????R???{?{?b?N?X??X
331
            SetcmbPersons();
332 332

  
333 333
            // ?f?[?^?\??
334 334
            DataDisplay();
335 335
        }
336 336
        #endregion
337 337

  
338
        #region ?????R???{?{?b?N?X??X
338
        #region ?S????R???{?{?b?N?X??X
339 339
        /// <summary>
340
        /// ?????R???{?{?b?N?X??X
340
        /// ?S?????X
341 341
        /// </summary>
342 342
        /// <param name="sender"></param>
343 343
        /// <param name="e"></param>
344
        private void cmbDepartment_SelectedIndexChanged(object sender, EventArgs e)
344
        private void cmbConstructionPerson_SelectedIndexChanged(object sender, EventArgs e)
345 345
        {
346 346
            if (m_initDataLoad) return;
347 347

  
348
            // ?S????R???{?{?b?N?X??X
349
            SetcmbPersons();
348
            // ?S????I?????????I????????
349
            SetPerosonToDepartment();
350 350

  
351 351
            // ?f?[?^?\??
352 352
            DataDisplay();
trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstractionList/FrmConstructionListAuxiliary.cs
198 198
            try
199 199
            {
200 200
                // ?L?[?l??
201
                int SRank = (int)CommonDefine.SecurityRankPos.SpecialAuthority;     // ?o?c??A?N?Z?X
202
                int FRank = (int)CommonDefine.SecurityRankPos.FreeAuthority;        // ??????A?N?Z?X
203
                int LAccKey = (int)CommonDefine.SecurityRankPos.LimitedAuthority;   // ???????A?N?Z?X
204
                int NRank = (int)CommonDefine.SecurityRankPos.NormalAuthority;      // ????A?N?Z?X
201
                int AllPath = (int)CommonDefine.SecurityRangePos.AllPath;           // ?S????
202
                int Multiple = (int)CommonDefine.SecurityRangePos.Multiple;         // ????????
203
                int Only = (int)CommonDefine.SecurityRangePos.Only;                 // ?????????
204
                int None = (int)CommonDefine.SecurityRangePos.None;                 // ???S??????
205 205

  
206 206
                // ?f?[?^?A?N?Z?X?????????????????
207
                if (CommonMotions.LoginUserSecurity.SecRank == CommonDefine.SecurityRankList[SRank].Key)
207
                if (CommonMotions.LoginUserData.PersonCode == CommonDefine.AdminCode
208
                || CommonMotions.LoginUserSecurity.SecRange == CommonDefine.SecurityRangeList[AllPath].Key)
208 209
                {
209 210
                    // ???????i????SQL???j
210 211
                }
211
                else if (CommonMotions.LoginUserSecurity.SecRank == CommonDefine.SecurityRankList[FRank].Key
212
                        || CommonMotions.LoginUserSecurity.SecRank == CommonDefine.SecurityRankList[LAccKey].Key)
212
                else if (CommonMotions.LoginUserSecurity.SecRange == CommonDefine.SecurityRangeList[Multiple].Key
213
                        || CommonMotions.LoginUserSecurity.SecRange == CommonDefine.SecurityRangeList[Only].Key)
213 214
                {
214 215
                    // ???????L
215 216
                    // ?@???????i?????????j
......
234 235
                    strSQL += string.Format(" Or (A.ConstructionStatusFlg = {0}", iStatus2);                                            // ???????p??????p???????????????
235 236
                    strSQL += string.Format(" And A.TransferConstruction = {0}))", CommonMotions.LoginUserData.DepartmentCode);
236 237
                }
237
                else if (CommonMotions.LoginUserSecurity.SecRank == CommonDefine.SecurityRankList[NRank].Key)
238
                else if (CommonMotions.LoginUserSecurity.SecRange == CommonDefine.SecurityRangeList[None].Key)
238 239
                {
239 240
                    // ???g?p??
240 241
                    int iStatus = CommonDefine.ProjectsStatus.First(x => x.Value.Equals("?????o")).Key;
241 242

  
242
                    strSQL += " And (A.SalesPersonCode IN (Select A1.PersonCode From PersonInChargeMaster A1";
243
                    strSQL += string.Format(" Where A1.DepartmentCode IN (SELECT A2.DEPARTMENTCODE FROM PERSONDEPARTMENTMASTER A2 WHERE A2.PERSONCODE = {0}))", CommonMotions.LoginUserData.PersonCode);
243
                    strSQL += string.Format(" And (A.SalesPersonCode = {0}", CommonMotions.LoginUserData.PersonCode);
244 244

  
245 245
                    strSQL += string.Format(" Or (A.ConstructionStatusFlg > {0}", iStatus);
246 246

  
247
                    strSQL += " And (A.ConstructionPersonCode IN (Select A3.PersonCode From PersonInChargeMaster A3";
248
                    strSQL += string.Format(" Where A3.DepartmentCode IN (SELECT A4.DEPARTMENTCODE FROM PERSONDEPARTMENTMASTER A4 WHERE A4.PERSONCODE = {0}))", CommonMotions.LoginUserData.PersonCode);
247
                    strSQL += string.Format(" And (A.ConstructionPersonCode = {0}", CommonMotions.LoginUserData.PersonCode);
249 248

  
250
                    strSQL += " Or A.CONSTRSUBPERSONCODE IN (Select A5.PersonCode From PersonInChargeMaster A5";
251
                    strSQL += string.Format(" Where A5.DepartmentCode IN (SELECT A6.DEPARTMENTCODE FROM PERSONDEPARTMENTMASTER A6 WHERE A6.PERSONCODE = {0}))", CommonMotions.LoginUserData.PersonCode);
249
                    strSQL += string.Format(" Or A.CONSTRSUBPERSONCODE = {0}", CommonMotions.LoginUserData.PersonCode);
252 250

  
253
                    strSQL += " Or A.ConstructionInstructor IN (Select A7.PersonCode From PersonInChargeMaster A7";
254
                    strSQL += string.Format(" Where A7.DepartmentCode IN (SELECT A8.DEPARTMENTCODE FROM PERSONDEPARTMENTMASTER A8 WHERE A8.PERSONCODE = {0})))))", CommonMotions.LoginUserData.PersonCode);
251
                    strSQL += string.Format(" Or A.ConstructionInstructor = {0})))", CommonMotions.LoginUserData.PersonCode);
255 252
                }
256 253
            }
257 254
            catch (Exception ex)
......
1251 1248
        {
1252 1249
            try
1253 1250
            {
1254
                int SRank = (int)CommonDefine.SecurityRankPos.SpecialAuthority;     // ???????
1255
                int FRank = (int)CommonDefine.SecurityRankPos.FreeAuthority;        // ?????????
1256
                int LRank = (int)CommonDefine.SecurityRankPos.LimitedAuthority;     // ??????????
1257
                int NRank = (int)CommonDefine.SecurityRankPos.NormalAuthority;      // ???????
1258

  
1251
                int AllPath = (int)CommonDefine.SecurityRangePos.AllPath;           // ?S????
1252
                int Multiple = (int)CommonDefine.SecurityRangePos.Multiple;         // ????????
1259 1253
                int Only = (int)CommonDefine.SecurityRangePos.Only;                 // ?????????
1260 1254
                int None = (int)CommonDefine.SecurityRangePos.None;                 // ???S??????
1261 1255

  
1262 1256
                if (CommonMotions.LoginUserData.PersonCode == CommonDefine.AdminCode
1263
                    || CommonMotions.LoginUserSecurity.SecRank == CommonDefine.SecurityRankList[SRank].Key
1264
                    || CommonMotions.LoginUserSecurity.SecRank == CommonDefine.SecurityRankList[FRank].Key)
1257
                    || CommonMotions.LoginUserSecurity.SecRange == CommonDefine.SecurityRangeList[AllPath].Key)
1265 1258
                {
1266 1259
                    // ?????E?S????R???{?\??
1267 1260
                    DispAllCombBoxControl(true);
1268 1261
                }
1269
                else if (CommonMotions.LoginUserSecurity.SecRank == CommonDefine.SecurityRankList[LRank].Key)
1262
                else
1270 1263
                {
1271
                    if (CommonMotions.LoginUserSecurity.SecRange == (int)CommonDefine.SecurityRangeList[Only].Key
1272
                        || CommonMotions.LoginUserSecurity.SecRange == (int)CommonDefine.SecurityRangeList[None].Key)
1264
                    if (CommonMotions.LoginUserSecurity.SecRange == (int)CommonDefine.SecurityRangeList[Multiple].Key)
1273 1265
                    {
1266
                        // ?????E?S????R???{?\??
1267
                        DispAllCombBoxControl(true);
1268
                    }
1269
                    else if (CommonMotions.LoginUserSecurity.SecRange == (int)CommonDefine.SecurityRangeList[Only].Key)
1270
                    {
1274 1271
                        // ?????R???{??\??
1275 1272
                        NonDispDepCombBox();
1276 1273
                    }
1277
                    else
1274
                    else if (CommonMotions.LoginUserSecurity.SecRange == (int)CommonDefine.SecurityRangeList[None].Key)
1278 1275
                    {
1279 1276
                        // ?????E?S????R???{?\??
1280
                        DispAllCombBoxControl(true);
1277
                        DispAllCombBoxControl(false);
1281 1278
                    }
1282 1279
                }
1283
                else if (CommonMotions.LoginUserSecurity.SecRank == CommonDefine.SecurityRankList[NRank].Key)
1280

  
1281
                // ???????????R???{?{?b?N?X?f?[?^??????Z?b?g????
1282
                for (int i = 0; i < cmbDepartment.Items.Count; i++)
1284 1283
                {
1285
                    if (CommonMotions.LoginUserSecurity.SecRange == (int)CommonDefine.SecurityRangeList[Only].Key
1286
                        || CommonMotions.LoginUserSecurity.SecRange == (int)CommonDefine.SecurityRangeList[None].Key)
1284
                    KeyValuePair<int, string> wrkPair = (KeyValuePair<int, string>)cmbDepartment.Items[i];
1285
                    if (wrkPair.Key == CommonMotions.LoginUserData.DepartmentCode)
1287 1286
                    {
1288
                        // ?????R???{??\??
1289
                        NonDispDepCombBox();
1287
                        cmbDepartment.SelectedValue = CommonMotions.LoginUserData.DepartmentCode;
1290 1288
                    }
1291
                    else
1289
                }
1290

  
1291
                for (int i = 0; i < cmbConstructionPerson.Items.Count; i++)
1292
                {
1293
                    KeyValuePair<int, string> wrkPair = (KeyValuePair<int, string>)cmbConstructionPerson.Items[i];
1294
                    if (wrkPair.Key == CommonMotions.LoginUserData.PersonCode)
1292 1295
                    {
1293
                        // ?????E?S????R???{?\??
1294
                        DispAllCombBoxControl(true);
1296
                        cmbConstructionPerson.SelectedValue = CommonMotions.LoginUserData.PersonCode;
1295 1297
                    }
1296 1298
                }
1297 1299
            }
......
1364 1366
        /// <summary>
1365 1367
        /// ?????R???{?{?b?N?X????????Z?b?g????
1366 1368
        /// </summary>
1367
        private bool SetcmbDepartment()
1369
        private void SetcmbDepartment()
1368 1370
        {
1369 1371
            IOMDepartment depDB = new IOMDepartment();
1370 1372
            bool bSave = m_initDataLoad;
......
1414 1416

  
1415 1417
                // ?????}?X?^???
1416 1418
                ArrayList arList = new ArrayList();
1417
                if (!depDB.ExecuteReader(strSQL, ref arList)) return false;
1419
                if (!depDB.ExecuteReader(strSQL, ref arList)) return;
1418 1420

  
1419 1421
                List<KeyValuePair<int, string>> ConstructionDataList = new List<KeyValuePair<int, string>>();
1420 1422
                ConstructionDataList.Add(new KeyValuePair<int, string>(0, ""));
......
1437 1439
                    if (CommonMotions.LoginUserData.DepartmentCode != CommonDefine.s_GeneralAffairsDevision)
1438 1440
                        cmbDepartment.SelectedValue = CommonMotions.LoginUserData.DepartmentCode;
1439 1441
                }
1440
                else
1441
                {
1442
                    // ?????R???{?{?b?N?X?f?[?^??????Z?b?g????
1443
                    for (int i = 0; i < cmbDepartment.Items.Count; i++)
1444
                    {
1445
                        KeyValuePair<int, string> wrkPair = (KeyValuePair<int, string>)cmbDepartment.Items[i];
1446
                        if (wrkPair.Key == CommonMotions.LoginUserData.DepartmentCode)
1447
                        {
1448
                            cmbDepartment.SelectedValue = CommonMotions.LoginUserData.DepartmentCode;
1449
                        }
1450
                    }
1451
                }
1452 1442

  
1453
                return true;
1443
                return;
1454 1444
            }
1455 1445
            catch (Exception ex)
1456 1446
            {
1457 1447
                logger.ErrorFormat("?V?X?e???G???[?F{0}?F{1}", CommonMotions.GetMethodName(), ex.Message);
1458
                return false;
1459 1448
            }
1460 1449
            finally
1461 1450
            {
......
1469 1458
        /// <summary>
1470 1459
        /// ?S????R???{?{?b?N?X????????Z?b?g????
1471 1460
        /// </summary>
1472
        private bool SetcmbPersons()
1461
        private void SetcmbPersons()
1473 1462
        {
1474 1463
            IOMPersonInCharge picDB = new IOMPersonInCharge();
1475 1464
            List<PersonInChargeMaster> workList = new List<PersonInChargeMaster>();
......
1489 1478
                    strSQL = string.Format(" WHERE DEPARTMENTCODE = {0} AND DeleteFlg = 0 Order By EmployeeClassFlg ASC, DisplayOrder ASC", DepartmentCode);
1490 1479

  
1491 1480
                // ?S????}?X?^???
1492
                if (!picDB.SelectAction(strSQL, ref workList)) return false;
1481
                if (!picDB.SelectAction(strSQL, ref workList)) return;
1493 1482

  
1494 1483
                List<KeyValuePair<int, string>> ConstructionDataList = new List<KeyValuePair<int, string>>();
1495 1484
                ConstructionDataList.Add(new KeyValuePair<int, string>(0, ""));
......
1513 1502
                        cmbConstructionPerson.SelectedValue = CommonMotions.LoginUserData.PersonCode;
1514 1503
                    }
1515 1504
                }
1516
                else
1517
                {
1518
                    for (int i = 0; i < cmbConstructionPerson.Items.Count; i++)
1519
                    {
1520
                        KeyValuePair<int, string> wrkPair = (KeyValuePair<int, string>)cmbConstructionPerson.Items[i];
1521
                        if (wrkPair.Key == CommonMotions.LoginUserData.PersonCode)
1522
                        {
1523
                            cmbConstructionPerson.SelectedValue = CommonMotions.LoginUserData.PersonCode;
1524
                        }
1525
                    }
1526
                }
1527 1505

  
1528
                return true;
1506
                return;
1529 1507
            }
1530 1508
            catch (Exception ex)
1531 1509
            {
1532 1510
                logger.ErrorFormat("?V?X?e???G???[?F{0}?F{1}", CommonMotions.GetMethodName(), ex.Message);
1533
                return false;
1534 1511
            }
1535 1512
            finally
1536 1513
            {
trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstructionBudget/FrmConstructionBudgetAuxiliary.cs
4989 4989
                    else
4990 4990
                    {
4991 4991
                        DateTime LastDay = DateTimeUtil.EndOfMonth(SDate);
4992
                        AfterDays = LastDay.Day;
4992
                        AfterDays = (LastDay.Day - SDate.Day) + 1;
4993 4993
                    }
4994 4994

  
4995 4995
                    string strDetail = "SELECT A.CONSTRUCTIONCODE, B.GROUPCOUNT, B.LINECOUNT, MIN(B.COLUMNCOUNT), C.PERSONCODE, C.PERSONNAME, C.MONTHLYSALARY, A.SALARYDAYS";
......
5021 5021
                        }
5022 5022
                        else
5023 5023
                        {
5024
                            SetSalary = CommonMotions.cnvRound(MONTHLYSALARY / 30) * AfterDays;
5024
                            SetSalary = CommonMotions.cnvRound((MONTHLYSALARY * CommonDefine.s_SalaryCorrection) / 30) * AfterDays;
5025 5025
                        }
5026 5026

  
5027 5027
                        if (!ExecDB.UpdateFeild(Constrcode, GROUPCOUNT, LINECOUNT, COLUMNCOUNT, (int)IOConstructionLedgerExcute.TableColumn.PaymentAmount, SetSalary, false))
trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstructionLedger/FrmConstructionLedger.designer.cs
301 301
            this.pnlGroup1.Controls.Add(this.textBox1);
302 302
            this.pnlGroup1.Controls.Add(this.radioButton2);
303 303
            this.pnlGroup1.Controls.Add(this.radioButton3);
304
            this.pnlGroup1.Enabled = false;
305 304
            this.pnlGroup1.Location = new System.Drawing.Point(959, 62);
306 305
            this.pnlGroup1.Name = "pnlGroup1";
307 306
            this.pnlGroup1.Size = new System.Drawing.Size(360, 30);
trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstructionLedgerList/FrmConstructionLedgerList.cs
486 486
        private void FrmConstructionBaseInfoList_Load(object sender, EventArgs e)
487 487
        {
488 488

  
489
            // ?R???{?{?b?N?X?????\??
490
            InitCombBox();
491

  
492 489
            // ?R???{?{?b?N?X?Z?b?g
493 490
            SetcmbDepartment();
494 491
            SetcmbPersons();
495 492

  
493
            // ?R???{?{?b?N?X?????\??
494
            InitCombBox();
495

  
496 496
            // ?O???b?h???????
497 497
            SetDisplayObject();
498 498

  
trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstructionLedgerList/FrmConstructionLedgerListAuxiliary.cs
183 183
            try
184 184
            {
185 185
                // ?L?[?l??
186
                int SRank = (int)CommonDefine.SecurityRankPos.SpecialAuthority;     // ?o?c??A?N?Z?X
187
                int FRank = (int)CommonDefine.SecurityRankPos.FreeAuthority;        // ??????A?N?Z?X
188
                int LRank = (int)CommonDefine.SecurityRankPos.LimitedAuthority;     // ???????A?N?Z?X
189
                int NRank = (int)CommonDefine.SecurityRankPos.NormalAuthority;      // ????A?N?Z?X
186
                int AllPath = (int)CommonDefine.SecurityRangePos.AllPath;           // ?S????
187
                int Multiple = (int)CommonDefine.SecurityRangePos.Multiple;         // ????????
188
                int Only = (int)CommonDefine.SecurityRangePos.Only;                 // ?????????
189
                int None = (int)CommonDefine.SecurityRangePos.None;                 // ???S??????
190 190

  
191 191
                // ?f?[?^?A?N?Z?X?????????????????
192
                // ?V?X?e????????????f?[?^?A?N?Z?X???????????
193
                if (CommonMotions.LoginUserData.PersonCode == CommonDefine.AdminCode)
192
                if (CommonMotions.LoginUserData.PersonCode == CommonDefine.AdminCode
193
                || CommonMotions.LoginUserSecurity.SecRange == CommonDefine.SecurityRangeList[AllPath].Key)
194 194
                {
195
                    // ?V?X?e???????i???????j
196
                }
197
                else if (CommonMotions.LoginUserSecurity.SecRank == CommonDefine.SecurityRankList[SRank].Key)
198
                {
199 195
                    // ???????i????SQL???j
200

  
201 196
                }
202
                else if (CommonMotions.LoginUserSecurity.SecRank == CommonDefine.SecurityRankList[FRank].Key
203
                        || CommonMotions.LoginUserSecurity.SecRank == CommonDefine.SecurityRankList[LRank].Key)
197
                else if (CommonMotions.LoginUserSecurity.SecRange == CommonDefine.SecurityRangeList[Multiple].Key
198
                        || CommonMotions.LoginUserSecurity.SecRange == CommonDefine.SecurityRangeList[Only].Key)
204 199
                {
205 200
                    // ???????L
206 201
                    // ?@???????i?????????j
......
225 220
                    strSecurity += string.Format(" Or (D.ConstructionStatusFlg = {0}", iStatus2);                                            // ???????p??????p???????????????
226 221
                    strSecurity += string.Format(" And D.TransferConstruction = {0}))", CommonMotions.LoginUserData.DepartmentCode);
227 222
                }
228
                else if (CommonMotions.LoginUserSecurity.SecRank == CommonDefine.SecurityRankList[NRank].Key)
223
                else if (CommonMotions.LoginUserSecurity.SecRange == CommonDefine.SecurityRangeList[None].Key)
229 224
                {
230 225
                    // ???g?p??
231 226
                    int iStatus = CommonDefine.ProjectsStatus.First(x => x.Value.Equals("?????o")).Key;
232 227

  
233
                    strSecurity = " And (D.SalesPersonCode IN (Select A1.PersonCode From PersonInChargeMaster A1";
234
                    strSecurity += string.Format(" Where A1.DepartmentCode IN (SELECT A2.DEPARTMENTCODE FROM PERSONDEPARTMENTMASTER A2 WHERE A2.PERSONCODE = {0}))", CommonMotions.LoginUserData.PersonCode);
228
                    strSecurity = string.Format(" And (D.SalesPersonCode = {0}", CommonMotions.LoginUserData.PersonCode);
235 229

  
236 230
                    strSecurity += string.Format(" Or (D.ConstructionStatusFlg > {0}", iStatus);
237 231

  
238
                    strSecurity += " And (D.ConstructionPersonCode IN (Select A3.PersonCode From PersonInChargeMaster A3";
239
                    strSecurity += string.Format(" Where A3.DepartmentCode IN (SELECT A4.DEPARTMENTCODE FROM PERSONDEPARTMENTMASTER A4 WHERE A4.PERSONCODE = {0}))", CommonMotions.LoginUserData.PersonCode);
232
                    strSecurity += string.Format(" And (D.ConstructionPersonCode = {0}", CommonMotions.LoginUserData.PersonCode);
240 233

  
241
                    strSecurity += " Or D.CONSTRSUBPERSONCODE IN (Select A5.PersonCode From PersonInChargeMaster A5";
242
                    strSecurity += string.Format(" Where A5.DepartmentCode IN (SELECT A6.DEPARTMENTCODE FROM PERSONDEPARTMENTMASTER A6 WHERE A6.PERSONCODE = {0}))", CommonMotions.LoginUserData.PersonCode);
234
                    strSecurity += string.Format(" Or D.CONSTRSUBPERSONCODE = {0}", CommonMotions.LoginUserData.PersonCode);
243 235

  
244
                    strSecurity += " Or D.ConstructionInstructor IN (Select A7.PersonCode From PersonInChargeMaster A7";
245
                    strSecurity += string.Format(" Where A7.DepartmentCode IN (SELECT A8.DEPARTMENTCODE FROM PERSONDEPARTMENTMASTER A8 WHERE A8.PERSONCODE = {0})))))", CommonMotions.LoginUserData.PersonCode);
236
                    strSecurity += string.Format(" Or D.ConstructionInstructor = {0})))", CommonMotions.LoginUserData.PersonCode);
246 237
                }
247 238
            }
248 239
            catch (Exception ex)
......
938 929
                strSQL += " ,MAX(C.CONSTRUCTIONPERIODEND) M3, MAX(C.CONSTRUCTIONPERIODEND2) M4";
939 930
                strSQL += " ,MAX(D.CONSTRUCTIONPERIODEND) S3, MAX(D.CONSTRUCTIONPERIODEND2) S4";
940 931
                strSQL += " ,MAX(E.CONSTRUCTIONPERIODEND) I3, MAX(E.CONSTRUCTIONPERIODEND2) I4";
941
                strSQL += " ,SUM(C2.EXECUTIONAMOUNT) M5, SUM(D2.EXECUTIONAMOUNT) S5, SUM(E2.EXECUTIONAMOUNT) I5";
942
                strSQL += " ,COUNT(C2.EXECUTIONAMOUNT) M6, COUNT(D2.EXECUTIONAMOUNT) S6, COUNT(E2.EXECUTIONAMOUNT) I6";
932
                strSQL += " ,SUM(C.EXECUTIONAMOUNT) M5, SUM(D.EXECUTIONAMOUNT) S5, SUM(E.EXECUTIONAMOUNT) I5";
933
                strSQL += " ,COUNT(C.EXECUTIONAMOUNT) M6, COUNT(D.EXECUTIONAMOUNT) S6, COUNT(E.EXECUTIONAMOUNT) I6";
943 934
                strSQL += " FROM PERSONINCHARGEMASTER P";
944 935

  
945 936
                // ?H???S?????f?[?^??
946
                strSQL += " LEFT JOIN CONSTRUCTIONBASEINFO C ON C.CONSTRUCTIONPERSONCODE = P.PERSONCODE";
937
                strSQL += " LEFT JOIN (SELECT C1.CONSTRUCTIONPERSONCODE, C1.CONSTRUCTIONSTATUSFLG, C1.CONSTRUCTIONPERIOD";
938
                strSQL += ", C1.CONSTRUCTIONPERIODSTART, C1.CONSTRUCTIONPERIODSTART2, C1.CONSTRUCTIONPERIODEND, C1.CONSTRUCTIONPERIODEND2, C2.EXECUTIONAMOUNT";
939
                strSQL += " FROM CONSTRUCTIONBASEINFO C1, CONSTRUCTIONLEDGERDETAIL C2, CONSTRUCTIONLEDGER C3";
940
                strSQL += " WHERE C2.CONSTRUCTIONCODE = C1.CONSTRUCTIONCODE";
941
                strSQL += string.Format(" AND C2.GROUPCOUNT = {0}", (int)FrmConstructionLedger.DataGroup.Payroll);
942
                strSQL += " AND C3.CONSTRUCTIONCODE = C1.CONSTRUCTIONCODE) C";
943
                strSQL += " ON C.CONSTRUCTIONPERSONCODE = P.PERSONCODE";
947 944
                strSQL += string.Format(" AND C.CONSTRUCTIONSTATUSFLG <> {0}", NotOrder);
948 945
                strSQL += string.Format(" AND C.CONSTRUCTIONPERIOD = {0}", numUDConstPro.Value);
949
                strSQL += " LEFT JOIN CONSTRUCTIONLEDGERDETAIL C2 ON C2.CONSTRUCTIONCODE = C.CONSTRUCTIONCODE";
950
                strSQL += string.Format(" AND C2.GROUPCOUNT = {0}", (int)FrmConstructionLedger.DataGroup.Payroll);
951 946

  
952 947
                // ?H?????S?????f?[?^??
953
                strSQL += " LEFT JOIN CONSTRUCTIONBASEINFO D ON D.CONSTRSUBPERSONCODE = P.PERSONCODE";
948
                strSQL += " LEFT JOIN (SELECT D1.CONSTRUCTIONPERSONCODE, D1.CONSTRUCTIONSTATUSFLG, D1.CONSTRUCTIONPERIOD";
949
                strSQL += ", D1.CONSTRUCTIONPERIODSTART, D1.CONSTRUCTIONPERIODSTART2, D1.CONSTRUCTIONPERIODEND, D1.CONSTRUCTIONPERIODEND2, D2.EXECUTIONAMOUNT";
950
                strSQL += " FROM CONSTRUCTIONBASEINFO D1, CONSTRUCTIONLEDGERDETAIL D2, CONSTRUCTIONLEDGER D3";
951
                strSQL += " WHERE D2.CONSTRUCTIONCODE = D1.CONSTRUCTIONCODE";
952
                strSQL += string.Format(" AND D2.GROUPCOUNT = {0}", (int)FrmConstructionLedger.DataGroup.Assistant);
953
                strSQL += " AND D3.CONSTRUCTIONCODE = D1.CONSTRUCTIONCODE) D";
954
                strSQL += " ON D.CONSTRUCTIONPERSONCODE = P.PERSONCODE";
954 955
                strSQL += string.Format(" AND D.CONSTRUCTIONSTATUSFLG <> {0}", NotOrder);
955 956
                strSQL += string.Format(" AND D.CONSTRUCTIONPERIOD = {0}", numUDConstPro.Value);
956
                strSQL += " LEFT JOIN CONSTRUCTIONLEDGERDETAIL D2 ON D2.CONSTRUCTIONCODE = D.CONSTRUCTIONCODE";
957
                strSQL += string.Format(" AND D2.GROUPCOUNT = {0}", (int)FrmConstructionLedger.DataGroup.Assistant);
958 957

  
959 958
                // ?H???w??????f?[?^??
960
                strSQL += " LEFT JOIN CONSTRUCTIONBASEINFO E ON E.CONSTRUCTIONINSTRUCTOR = P.PERSONCODE";
959
                strSQL += " LEFT JOIN (SELECT E1.CONSTRUCTIONPERSONCODE, E1.CONSTRUCTIONSTATUSFLG, E1.CONSTRUCTIONPERIOD";
960
                strSQL += ", E1.CONSTRUCTIONPERIODSTART, E1.CONSTRUCTIONPERIODSTART2, E1.CONSTRUCTIONPERIODEND, E1.CONSTRUCTIONPERIODEND2, E2.EXECUTIONAMOUNT";
961
                strSQL += " FROM CONSTRUCTIONBASEINFO E1, CONSTRUCTIONLEDGERDETAIL E2, CONSTRUCTIONLEDGER E3";
962
                strSQL += " WHERE E2.CONSTRUCTIONCODE = E1.CONSTRUCTIONCODE";
963
                strSQL += string.Format(" AND E2.GROUPCOUNT = {0}", (int)FrmConstructionLedger.DataGroup.Instructor);
964
                strSQL += " AND E3.CONSTRUCTIONCODE = E1.CONSTRUCTIONCODE) E";
965
                strSQL += " ON E.CONSTRUCTIONPERSONCODE = P.PERSONCODE";
961 966
                strSQL += string.Format(" AND E.CONSTRUCTIONSTATUSFLG <> {0}", NotOrder);
962 967
                strSQL += string.Format(" AND E.CONSTRUCTIONPERIOD = {0}", numUDConstPro.Value);
963
                strSQL += " LEFT JOIN CONSTRUCTIONLEDGERDETAIL E2 ON E2.CONSTRUCTIONCODE = E.CONSTRUCTIONCODE";
964
                strSQL += string.Format(" AND E2.GROUPCOUNT = {0}", (int)FrmConstructionLedger.DataGroup.Instructor);
965 968

  
966 969
                strSQL += " WHERE P.DELETEFLG = 0";
967 970
                strSQL += string.Format(" AND P.LEDGERFLG = {0}", (int)CommonDefine.PersonLedgerDivNo.CalcTarget);
971

  
968 972
                // ?H?????f?[?^??????????????
969 973
                strSQL += " AND P.DEPARTMENTCODE IN";
970 974
                strSQL += " (SELECT DEPARTMENTCODE FROM (SELECT A.DEPARTMENTCODE, A.DEPARTMENTSTRING, A.DISPLAYORDER, COUNT(*) CNT";
......
973 977
                strSQL += " AND A.DEPARTMENTCODE = B.DEPARTMENTCODE";
974 978
                strSQL += " AND B.PERSONCODE = C.CONSTRUCTIONPERSONCODE";
975 979
                strSQL += " AND D.CONSTRUCTIONCODE = C.CONSTRUCTIONCODE";
980

  
976 981
                strSQL += " GROUP BY A.DEPARTMENTCODE, A.DEPARTMENTSTRING, A.DISPLAYORDER))";
977 982

  
978 983
                // 16???????t?H?[????_?????????????
......
986 991
                // ?????R?[?h?I?????????????????????????
987 992
                if (DepartmentCode != 0) strSQL += string.Format(" AND P.DEPARTMENTCODE = {0}", DepartmentCode);
988 993
                if (PersonCode != 0) strSQL += string.Format(" AND P.PERSONCODE = {0}", PersonCode);
994

  
989 995
                strSQL += " GROUP BY P.PERSONCODE, P.PERSONNAME, P.DISPLAYORDER, P.MonthlySalary";
990 996
                strSQL += " ORDER BY P.DISPLAYORDER";
991 997

  
......
2066 2072
        {
2067 2073
            try
2068 2074
            {
2069
                int SRank = (int)CommonDefine.SecurityRankPos.SpecialAuthority;     // ???????
2070
                int FRank = (int)CommonDefine.SecurityRankPos.FreeAuthority;        // ?????????
2071
                int LRank = (int)CommonDefine.SecurityRankPos.LimitedAuthority;     // ??????????
2072
                int NRank = (int)CommonDefine.SecurityRankPos.NormalAuthority;      // ???????
2073

  
2075
                int AllPath = (int)CommonDefine.SecurityRangePos.AllPath;           // ?S????
2076
                int Multiple = (int)CommonDefine.SecurityRangePos.Multiple;         // ????????
2074 2077
                int Only = (int)CommonDefine.SecurityRangePos.Only;                 // ?????????
2075 2078
                int None = (int)CommonDefine.SecurityRangePos.None;                 // ???S??????
2076 2079

  
2077 2080
                if (CommonMotions.LoginUserData.PersonCode == CommonDefine.AdminCode
2078
                    || CommonMotions.LoginUserSecurity.SecRank == CommonDefine.SecurityRankList[SRank].Key
2079
                    || CommonMotions.LoginUserSecurity.SecRank == CommonDefine.SecurityRankList[FRank].Key)
2081
                    || CommonMotions.LoginUserSecurity.SecRange == CommonDefine.SecurityRangeList[AllPath].Key)
2080 2082
                {
2081 2083
                    // ?????E?S????R???{?\??
2082 2084
                    DispAllCombBoxControl(true);
2083 2085
                }
2084
                else if (CommonMotions.LoginUserSecurity.SecRank == CommonDefine.SecurityRankList[LRank].Key)
2086
                else
2085 2087
                {
2086
                    if (CommonMotions.LoginUserSecurity.SecRange == (int)CommonDefine.SecurityRangeList[Only].Key
2087
                        || CommonMotions.LoginUserSecurity.SecRange == (int)CommonDefine.SecurityRangeList[None].Key)
2088
                    if (CommonMotions.LoginUserSecurity.SecRange == (int)CommonDefine.SecurityRangeList[Multiple].Key)
2088 2089
                    {
2090
                        // ?????E?S????R???{?\??
2091
                        DispAllCombBoxControl(true);
2092
                    }
2093
                    else if (CommonMotions.LoginUserSecurity.SecRange == (int)CommonDefine.SecurityRangeList[Only].Key)
2094
                    {
2089 2095
                        // ?????R???{??\??
2090 2096
                        NonDispDepCombBox();
2091 2097
                    }
2092
                    else
2098
                    else if (CommonMotions.LoginUserSecurity.SecRange == (int)CommonDefine.SecurityRangeList[None].Key)
2093 2099
                    {
2094 2100
                        // ?????E?S????R???{?\??
2095
                        DispAllCombBoxControl(true);
2101
                        DispAllCombBoxControl(false);
2096 2102
                    }
2097 2103
                }
2098
                else if (CommonMotions.LoginUserSecurity.SecRank == CommonDefine.SecurityRankList[NRank].Key)
2104

  
2105
                // ???????????R???{?{?b?N?X?f?[?^??????Z?b?g????
2106
                for (int i = 0; i < cmbDepartment.Items.Count; i++)
2099 2107
                {
2100
                    if (CommonMotions.LoginUserSecurity.SecRange == (int)CommonDefine.SecurityRangeList[Only].Key
2101
                        || CommonMotions.LoginUserSecurity.SecRange == (int)CommonDefine.SecurityRangeList[None].Key)
2108
                    KeyValuePair<int, string> wrkPair = (KeyValuePair<int, string>)cmbDepartment.Items[i];
2109
                    if (wrkPair.Key == CommonMotions.LoginUserData.DepartmentCode)
2102 2110
                    {
2103
                        // ?????R???{??\??
2104
                        NonDispDepCombBox();
2111
                        cmbDepartment.SelectedValue = CommonMotions.LoginUserData.DepartmentCode;
2105 2112
                    }
2106
                    else
2113
                }
2114

  
2115
                for (int i = 0; i < cmbConstructionPerson.Items.Count; i++)
2116
                {
2117
                    KeyValuePair<int, string> wrkPair = (KeyValuePair<int, string>)cmbConstructionPerson.Items[i];
2118
                    if (wrkPair.Key == CommonMotions.LoginUserData.PersonCode)
2107 2119
                    {
2108
                        // ?????E?S????R???{?\??
2109
                        DispAllCombBoxControl(true);
2120
                        cmbConstructionPerson.SelectedValue = CommonMotions.LoginUserData.PersonCode;
2110 2121
                    }
2111 2122
                }
2112 2123
            }
......
2170 2181
        /// <summary>
2171 2182
        /// ?????R???{?{?b?N?X????????Z?b?g????
2172 2183
        /// </summary>
2173
        private bool SetcmbDepartment()
2184
        private void SetcmbDepartment()
2174 2185
        {
2175 2186
            IOMDepartment depDB = new IOMDepartment();
2176 2187
            bool bSave = m_initDataLoad;
......
2220 2231

  
2221 2232
                // ?????}?X?^???
2222 2233
                ArrayList arList = new ArrayList();
2223
                if (!depDB.ExecuteReader(strSQL, ref arList)) return false;
2234
                if (!depDB.ExecuteReader(strSQL, ref arList)) return;
2224 2235

  
2225 2236
                List<KeyValuePair<int, string>> ConstructionDataList = new List<KeyValuePair<int, string>>();
2226 2237
                ConstructionDataList.Add(new KeyValuePair<int, string>(0, ""));
......
2249 2260
                            cmbDepartment.SelectedValue = CommonMotions.LoginUserData.DepartmentCode;
2250 2261
                    }
2251 2262
                }
2252
                else
2253
                {
2254
                    // ?????R???{?{?b?N?X?f?[?^??????Z?b?g????
2255
                    for (int i = 0; i < cmbDepartment.Items.Count; i++)
2256
                    {
2257
                        KeyValuePair<int, string> wrkPair = (KeyValuePair<int, string>)cmbDepartment.Items[i];
2258
                        if (wrkPair.Key == CommonMotions.LoginUserData.DepartmentCode)
2259
                        {
2260
                            cmbDepartment.SelectedValue = CommonMotions.LoginUserData.DepartmentCode;
2261
                        }
2262
                    }
2263
                }
2264 2263

  
2265
                return true;
2264
                return;
2266 2265
            }
2267 2266
            catch (Exception ex)
2268 2267
            {
2269 2268
                logger.ErrorFormat("?V?X?e???G???[?F{0}?F{1}", CommonMotions.GetMethodName(), ex.Message);
2270
                return false;
2271 2269
            }
2272 2270
            finally
2273 2271
            {
......
2281 2279
        /// <summary>
2282 2280
        /// ?S????R???{?{?b?N?X????????Z?b?g????
2283 2281
        /// </summary>
2284
        private bool SetcmbPersons()
2282
        private void SetcmbPersons()
2285 2283
        {
2286 2284
            IOMPersonInCharge picDB = new IOMPersonInCharge();
2287 2285
            List<PersonInChargeMaster> workList = new List<PersonInChargeMaster>();
......
2301 2299
                    strSQL = string.Format(" WHERE DEPARTMENTCODE = {0} AND DeleteFlg = 0 Order By EmployeeClassFlg ASC, DisplayOrder ASC", DepartmentCode);
2302 2300

  
2303 2301
                // ?S????}?X?^???
2304
                if (!picDB.SelectAction(strSQL, ref workList)) return false;
2302
                if (!picDB.SelectAction(strSQL, ref workList)) return;
2305 2303

  
2306 2304
                List<KeyValuePair<int, string>> ConstructionDataList = new List<KeyValuePair<int, string>>();
2307 2305
                ConstructionDataList.Add(new KeyValuePair<int, string>(0, ""));
......
2326 2324
                        cmbConstructionPerson.SelectedValue = CommonMotions.LoginUserData.PersonCode;
2327 2325
                    }
2328 2326
                }
2329
                else
2330
                {
2331
                    for (int i = 0; i < cmbConstructionPerson.Items.Count; i++)
2332
                    {
2333
                        KeyValuePair<int, string> wrkPair = (KeyValuePair<int, string>)cmbConstructionPerson.Items[i];
2334
                        if (wrkPair.Key == CommonMotions.LoginUserData.PersonCode)
2335
                        {
2336
                            cmbConstructionPerson.SelectedValue = CommonMotions.LoginUserData.PersonCode;
2337
                        }
2338
                    }
2339
                }
2340 2327

  
2341
                return true;
2328
                return;
2342 2329
            }
2343 2330
            catch (Exception ex)
2344 2331
            {
2345 2332
                logger.ErrorFormat("?V?X?e???G???[?F{0}?F{1}", CommonMotions.GetMethodName(), ex.Message);
2346
                return false;
2347 2333
            }
2348 2334
            finally
2349 2335
            {
trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/CopyTargetList/FrmCopyTargetList.cs
195 195
        /// <param name="e"></param>
196 196
        private void FrmConstructionBaseInfoList_Load(object sender, EventArgs e)
197 197
        {
198
            // ?R???{?{?b?N?X?Z?b?g
199
            SetcmbDepartment();
200
            SetcmbPersons();
201

  
198 202
            // ?R???{?{?b?N?X?????\??
199 203
            InitCombBox();
200 204

  
201
            // ?R???{?{?b?N?X?Z?b?g
202
            SetcmbDepartment();
203
            SetcmbPersons();
204
            
205 205
            // ?????\??
206 206
            // ?O???b?h??s??0????
207 207
            dgvMaster.Rows.Clear();
trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/CopyTargetList/FrmCopyTargetListAuxiliary.cs
581 581
        {
582 582
            try
583 583
            {
584
                int SRank = (int)CommonDefine.SecurityRankPos.SpecialAuthority;     // ???????
585
                int FRank = (int)CommonDefine.SecurityRankPos.FreeAuthority;        // ?????????
586
                int LRank = (int)CommonDefine.SecurityRankPos.LimitedAuthority;     // ??????????
587
                int NRank = (int)CommonDefine.SecurityRankPos.NormalAuthority;      // ???????
588

  
584
                int AllPath = (int)CommonDefine.SecurityRangePos.AllPath;           // ?S????
585
                int Multiple = (int)CommonDefine.SecurityRangePos.Multiple;         // ????????
589 586
                int Only = (int)CommonDefine.SecurityRangePos.Only;                 // ?????????
590 587
                int None = (int)CommonDefine.SecurityRangePos.None;                 // ???S??????
591 588

  
592 589
                if (CommonMotions.LoginUserData.PersonCode == CommonDefine.AdminCode
593
                    || CommonMotions.LoginUserSecurity.SecRank == CommonDefine.SecurityRankList[SRank].Key
594
                    || CommonMotions.LoginUserSecurity.SecRank == CommonDefine.SecurityRankList[FRank].Key)
590
                    || CommonMotions.LoginUserSecurity.SecRange == CommonDefine.SecurityRangeList[AllPath].Key)
595 591
                {
596 592
                    // ?????E?S????R???{?\??
597 593
                    DispAllCombBoxControl(true);
598 594
                }
599
                else if (CommonMotions.LoginUserSecurity.SecRank == CommonDefine.SecurityRankList[LRank].Key)
595
                else
600 596
                {
601
                    if (CommonMotions.LoginUserSecurity.SecRange == (int)CommonDefine.SecurityRangeList[Only].Key
602
                        || CommonMotions.LoginUserSecurity.SecRange == (int)CommonDefine.SecurityRangeList[None].Key)
597
                    if (CommonMotions.LoginUserSecurity.SecRange == (int)CommonDefine.SecurityRangeList[Multiple].Key)
603 598
                    {
599
                        // ?????E?S????R???{?\??
600
                        DispAllCombBoxControl(true);
601
                    }
602
                    else if (CommonMotions.LoginUserSecurity.SecRange == (int)CommonDefine.SecurityRangeList[Only].Key)
603
                    {
604 604
                        // ?????R???{??\??
605 605
                        NonDispDepCombBox();
606 606
                    }
607
                    else
607
                    else if (CommonMotions.LoginUserSecurity.SecRange == (int)CommonDefine.SecurityRangeList[None].Key)
608 608
                    {
609 609
                        // ?????E?S????R???{?\??
610
                        DispAllCombBoxControl(true);
610
                        DispAllCombBoxControl(false);
611 611
                    }
612 612
                }
613
                else if (CommonMotions.LoginUserSecurity.SecRank == CommonDefine.SecurityRankList[NRank].Key)
613

  
614
                // ???????????R???{?{?b?N?X?f?[?^??????Z?b?g????
615
                for (int i = 0; i < cmbDepartment.Items.Count; i++)
614 616
                {
615
                    if (CommonMotions.LoginUserSecurity.SecRange == (int)CommonDefine.SecurityRangeList[Only].Key
616
                        || CommonMotions.LoginUserSecurity.SecRange == (int)CommonDefine.SecurityRangeList[None].Key)
617
                    KeyValuePair<int, string> wrkPair = (KeyValuePair<int, string>)cmbDepartment.Items[i];
618
                    if (wrkPair.Key == CommonMotions.LoginUserData.DepartmentCode)
617 619
                    {
618
                        // ?????R???{??\??
619
                        NonDispDepCombBox();
620
                        cmbDepartment.SelectedValue = CommonMotions.LoginUserData.DepartmentCode;
620 621
                    }
621
                    else
622
                }
623

  
624
                for (int i = 0; i < cmbConstructionPerson.Items.Count; i++)
625
                {
626
                    KeyValuePair<int, string> wrkPair = (KeyValuePair<int, string>)cmbConstructionPerson.Items[i];
627
                    if (wrkPair.Key == CommonMotions.LoginUserData.PersonCode)
622 628
                    {
623
                        // ?????E?S????R???{?\??
624
                        DispAllCombBoxControl(true);
629
                        cmbConstructionPerson.SelectedValue = CommonMotions.LoginUserData.PersonCode;
625 630
                    }
626 631
                }
627 632
            }
......
773 778
                            cmbDepartment.SelectedValue = CommonMotions.LoginUserData.DepartmentCode;
774 779
                    }
775 780
                }
776
                else
777
                {
778
                    // ?????R???{?{?b?N?X?f?[?^??????Z?b?g????
779
                    for (int i = 0; i < cmbDepartment.Items.Count; i++)
780
                    {
781
                        KeyValuePair<int, string> wrkPair = (KeyValuePair<int, string>)cmbDepartment.Items[i];
782
                        if (wrkPair.Key == CommonMotions.LoginUserData.DepartmentCode)
783
                        {
784
                            cmbDepartment.SelectedValue = CommonMotions.LoginUserData.DepartmentCode;
785
                        }
786
                    }
787
                }
788 781

  
789 782
                return true;
790 783
            }
......
850 843
                        cmbConstructionPerson.SelectedValue = CommonMotions.LoginUserData.PersonCode;
851 844
                    }
852 845
                }
853
                else
854
                {
855
                    for (int i = 0; i < cmbConstructionPerson.Items.Count; i++)
856
                    {
857
                        KeyValuePair<int, string> wrkPair = (KeyValuePair<int, string>)cmbConstructionPerson.Items[i];
858
                        if (wrkPair.Key == CommonMotions.LoginUserData.PersonCode)
859
                        {
860
                            cmbConstructionPerson.SelectedValue = CommonMotions.LoginUserData.PersonCode;
861
                        }
862
                    }
863
                }
864 846

  
865 847
                return true;
866 848
            }
trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/DRConstruction/FrmDRConstruction.cs
249 249
            Next,
250 250
        }
251 251
        #endregion
252

  
253
        #region ????{?^????`
254
        /// <summary>
255
        /// ????{?^????`
256
        /// </summary>
257
        private static string[] s_PrintButtonTop = new string[] { "??????", "??????~" };
258
        private static Color[] s_PrintButtonColor = new Color[] { Color.DarkOliveGreen, Color.Red };
252 259
        #endregion
253 260

  
261
        #endregion
262

  
254 263
        #region ???
255 264
        /// <summary>
256 265
        /// ?t?B?[???h?l????t???O
......
667 676
                        double Total = GetTotalHeadCount(false,
668 677
                                                        CommonMotions.cnvInt(dgvRow.Cells[(int)DispGridColumn1.JobCategoryCode].Value),
669 678
                                                        CommonMotions.cnvInt(dgvRow.Cells[(int)DispGridColumn1.CompanyCode].Value));
670
                        dgvRow.Cells[(int)DispGridColumn1.TodayHeadCount].Value = ToDay.ToString("#,0.0");
671
                        dgvRow.Cells[(int)DispGridColumn1.TotalHeadCount].Value = (ToDay + Total).ToString("#,0.0");
679
                        dgvRow.Cells[(int)DispGridColumn1.TodayHeadCount].Value = ToDay.ToString("#,#.#");
680
                        dgvRow.Cells[(int)DispGridColumn1.TotalHeadCount].Value = (ToDay + Total).ToString("#,#.#");
672 681
                        break;
673 682
                    default:
674 683
                        return;
......
1300 1309
            }
1301 1310
        }
1302 1311
        #endregion
1312

  
1313
        #region ???????{?^??????
1314
        /// <summary>
1315
        /// ???????{?^??????
1316
        /// </summary>
1317
        /// <param name="sender"></param>
1318
        /// <param name="e"></param>
1319
        private void btnPrint_Click(object sender, EventArgs e)
1320
        {
1321
            // ???????
1322
            PrintOutDR();
1323
        }
1324
        #endregion
1303 1325
    }
1304 1326
}
trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/DRConstruction/FrmDRConstruction.designer.cs
160 160
            this.btnOtherProc = new System.Windows.Forms.Button();
161 161
            this.panel2 = new System.Windows.Forms.Panel();
162 162
            this.btnWorkingList = new System.Windows.Forms.Button();
163
            this.btnPrint = new System.Windows.Forms.Button();
164
            this.PrintProgress = new System.Windows.Forms.ProgressBar();
163 165
            this.panel1.SuspendLayout();
164 166
            this.pnlApproval.SuspendLayout();
165 167
            this.pnlApprovalButton.SuspendLayout();
......
1424 1426
            this.lblCellTotal.BackColor = System.Drawing.Color.WhiteSmoke;
1425 1427
            this.lblCellTotal.Font = new System.Drawing.Font("MS 明朝", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
1426 1428
            this.lblCellTotal.ForeColor = System.Drawing.Color.Black;
1427
            this.lblCellTotal.Location = new System.Drawing.Point(100, 27188);
1429
            this.lblCellTotal.Location = new System.Drawing.Point(100, 29760);
1428 1430
            this.lblCellTotal.Name = "lblCellTotal";
1429 1431
            this.lblCellTotal.Size = new System.Drawing.Size(0, 13);
1430 1432
            this.lblCellTotal.TabIndex = 36;
......
1643 1645
            this.btnWorkingList.UseVisualStyleBackColor = false;
1644 1646
            this.btnWorkingList.Click += new System.EventHandler(this.btnWorkingList_Click);
1645 1647
            // 
1648
            // btnPrint
1649
            // 
1650
            this.btnPrint.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
1651
            this.btnPrint.BackColor = System.Drawing.Color.DarkOliveGreen;
1652
            this.btnPrint.ForeColor = System.Drawing.Color.White;
1653
            this.btnPrint.Location = new System.Drawing.Point(7, 5);
1654
            this.btnPrint.Name = "btnPrint";
1655
            this.btnPrint.Size = new System.Drawing.Size(200, 30);
1656
            this.btnPrint.TabIndex = 98;
1657
            this.btnPrint.TabStop = false;
1658
            this.btnPrint.Text = "日報印刷";
1659
            this.btnPrint.UseVisualStyleBackColor = false;
1660
            this.btnPrint.Visible = false;
1661
            this.btnPrint.Click += new System.EventHandler(this.btnPrint_Click);
1662
            // 
1663
            // PrintProgress
1664
            // 
1665
            this.PrintProgress.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) 
1666
            | System.Windows.Forms.AnchorStyles.Right)));
1667
            this.PrintProgress.Location = new System.Drawing.Point(33, 618);
1668
            this.PrintProgress.Name = "PrintProgress";
1669
            this.PrintProgress.Size = new System.Drawing.Size(1278, 36);
1670
            this.PrintProgress.TabIndex = 99;
1671
            this.PrintProgress.Visible = false;
1672
            // 
1646 1673
            // FrmDRConstruction
1647 1674
            // 
1648 1675
            this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
1649 1676
            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
1650 1677
            this.BackColor = System.Drawing.Color.Black;
1651 1678
            this.ClientSize = new System.Drawing.Size(1344, 692);
1679
            this.Controls.Add(this.PrintProgress);
1680
            this.Controls.Add(this.btnPrint);
1652 1681
            this.Controls.Add(this.panel2);
1653 1682
            this.Controls.Add(this.btnOtherProc);
1654 1683
            this.Controls.Add(this.btnProv);
......
1798 1827
        private System.Windows.Forms.DataGridViewTextBoxColumn Column8;
1799 1828
        private System.Windows.Forms.Panel panel2;
1800 1829
        private System.Windows.Forms.Button btnWorkingList;
1830
        private System.Windows.Forms.Button btnPrint;
1831
        private System.Windows.Forms.ProgressBar PrintProgress;
1801 1832
    }
1802 1833
}
trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/DRConstruction/FrmDRConstructionAuxiliary.cs
885 885
                    dgv.Rows.Add(s_MinRowCountGrid[(int)DataGridDefine.Detail]);
886 886
                    // 合計表示
887 887
                    lblGrid1Total1.Text = "0.0";
888
                    lblGrid1Total2.Text = GetTotalHeadCount().ToString("#,0.0");
888
                    lblGrid1Total2.Text = GetTotalHeadCount().ToString("0,0.0");
889 889
                    lblGrid1Total3.Text = "0.0";
890 890
                    return;
891 891
                }
......
1545 1545
                    }
1546 1546
                }
1547 1547

  
1548
                // 本日以降の工数更新処理
1549
                RecalcTotalHeadCount(); 
1550

  
1551 1548
                return true;
1552 1549
            }
1553 1550
            catch (System.Exception ex)
......
3002 2999
        }
3003 3000
        #endregion
3004 3001

  
3005
        /// <summary>
3006
        /// 本日以降の工数更新処理
3007
        /// </summary>
3008
        /// <returns></returns>
3009
        private bool RecalcTotalHeadCount()
3010
        {
3011
            IODailyDataDetail DetailDB = new IODailyDataDetail();
3012
            try
3013
            {
3014
                string strSQL = string.Empty;
3015
                int JobCode = 0;
3016
                int CompanyCode = 0;
3017
                double StToDayCount = 0;
3018
                double StTotalCount = 0;
3019

  
3020
                DetailDB.connect(); DetailDB.beginTran();
3021
                
3022
                DataGridView dgv = dgvAllDisplay;
3023
                foreach (DataGridViewRow CurRow in dgv.Rows)
3024
                {
3025
                    JobCode = CommonMotions.cnvInt(CurRow.Cells[(int)DispGridColumn1.JobCategoryCode]);
3026
                    CompanyCode = CommonMotions.cnvInt(CurRow.Cells[(int)DispGridColumn1.CompanyCode]);
3027
                    StToDayCount = CommonMotions.cnvDouble(CurRow.Cells[(int)DispGridColumn1.TodayHeadCount]);
3028
                    StTotalCount = CommonMotions.cnvDouble(CurRow.Cells[(int)DispGridColumn1.TotalHeadCount]);
3029

  
3030
                    strSQL = string.Format(" WHERE PersonCode = {0}", m_PersonCode);
3031
                    strSQL += string.Format(" AND ConstructionCode = {0}", m_ConstructionCode);
3032
                    if (JobCode != 0) strSQL += string.Format(" AND JobCategoryCode = {0}", JobCode);
3033
                    if (CompanyCode != 0) strSQL += string.Format(" AND CompanyCode = {0}", CompanyCode);
3034
                    strSQL += string.Format(" AND TRUNC(DailyDataDate) > TO_DATE('{0}')", GetTargetToday().ToShortDateString());
3035
                    strSQL += " ORDER BY DailyDataDate";
3036

  
3037
                    List<DailyDataDetail> DetailList = new List<DailyDataDetail>();
3038
                    if (!DetailDB.SelectAction(strSQL, ref DetailList, false)) continue;
3039

  
3040
                    foreach (DailyDataDetail CurRec in DetailList)
3041
                    {
3042
                        StTotalCount += CurRec.TodayHeadCount;
3043
                        if (!DetailDB.UpdateFeild(m_PersonCode,
3044
                                                CurRec.DailyDataDate,
3045
                                                m_ConstructionCode,
3046
                                                CurRec.SeqNo,
3047
                                                (int)IODailyDataDetail.DataColumn.TotalHeadCount,
3048
                                                StTotalCount,
3049
                                                false))
3050
                        {
3051
                            DetailDB.rollback();
3052
                            break;
3053
                        }
3054
                    }
3055
                }
3056
                DetailDB.commit();
3057

  
3058
                return true;
3059
            }
3060
            catch (Exception ex)
3061
            {
3062
                logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message);
3063
                return true;
3064
            }
3065
            finally
3066
            {
3067
                DetailDB.close(); DetailDB = null;
3068
            }
3069
        }
3070

  
3071 3002
        #region 選択された日付を取得する
3072 3003
        /// <summary>
3073 3004
        /// 選択された日付を取得する
......
3089 3020
        }
3090 3021
        #endregion
3091 3022

  
3092
        #region 該当日報データ明細の累計人員数を更新日より後を更新する
3023
        #region 該当日報データ明細の累計人員数を更新日より以降更新する
3093 3024
        /// <summary>
3094
        /// 
3025
        /// 該当日報データ明細の累計人員数を更新日より以降更新する
3095 3026
        /// </summary>
3096 3027
        /// <param name="JobCode"></param>
3097 3028
        /// <param name="CompanyCode"></param>
......
3196 3127
            }
3197 3128
        }
3198 3129
        #endregion
3130

  
3131
        // -------------------- 印刷処理
3132
        #region 印刷時ボタン制御
3133
        /// <summary>
3134
        /// 印刷時ボタン制御
3135
        /// </summary>
3136
        /// <param name="bprint"></param>
3137
        private void PrintButtonVisbleControl(bool bprint)
3138
        {
3139
            btnWorkingList.Visible = !bprint;
3140
            
3141
            panel1.Enabled = !bprint;
3142
            pnlBase.Enabled = !bprint;
3143

  
3144
            btnOtherProc.Visible = !bprint;
3145
            btnProv.Visible = !bprint;
3146
            btnNext.Visible = !bprint;
3147

  
3148
            btnLineAdd.Visible = !bprint;
3149
            btnLineDel.Visible = !bprint;
3150

  
3151
            btnDataEntry.Visible = !bprint;
3152
            btnDataDelete.Visible = !bprint;
3153
            btnEnd.Visible = !bprint;
3154

  
3155
            if (bprint)
3156
            {
3157
                btnPrint.Text = s_PrintButtonTop[0];
3158
                btnPrint.BackColor = s_PrintButtonColor[0];
3159
            }
3160
            else
3161
            {
3162
                btnPrint.Text = s_PrintButtonTop[1];
3163
                btnPrint.BackColor = s_PrintButtonColor[0];
3164
            }
3165

  
3166
        }
3167
        #endregion
3168

  
3169
        #region 印刷処理
3170
        /// <summary>
3171
        /// 印刷処理
3172
        /// </summary>
3173
        private void PrintOutDR()
3174
        {
3175
            FrmSaveFilePath frm = new FrmSaveFilePath();
3176
            FrmPrintConfirmation frmPrint = new FrmPrintConfirmation();
3177
            try
3178
            {
3179
                // 工事番号のセット
3180
                frmPrint.ConstructionCode = m_ConstructionCode;
3181
                // 処理番号セット
3182
                frmPrint.ExecuteProcNo = (int)ClsExcute.ProcessExecuteNo.DRConstruction;
3183

  
3184
                // ウィンドウ表示
3185
                frmPrint.ShowDialog();
3186

  
3187
                // 終了状態
3188
                m_PrintresRet = frmPrint.EndButton;
3189

  
3190
                // 日付印刷フラグ
3191
                m_PrintDate = frmPrint.DatePrintFlg;
3192

  
3193
                // キャンセルは処理しない
3194
                if (m_PrintresRet == DialogResult.Cancel) return;
3195

  
3196
                bool bSimplePrint = true;
3197
                if (!btnPrint.Text.Equals(s_PrintButtonTop[1])) bSimplePrint = false;
3198

  
3199
                // EXCEL保存時選択
3200
                if (m_PrintresRet == DialogResult.No)
3201
                {
3202
                    // 保存先を選択する
3203
                    if (bSimplePrint) frm.SaveType = (int)CommonDefine.SaveFileType.ExcelFile;
3204
                    else frm.SaveType = (int)CommonDefine.SaveFileType.WordFile;
3205

  
3206
                    //frm.ShowInTaskbar = false;
3207

  
3208
                    frm.ShowDialog();
3209
                    if (frm.EndButton == DialogResult.Cancel) return;
3210
                    m_SelectSaveExcel = frm.SelectPath;
3211
                    m_SelectSaveWord = frm.SelectPath;
3212
                }
3213

  
3214

  
3215
                // 印刷プロセス数取得
3216
                m_ProcessCount = GetProcessCount() + 2;       // 枚数+EXCELオブジェクト取得(2)
3217
                PrintProgress.Visible = true;
3218
                PrintProgress.Minimum = 0;
3219
                PrintProgress.Maximum = m_ProcessCount;
3220
                PrintProgress.Value = 0;
3221

  
3222
                m_Canceled = false;
3223
                // ボタンの変更
3224
                PrintButtonVisbleControl(true);
3225

  
3226
                //印刷を別スレッドで実行する
3227
                m_ProgressCount = 0;
3228
                workerThread = new System.Threading.Thread(new System.Threading.ThreadStart(PrintMain));
3229
                workerThread.IsBackground = true;
3230
                workerThread.Start();
3231

  
3232
            }
3233
            catch (Exception ex)
3234
            {
3235
                logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message);
3236
            }
3237
            finally
3238
            {
3239
                frm.Close(); frm = null;
3240
                frmPrint.Close(); frmPrint = null;
3241
            }
3242
        }
3243
        #endregion
3244

  
... 差分の行数が表示可能な上限を超えました。超過分は表示しません。

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