プロジェクト

全般

プロフィール

リビジョン 422

堀内6年以上前に追加

オリジナル機能の制限修正(16期以前~)
工事情報:製品版不要ラジオボタン消去
部署・担当者コンボボックス検索SQL今日以前は対応外に変更

差分を表示:

trunk/src/ProcessManagement/ProcessManagement/Common/CommonMotions.cs
3719 3719

  
3720 3720
                    strSQL.AppendFormat(" And DATE(A.StartDate) <= DATE('{0}')", dtDefaultEnd.ToShortDateString());
3721 3721
                    if (!bInput) strSQL.Append(" And C.ConstrDepCode = A.DepartmentCode");
3722
                    // 開始日が今日より小さい
3723
                    strSQL.AppendFormat(" And DATE(A.StartDate) <= DATE('{0}')", DateTime.Today.ToShortDateString());
3722 3724

  
3723 3725
                    // システム管理者以外は部署参照マスタよりデータ取得
3724 3726
                    if (CommonMotions.LoginUserData.PersonCode != CommonDefine.AdminCode)
......
3776 3778
                strSQL.AppendFormat(" AND(DATE('{0}') <= DATE(B.CompDate)", dtDefaultStart.ToShortDateString());
3777 3779
                strSQL.AppendFormat(" OR DATE('{0}') = DATE(B.CompDate)))", DateTime.MinValue.ToShortDateString());
3778 3780

  
3781
                // 開始日が今日より小さい
3782
                strSQL.AppendFormat(" And DATE(A.StartDate) <= DATE('{0}')", DateTime.Today.ToShortDateString());
3783

  
3779 3784
                if (nDepCode > 0) strSQL.AppendFormat(" AND (B.DEPARTMENTCODE = {0})", nDepCode);
3780 3785

  
3781 3786
                // 今期のデータかどうかを判定する
trunk/src/ProcessManagement/ProcessManagement/DataModel/RequestDataDetail.cs
11 11
    /// </summary>
12 12
    public class RequestDataDetail
13 13
    {
14
        #region 定数
15
        /// <summary>
16
        /// 工事区分定義
17
        /// </summary>
18
        public enum ConstructionKindDef
19
        {
20
            /// <summary>
21
            /// 0:本工事
22
            /// </summary>
23
            Original = 0,
24
            /// <summary>
25
            /// 1:追加工事(増減工事)
26
            /// </summary>
27
            Additional,
28
        }
29
        #endregion
30

  
14 31
        #region メンバ変数
15 32
        private int         m_RequestNo = 0;                    // 請求No
16 33
        private int         m_MainConstructionCode = 0;         // 本工事番号
trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstructionBaseInfo/FrmConstructionBaseInfoAuxiliary.cs
5335 5335
            rdbStatus13.Text = CommonDefine.ProjectsStatus[(int)CommonDefine.StatNumArray.Status13];    // ?S????????m?F????
5336 5336
            rdbStatus16.Text = CommonDefine.ProjectsStatus[(int)CommonDefine.StatNumArray.Status16];    // ????C?H??
5337 5337
            rdbStatus17.Text = CommonDefine.ProjectsStatus[(int)CommonDefine.StatNumArray.Status17];    // Hit'sV?H??
5338

  
5339
            switch (ProductDefine.ProductType)
5340
            {
5341
                case (int)ProductDefine.ProductTypeDef.Originals:
5342
                    // ----- ?I???W?i????
5343
                    break;
5344
                case (int)ProductDefine.ProductTypeDef.MassProductionType1:
5345
                    // ----- ???i??
5346
                    // ??\??
5347
                    rdbStatus8.Visible = false;         // ????C?H??
5348
                    rdbStatus12.Visible = false;        // ?????????m?F
5349
                    rdbStatus13.Visible = false;        // ?S????????m?F????
5350
                    rdbStatus16.Visible = false;        // ????C?H??
5351
                    rdbStatus17.Visible = false;        // Hit'sV?H??
5352

  
5353
                    // ??u????
5354
                    // ?{?H?J?n
5355
                    SetProductRadioButton(rdbStatus0, rdbStatus1);      // ?????o
5356
                    SetProductRadioButton(rdbStatus1, rdbStatus11);     // ?? ?? ??
5357
                    SetProductRadioButton(rdbStatus11, rdbStatus2);     // ??@?@??
5358
                    SetProductRadioButton(rdbStatus2, rdbStatus3);      // ?? ?? ??
5359
                    SetProductRadioButton(rdbStatus3, rdbStatus4);      // ???????p
5360
                    SetProductRadioButton(rdbStatus4, rdbStatus5);      // ?{?H????
5361
                    SetProductRadioButton(rdbStatus5, rdbStatus6);      // ?{?H?J?n
5362
                    SetProductRadioButton(rdbStatus6, rdbStatus7);      // ?{?H????
5363
                    SetProductRadioButton(rdbStatus4, rdbStatus9);      // ????????
5364
                    SetProductRadioButton(rdbStatus6, rdbStatus10);     // ?????m?F
5365
                    break;
5366
                default:
5367
                    break;
5368
            }
5338 5369
        }
5339 5370
        #endregion
5340 5371

  
5372
        #region ???i????W?I?{?^???Z?b?g????
5373
        /// <summary>
5374
        /// ???i????W?I?{?^???Z?b?g????
5375
        /// </summary>
5376
        private void SetProductRadioButton(RadioButton radio1, RadioButton radio2)
5377
        {
5378
            try
5379
            {
5380
                Point wrkPO = radio2.Location;
5381
                wrkPO.X = radio1.Location.X + 120;
5382
                radio2.Location = wrkPO;
5383
            }
5384
            catch (Exception ex)
5385
            {
5386
                logger.ErrorFormat("?V?X?e???G???[?F{0}?F{1}", CommonMotions.GetMethodName(), ex.Message);
5387
            }
5388
        }
5389
        #endregion
5390

  
5341 5391
        #region ?i??????
5342 5392
        /// <summary>
5343 5393
        /// ?i?????`?F?b?N?{?b?N?X?????????
trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstructionBudget/FrmConstructionBudget.cs
740 740
                    return;
741 741
                }
742 742

  
743
                // ?????????o?????????
744
                if (!GetExpensesList())
743
                // ?I???W?i????16?????O???o????
744
                if (ProductDefine.ProductType == (int)ProductDefine.ProductTypeDef.Originals
745
                        && m_ConstructionBaseInfo.ConstructionPeriod < 16)
745 746
                {
746
                    MessageBox.Show("?o??????????????????", "?G???[?\??", MessageBoxButtons.OK, MessageBoxIcon.Error);
747
                    this.Close();
748
                    return;
747
                    m_ExpensesList.Add(new object[] { CommonDefine.BeforeExpenses[0].Key, CommonDefine.BeforeExpenses[0].Value });
748
                    m_ExpensesList.Add(new object[] { CommonDefine.BeforeExpenses[1].Key, CommonDefine.BeforeExpenses[1].Value });
749
                    m_ExpensesList.Add(new object[] { CommonDefine.BeforeExpenses[2].Key, CommonDefine.BeforeExpenses[2].Value });
749 750
                }
751
                else
752
                {
753
                    // ???i??????
754
                    // ?????????o?????????
755
                    if (!GetExpensesList())
756
                    {
757
                        MessageBox.Show("?o??????????????????", "?G???[?\??", MessageBoxButtons.OK, MessageBoxIcon.Error);
758
                        this.Close();
759
                        return;
760
                    }
761
                }
750 762

  
751 763
                // ???????
752 764
                InitSettingLoad();
trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstructionBudget/FrmConstructionBudgetAuxiliary.cs
1533 1533
                // 粗利益行作成
1534 1534
                CreateGrossProfit(true);
1535 1535

  
1536
                // 指導員給与
1537
                CreateInstructorCosts(true);
1536
                // オリジナルの16期より前は人件費金額を表示しない
1537
                if (ProductDefine.ProductType == (int)ProductDefine.ProductTypeDef.Originals
1538
                    && m_ConstructionBaseInfo.ConstructionPeriod < 16)
1539
                {
1538 1540

  
1539
                // 副担当者給与経費
1540
                CreateAssistantCosts(true);
1541
                }
1542
                else
1543
                {
1544
                    // 製品版その他は人件費金額を表示する
1545
                    // 指導員給与
1546
                    CreateInstructorCosts(true);
1541 1547

  
1542
                // 担当者給与経費
1543
                CreatePayrollCosts(true);
1548
                    // 副担当者給与経費
1549
                    CreateAssistantCosts(true);
1544 1550

  
1551
                    // 担当者給与経費
1552
                    CreatePayrollCosts(true);
1553
                }
1554

  
1545 1555
                // 粗利益行計算
1546 1556
                CreateGrossProfit(false);
1547 1557

  
......
3081 3091
        {
3082 3092

  
3083 3093
            DataGridViewEX dgv = dgvAllDisplay;
3094
            // 16期以降は表示する
3095
            if (ProductDefine.ProductType == (int)ProductDefine.ProductTypeDef.Originals 
3096
                && m_ConstructionBaseInfo.ConstructionPeriod < 16) return;
3084 3097

  
3085 3098
            int AssistantLine = m_CostsRowCount[(int)CostsRowLine.AssistantRowLine];
3086 3099
            if (AssistantLine == 0) return;
......
3236 3249
        {
3237 3250

  
3238 3251
            DataGridViewEX dgv = dgvAllDisplay;
3252
            // 16期以降はは表示する
3253
            if (ProductDefine.ProductType == (int)ProductDefine.ProductTypeDef.Originals
3254
                && m_ConstructionBaseInfo.ConstructionPeriod < 16) return;
3239 3255

  
3240 3256
            int InstructorLine = m_CostsRowCount[(int)CostsRowLine.InstructorRowLine];
3241 3257
            if (InstructorLine == 0) return;
......
3458 3474
                    }
3459 3475
                }
3460 3476

  
3477
                // 16期以降は給与を表示する
3478
                if (ProductDefine.ProductType == (int)ProductDefine.ProductTypeDef.Originals 
3479
                    && m_ConstructionBaseInfo.ConstructionPeriod < 16) return;
3480

  
3461 3481
                // 受注金額
3462 3482
                //double OrdersPrice = CommonMotions.cnvDouble(m_DspLabelCtrl[(int)DspLblCtrlName.OrdersPrice].Text);
3463 3483
                // 工期取得
......
3567 3587
        private void GetCreatorLineValue(ref int CreatorHope, ref int CreatorExec)
3568 3588
        {
3569 3589
            DataGridViewEX dgv = dgvAllDisplay;
3590
            // 16期以降のみ処理する
3591
            if (ProductDefine.ProductType == (int)ProductDefine.ProductTypeDef.Originals 
3592
                && m_ConstructionBaseInfo.ConstructionPeriod < 16) return;
3570 3593

  
3571 3594
            int CreatorLine = m_CostsRowCount[(int)CostsRowLine.ConstructorRowLine];
3572 3595
            if (CreatorLine == 0) return;
......
3586 3609
            {
3587 3610
                DataGridViewEX dgv = dgvAllDisplay;
3588 3611

  
3612
                // 16期以降は給与を表示する
3613
                if (ProductDefine.ProductType == (int)ProductDefine.ProductTypeDef.Originals 
3614
                    && m_ConstructionBaseInfo.ConstructionPeriod < 16) return;
3615

  
3589 3616
                // 受注金額取得
3590 3617
                int OrdersPrice = CommonMotions.cnvInt(m_DspLabelCtrl[(int)DspLblCtrlName.OrdersPrice].Text.Replace("\\", ""));
3591 3618

  
......
3666 3693
        {
3667 3694
            try
3668 3695
            {
3696
                // 16期以降は給与を表示する
3697
                if (ProductDefine.ProductType == (int)ProductDefine.ProductTypeDef.Originals 
3698
                    && m_ConstructionBaseInfo.ConstructionPeriod < 16) return;
3699

  
3669 3700
                // 行位置取得
3670 3701
                DataGridViewEX dgv = dgvAllDisplay;
3671 3702
                int LineCnt = m_CostsRowCount[RowArrayCount];
trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstructionBudget/ProcessControl.cs
978 978
                    if (DataChange)
979 979
                    {
980 980
                        GetBaseInfoData();
981
                        GetExpensesList();
981
                        // オリジナルは16期より前はは経費固定
982
                        if (ProductDefine.ProductType == (int)ProductDefine.ProductTypeDef.Originals
983
                                && m_ConstructionBaseInfo.ConstructionPeriod < 16)
984
                        {
985
                        }
986
                        else
987
                        {
988
                            GetExpensesList();
989
                        }
982 990
                        InitDataLoad();
983 991
                    }
984 992
                }
trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstructionLedger/FrmConstructionLedger.cs
1038 1038
                    return;
1039 1039
                }
1040 1040

  
1041
                // ?????????o?????????
1042
                if (!GetExpensesList())
1041
                // 16????O????o??
1042
                if (ProductDefine.ProductType == (int)ProductDefine.ProductTypeDef.Originals
1043
                    && m_ConstructionBaseInfo.ConstructionPeriod < 16)
1044
                {   // ???o??????????
1045
                    m_ExpensesList.Add(new object[] { CommonDefine.BeforeExpenses[0].Key, CommonDefine.BeforeExpenses[0].Value });
1046
                    m_ExpensesList.Add(new object[] { CommonDefine.BeforeExpenses[1].Key, CommonDefine.BeforeExpenses[1].Value });
1047
                    m_ExpensesList.Add(new object[] { CommonDefine.BeforeExpenses[2].Key, CommonDefine.BeforeExpenses[2].Value });
1048
                }
1049
                else
1043 1050
                {
1044
                    MessageBox.Show("?o??????????????????", "?G???[?\??", MessageBoxButtons.OK, MessageBoxIcon.Error);
1045
                    this.Close();
1046
                    return;
1051
                    // 16????~??????????o???????
1052
                    // ?????????o?????????
1053
                    if (!GetExpensesList())
1054
                    {
1055
                        MessageBox.Show("?o??????????????????", "?G???[?\??", MessageBoxButtons.OK, MessageBoxIcon.Error);
1056
                        this.Close();
1057
                        return;
1058
                    }
1047 1059
                }
1048 1060

  
1049 1061
                // ???????
trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstructionLedger/FrmConstructionLedgerAuxiliary.cs
1570 1570
                // 空白行
1571 1571
                AddEmptyRow();
1572 1572

  
1573
                // 工事予算書より人件費ブロックを取り込む
1574
                DispDataFromConstructionBudget4(DetailList);
1573
                // 16期以降は給与を表示する
1574
                if (ProductDefine.ProductType == (int)ProductDefine.ProductTypeDef.Originals
1575
                    && m_ConstructionBaseInfo.ConstructionPeriod < 16)
1576
                {
1575 1577

  
1578
                }
1579
                else
1580
                {
1581
                    // 工事予算書より人件費ブロックを取り込む
1582
                    DispDataFromConstructionBudget4(DetailList);
1583
                }
1584

  
1576 1585
                // 空白行
1577 1586
                AddEmptyRow();
1578 1587

  
......
3850 3859

  
3851 3860
                        case (int)DataGroup.Assistant:               // 副担当
3852 3861
                        case (int)DataGroup.Payroll:                 // 工事担当
3862
                            // 一般ユーザーは行ロック
3863
                            if (ProductDefine.ProductType == (int)ProductDefine.ProductTypeDef.Originals
3864
                                && m_ConstructionBaseInfo.ConstructionPeriod < 16)
3865
                            {
3866
                                CurRow.Visible = false;
3867
                            }
3853 3868
                            if (!CheckLeaderOrUser()) CurRow.ReadOnly = true;
3854 3869
                            // ヘッダーチェックボックス表示
3855 3870
                            SalaryRadioButtonCheck(DetailRec);
3856 3871
                            break;
3857 3872
                        case (int)DataGroup.Instructor:              // 指導員
3858 3873
                        case (int)DataGroup.NetIncome:               // 純利益
3874
                            // 16期より前は指導員金額・担当者給与・純利益を表示しない
3875
                            if (ProductDefine.ProductType == (int)ProductDefine.ProductTypeDef.Originals
3876
                                && m_ConstructionBaseInfo.ConstructionPeriod < 16)
3877
                            {
3878
                                CurRow.Visible = false;
3879
                            }
3859 3880
                            // 一般ユーザーは行ロック
3860 3881
                            if (!CheckLeaderOrUser()) CurRow.ReadOnly = true;
3861 3882
                            break;
trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstructionLedger/ProcessControl.cs
978 978
                    if (DataChange)
979 979
                    {
980 980
                        GetBaseInfoData();
981
                        GetExpensesList();
981
                        if (ProductDefine.ProductType == (int)ProductDefine.ProductTypeDef.Originals
982
                            && m_ConstructionBaseInfo.ConstructionPeriod < 16)
983
                        {
984

  
985
                        }
986
                        else
987
                        {
988
                            GetExpensesList();
989
                        }
982 990
                        InitDataLoad();
983 991
                    }
984 992
                }
trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/Request/RequestInput/FrmRequestInputAuxiliary.cs
1253 1253
                m_nRequestNo = m_lstRequestHead[m_lstRequestHead.Count - 1].RequestNo;
1254 1254
                m_nMaxOrderNo = m_lstRequestHead[m_lstRequestHead.Count - 1].OrderNo;
1255 1255

  
1256
                // 請求データリストの構築(DB取得用)
1257
                List<RequestData> lstData = new List<RequestData>();
1256 1258
                // 請求ヘッダレコード分ループ
1257 1259
                foreach (RequestHead ReqHead in m_lstRequestHead)
1258 1260
                {
......
1260 1262
                    if (ReqHead.OrderNo == m_nMaxOrderNo) break;
1261 1263

  
1262 1264
                    // 請求データリストの構築(DB取得用)
1263
                    List<RequestData> lstData = new List<RequestData>();
1265
                    lstData.Clear();
1264 1266

  
1265 1267
                    // 請求データの取得(検索キーは請求Noのみ)
1266 1268
                    strSQL.Clear();
......
1431 1433
                        ReqDetailMain.RequestNo = nRequestNo;
1432 1434
                        ReqDetailMain.MainConstructionCode = nMainConstructonCode;
1433 1435
                        ReqDetailMain.ConstructionCode = nMainConstructonCode;
1434
                        ReqDetailMain.ConstructionKind = 0;
1436
                        ReqDetailMain.ConstructionKind = (int)RequestDataDetail.ConstructionKindDef.Original;
1435 1437
                    }
1436 1438
                    lstDetail.Add(ReqDetailMain);
1437 1439

  
......
1445 1447
                            ReqDetailSub.RequestNo = nRequestNo;
1446 1448
                            ReqDetailSub.MainConstructionCode = nMainConstructonCode;
1447 1449
                            ReqDetailSub.ConstructionCode = nConstructionCode;
1448
                            ReqDetailSub.ConstructionKind = 1;
1450
                            ReqDetailSub.ConstructionKind = (int)RequestDataDetail.ConstructionKindDef.Additional;
1449 1451
                        }
1450 1452

  
1451 1453
                        info = new ConstructionBaseInfo();
......
1689 1691
                    data = new RequestDataDetail();
1690 1692

  
1691 1693
                    // 請求Noは登録時に裁判
1692
                    data.MainConstructionCode = nMainConstructionCode;          // 本工事番号
1693
                    data.ConstructionCode = nMainConstructionCode;              // 工事番号
1694
                    data.ConstructionKind = 0;                                  // 工事区分(=本工事)
1694
                    data.MainConstructionCode = nMainConstructionCode;                              // 本工事番号
1695
                    data.ConstructionCode = nMainConstructionCode;                                  // 工事番号
1696
                    data.ConstructionKind = (int)RequestDataDetail.ConstructionKindDef.Original;    // 工事区分(=本工事)
1695 1697

  
1696 1698
                    lstDetail.Add(data);
1697 1699

  
......
1707 1709
                        data = new RequestDataDetail();
1708 1710

  
1709 1711
                        // 請求Noは登録時に裁判
1710
                        data.MainConstructionCode = nMainConstructionCode;          // 本工事番号
1711
                        data.ConstructionCode = nConstructionCode;                  // 工事番号
1712
                        data.ConstructionKind = 1;                                  // 工事区分(=増減工事)
1712
                        data.MainConstructionCode = nMainConstructionCode;                              // 本工事番号
1713
                        data.ConstructionCode = nConstructionCode;                                      // 工事番号
1714
                        data.ConstructionKind = (int)RequestDataDetail.ConstructionKindDef.Additional;  // 工事区分(=増減工事)
1713 1715

  
1714 1716
                        Dictionary<int, string> dicString = new Dictionary<int, string>();
1715 1717
                        GetConstructionBaseInfoDetail(nConstructionCode, ref dicString);
......
1967 1969
                        }
1968 1970

  
1969 1971
                        // 本工事の場合
1970
                        if (ReqDetail.ConstructionKind == 0)
1972
                        if (ReqDetail.ConstructionKind == (int)RequestDataDetail.ConstructionKindDef.Original)
1971 1973
                        {
1972 1974
                            // 工事件名は、請求データから(編集可)
1973 1975
                            dgv1[(int)ColumnName.ConstructionName, trow].Value = ReqData.ConstructionName;

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