プロジェクト

全般

プロフィール

リビジョン 348

堀内6年以上前に追加

工事情報入力:期数変更時部署が抜けるバグ修正

差分を表示:

branches/src/ProcessManagement/ProcessManagement/Common/CommonVersion.cs
14 14
        /// <summary>
15 15
        /// 本体バージョン
16 16
        /// </summary>
17
        public static int s_SystemVersion = 198;
17
        public static int s_SystemVersion = 199;
18 18

  
19 19
        /// <summary>
20 20
        /// コピー・環境バージョン
branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstructionBaseInfo/FrmConstructionBaseInfo.cs
1401 1401

  
1402 1402
                // ?R???{?{?b?N?X?Z?b?g
1403 1403
                SetDepartmentCombbox();                     // ????
1404
                SetInitcmbPersonInCharge();                 // ?S????
1405
                SetConstructionPersonCombbox();             // ?H???S????i???p????????????j
1404
                SetcmbPersonInCharge();                 // ?S????
1405
                SetConstrManCombbox();             // ?H???S????i???p????????????j
1406 1406
                SetcmbConstructionYear();                   // ?H???N?x
1407 1407
                SetcmbConstructionPeriod();                 // ?c???
1408 1408
                SetcmbDivisionCombBox();                    // ???????
......
1412 1412
                // ?????\??
1413 1413
                InitDataLoad();
1414 1414

  
1415
                // ??????N?x???Z?b?g
1416
                SetDepartmentCombbox(false);
1417

  
1418 1415
                // ???b?N????
1419 1416
                LockTheFieldOnTheRadioButton();
1420 1417

  
......
1447 1444
                CreateProcessContextMenu(m_SubForm);
1448 1445
                // *-----* ????????{?^????? *-----*
1449 1446

  
1447
                // ?R???{?{?b?N?X?C?x???g?Z?b?g
1448
                SetCmbDepartmentEvent(true);
1449
                SetCmbPersonEvent(true);
1450
                SetCmbOrdersDivEvent(true);
1451
                SetcmbConstrTypeEvent(true);
1452
                SetcmbTransConstrEvent(true);
1453

  
1454

  
1450 1455
                // ?????t?H?[?J?X
1451 1456
                this.ActiveControl = m_DspCtrl[(int)DspCnt.ConstructionPeriod];
1452 1457

  
......
1558 1563
            // ???p????????????????
1559 1564
            if (cmbTransferConstruction.Text.Length == 0) return;
1560 1565

  
1566
            // ?I???????????
1567
            if (cmbTransferConstruction.SelectedIndex == -1) return;
1568
            if (CommonMotions.cnvInt(cmbTransferConstruction.SelectedValue.ToString()) == 0) return;
1569

  
1570
            // ????R???{?{?b?N?X?C?x???g?N???A
1571
            SetcmbTransConstrEvent(false);
1572

  
1561 1573
            // ?????N???A
1562 1574
            m_DspCtrl[(int)DspCnt.TransferConstructionDate].Text = "";
1563 1575
            m_TransferMesageFlg = false;
1564 1576

  
1565
            // ?I???????????
1566
            if (cmbTransferConstruction.SelectedIndex == -1) return;
1567
            if (CommonMotions.cnvInt(cmbTransferConstruction.SelectedValue.ToString()) == 0) return;
1568

  
1569 1577
            // ???????Z?b?g????
1570 1578
            m_DspCtrl[(int)DspCnt.TransferConstructionDate].Text = DateTime.Now.ToShortDateString();
1571 1579

  
......
1577 1585
            }
1578 1586
            else
1579 1587
            {   // ?????????S????R???{?{?b?N?X???X?V????
1580
                SetConstructionPersonCombbox(transferCode);
1588
                SetConstrManCombbox(transferCode);
1581 1589
            }
1582 1590
            // ?????H?????p??????
1583 1591
            rdbStatus4.Checked = true;
1584 1592

  
1585 1593
            // ?f???????b?Z?[?W???????
1586 1594
            m_TransferMesageFlg = true;
1595

  
1596
            // ????R???{?{?b?N?X?C?x???g?Z?b?g
1597
            SetcmbTransConstrEvent(true);
1587 1598
        }
1588 1599
        #endregion
1589 1600

  
......
1631 1642
            // ?I???????????
1632 1643
            if (cmbOrdersDivision.SelectedIndex == -1) return;
1633 1644

  
1645
            // ????????R???{?{?b?N?X?C?x???g?N???A
1646
            SetCmbOrdersDivEvent(false);
1647

  
1634 1648
            SetcmbOrderers();
1649

  
1650
            // ????????R???{?{?b?N?X?C?x???g?Z?b?g
1651
            SetCmbOrdersDivEvent(true);
1635 1652
        }
1636 1653
        #endregion
1637 1654

  
......
1984 2001
            // ?????\??????????????
1985 2002
            if (bInitFlg) return;
1986 2003

  
2004
            // ?????R???{?{?b?N?X?C?x???g?N???A
2005
            SetCmbDepartmentEvent(false);
2006

  
1987 2007
            ComboBox combObj = (ComboBox)sender;
1988 2008
            int SelDepCode = CommonMotions.cnvInt(combObj.SelectedValue);
1989 2009

  
......
2013 2033
                combObj = cmbSalesSubPerson;
2014 2034
                SetcombBoxPerson(SelDepCode, combObj);
2015 2035
            }
2036

  
2037
            // ?????R???{?{?b?N?X?C?x???g?Z?b?g
2038
            SetCmbDepartmentEvent(true);
2016 2039
        }
2017 2040
        #endregion
2018 2041

  
......
2040 2063
            // ?????\??????????????
2041 2064
            if (bInitFlg) return;
2042 2065

  
2066
            // ?H?????R???{?{?b?N?X?C?x???g?N???A
2067
            SetcmbConstrTypeEvent(false);
2068

  
2043 2069
            ChkSelConstrType();
2070

  
2071
            // ?H?????R???{?{?b?N?X?C?x???g?Z?b?g
2072
            SetcmbConstrTypeEvent(true);
2044 2073
        }
2045 2074
        #endregion
2046 2075

  
......
2107 2136
            // ????????????????????????
2108 2137
            if (CommonMotions.cnvInt(wrkCombo.SelectedValue) > 0) return;
2109 2138

  
2139
            // ?R???{?{?b?N?X?C?x???g?N???A
2140
            SetCmbDepartmentEvent(false);
2141
            SetCmbPersonEvent(false);
2142

  
2110 2143
            // ?S????R???{?{?b?N?X??X????
2111
            PersonCombBoxChange(sender);
2144
            //PersonCombBoxChange(sender);
2145
            SetPerosonToDepartment((ComboBox)sender);
2146

  
2147
            // ?R???{?{?b?N?X?C?x???g?Z?b?g
2148
            SetCmbDepartmentEvent(true);
2149
            SetCmbPersonEvent(true);
2112 2150
        }
2113 2151
        #endregion
2114 2152

  
......
2120 2158
        /// <param name="e"></param>
2121 2159
        private void cmbYear_SelectedIndexChanged(object sender, EventArgs e)
2122 2160
        {
2123
            // ?R???{?{?b?N?X?Z?b?g
2124
            SetDepartmentCombbox(false);                    // ????
2161
            // ???E?N????X????
2162
            ChangeYearAction();
2125 2163
        }
2126 2164
        #endregion
2127 2165
    }
branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstructionBaseInfo/FrmConstructionBaseInfo.designer.cs
832 832
            this.comboBoxEX5.Name = "comboBoxEX5";
833 833
            this.comboBoxEX5.Size = new System.Drawing.Size(255, 27);
834 834
            this.comboBoxEX5.TabIndex = 22;
835
            this.comboBoxEX5.SelectedIndexChanged += new System.EventHandler(this.comboBoxEX1_SelectedIndexChanged);
836 835
            this.comboBoxEX5.TextChanged += new System.EventHandler(this.valueChange);
837 836
            // 
838 837
            // comboBoxEX1
......
844 843
            this.comboBoxEX1.Name = "comboBoxEX1";
845 844
            this.comboBoxEX1.Size = new System.Drawing.Size(255, 27);
846 845
            this.comboBoxEX1.TabIndex = 20;
847
            this.comboBoxEX1.SelectedIndexChanged += new System.EventHandler(this.comboBoxEX1_SelectedIndexChanged);
848 846
            this.comboBoxEX1.TextChanged += new System.EventHandler(this.valueChange);
849 847
            // 
850 848
            // cmbSalesSubPerson
......
856 854
            this.cmbSalesSubPerson.Name = "cmbSalesSubPerson";
857 855
            this.cmbSalesSubPerson.Size = new System.Drawing.Size(255, 27);
858 856
            this.cmbSalesSubPerson.TabIndex = 23;
859
            this.cmbSalesSubPerson.SelectedIndexChanged += new System.EventHandler(this.cmbPerson_SelectedIndexChanged);
860 857
            this.cmbSalesSubPerson.TextChanged += new System.EventHandler(this.valueChange);
861 858
            // 
862 859
            // cmbSalesPerson
......
868 865
            this.cmbSalesPerson.Name = "cmbSalesPerson";
869 866
            this.cmbSalesPerson.Size = new System.Drawing.Size(255, 27);
870 867
            this.cmbSalesPerson.TabIndex = 21;
871
            this.cmbSalesPerson.SelectedIndexChanged += new System.EventHandler(this.cmbPerson_SelectedIndexChanged);
872 868
            this.cmbSalesPerson.TextChanged += new System.EventHandler(this.valueChange);
873 869
            // 
874 870
            // label110
......
957 953
            this.cmbConstructionType.Name = "cmbConstructionType";
958 954
            this.cmbConstructionType.Size = new System.Drawing.Size(372, 27);
959 955
            this.cmbConstructionType.TabIndex = 19;
960
            this.cmbConstructionType.SelectedIndexChanged += new System.EventHandler(this.cmbConstructionType_SelectedIndexChanged);
961 956
            this.cmbConstructionType.TextChanged += new System.EventHandler(this.valueChange);
962 957
            // 
963 958
            // txtInput08
......
1365 1360
            this.cmbOrdersDivision.Name = "cmbOrdersDivision";
1366 1361
            this.cmbOrdersDivision.Size = new System.Drawing.Size(507, 27);
1367 1362
            this.cmbOrdersDivision.TabIndex = 5;
1368
            this.cmbOrdersDivision.SelectedIndexChanged += new System.EventHandler(this.cmbOrdersDivision_SelectedIndexChanged);
1369 1363
            this.cmbOrdersDivision.TextChanged += new System.EventHandler(this.valueChange);
1370 1364
            // 
1371 1365
            // btnOrderer
......
1635 1629
            this.cmbTransferConstruction.Name = "cmbTransferConstruction";
1636 1630
            this.cmbTransferConstruction.Size = new System.Drawing.Size(300, 27);
1637 1631
            this.cmbTransferConstruction.TabIndex = 14;
1638
            this.cmbTransferConstruction.SelectedIndexChanged += new System.EventHandler(this.cmbTransferConstruction_SelectedIndexChanged);
1639 1632
            this.cmbTransferConstruction.TextChanged += new System.EventHandler(this.valueChange);
1640 1633
            // 
1641 1634
            // txtInput26
......
2332 2325
            this.comboBoxEX4.Name = "comboBoxEX4";
2333 2326
            this.comboBoxEX4.Size = new System.Drawing.Size(255, 27);
2334 2327
            this.comboBoxEX4.TabIndex = 4;
2335
            this.comboBoxEX4.SelectedIndexChanged += new System.EventHandler(this.comboBoxEX1_SelectedIndexChanged);
2328
            this.comboBoxEX4.TextChanged += new System.EventHandler(this.valueChange);
2336 2329
            // 
2337 2330
            // comboBoxEX3
2338 2331
            // 
......
2344 2337
            this.comboBoxEX3.Name = "comboBoxEX3";
2345 2338
            this.comboBoxEX3.Size = new System.Drawing.Size(255, 27);
2346 2339
            this.comboBoxEX3.TabIndex = 2;
2347
            this.comboBoxEX3.SelectedIndexChanged += new System.EventHandler(this.comboBoxEX1_SelectedIndexChanged);
2340
            this.comboBoxEX3.TextChanged += new System.EventHandler(this.valueChange);
2348 2341
            // 
2349 2342
            // cmbConstrSubPerson
2350 2343
            // 
......
2356 2349
            this.cmbConstrSubPerson.Name = "cmbConstrSubPerson";
2357 2350
            this.cmbConstrSubPerson.Size = new System.Drawing.Size(255, 27);
2358 2351
            this.cmbConstrSubPerson.TabIndex = 3;
2359
            this.cmbConstrSubPerson.SelectedIndexChanged += new System.EventHandler(this.cmbPerson_SelectedIndexChanged);
2352
            this.cmbConstrSubPerson.TextChanged += new System.EventHandler(this.valueChange);
2360 2353
            // 
2361 2354
            // label46
2362 2355
            // 
......
2701 2694
            this.cmbConstrInst.Name = "cmbConstrInst";
2702 2695
            this.cmbConstrInst.Size = new System.Drawing.Size(255, 27);
2703 2696
            this.cmbConstrInst.TabIndex = 5;
2704
            this.cmbConstrInst.SelectedIndexChanged += new System.EventHandler(this.cmbPerson_SelectedIndexChanged);
2705 2697
            this.cmbConstrInst.TextChanged += new System.EventHandler(this.valueChange);
2706 2698
            // 
2707 2699
            // comboBoxEX2
......
2714 2706
            this.comboBoxEX2.Name = "comboBoxEX2";
2715 2707
            this.comboBoxEX2.Size = new System.Drawing.Size(255, 27);
2716 2708
            this.comboBoxEX2.TabIndex = 0;
2717
            this.comboBoxEX2.SelectedIndexChanged += new System.EventHandler(this.comboBoxEX1_SelectedIndexChanged);
2718 2709
            this.comboBoxEX2.TextChanged += new System.EventHandler(this.valueChange);
2719 2710
            // 
2720 2711
            // cmbConstrPerson
......
3695 3686
            this.cmbConstructionYear.TabIndex = 1;
3696 3687
            this.toolTip1.SetToolTip(this.cmbConstructionYear, "工事の着工開始年度を入力してください");
3697 3688
            this.cmbConstructionYear.Visible = false;
3698
            this.cmbConstructionYear.SelectedIndexChanged += new System.EventHandler(this.cmbYear_SelectedIndexChanged);
3699 3689
            // 
3700 3690
            // cmbConstructionPeriod
3701 3691
            // 
......
3707 3697
            this.cmbConstructionPeriod.Size = new System.Drawing.Size(115, 24);
3708 3698
            this.cmbConstructionPeriod.TabIndex = 0;
3709 3699
            this.toolTip1.SetToolTip(this.cmbConstructionPeriod, "売り上げ計上を行う営業期を入力してください");
3710
            this.cmbConstructionPeriod.SelectedIndexChanged += new System.EventHandler(this.cmbYear_SelectedIndexChanged);
3711 3700
            // 
3712 3701
            // btnOtherProc
3713 3702
            // 
branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstructionBaseInfo/FrmConstructionBaseInfoAuxiliary.cs
1052 1052
                m_DspCtrl[(int)DspCnt.ConstructionYear].Text = worklist[0].ConstructionYear.ToString();                                                     // ?H???N?x
1053 1053
                m_DspCtrl[(int)DspCnt.ConstructionPeriod].Text = worklist[0].ConstructionPeriod.ToString();                                                 // ?H????
1054 1054

  
1055
                // ??????N?x???Z?b?g
1056
                SetDepartmentCombbox();
1057

  
1055 1058
                // ??Z??????z?Z?b?g
1056 1059
                SetEstimatePraiceValue();
1057 1060

  
......
1059 1062
                SetLabelDates();
1060 1063

  
1061 1064
                // ?c??S????????Z?b?g??????
1062
                if (worklist[0].SalesPersonCode != 0)
1063
                {
1064
                    SetDepartmentCombData(worklist[0].SalesDepCode, comboBoxEX1);
1065
                    SetcombBoxPerson(CommonMotions.cnvInt(comboBoxEX1.SelectedValue), cmbSalesPerson, worklist[0].SalesPersonCode);
1066
                }
1065
                comboBoxEX1.SelectedValue = worklist[0].SalesDepCode;
1066
                cmbSalesPerson.SelectedValue = worklist[0].SalesPersonCode;
1067

  
1067 1068
                // ?c????S????????Z?b?g??????
1068
                if (worklist[0].SalesSubPersonCode != 0)
1069
                {
1070
                    SetDepartmentCombData(worklist[0].SalesSubDepCode, comboBoxEX5);
1071
                    SetcombBoxPerson(CommonMotions.cnvInt(comboBoxEX5.SelectedValue), cmbSalesSubPerson, worklist[0].SalesSubPersonCode);
1072
                }
1069
                comboBoxEX5.SelectedValue = worklist[0].SalesSubDepCode;
1070
                cmbSalesSubPerson.SelectedValue = worklist[0].SalesSubPersonCode;
1071

  
1073 1072
                // ?H???S????????Z?b?g??????
1074
                if (worklist[0].ConstructionPersonCode != 0)
1075
                {
1076
                    SetDepartmentCombData(worklist[0].ConstrDepCode, comboBoxEX2);
1077
                    SetcombBoxPerson(CommonMotions.cnvInt(comboBoxEX2.SelectedValue), cmbConstrPerson, worklist[0].ConstructionPersonCode);
1078
                }
1073
                comboBoxEX2.SelectedValue = worklist[0].ConstrDepCode;
1074
                cmbConstrPerson.SelectedValue = worklist[0].ConstructionPersonCode;
1075

  
1079 1076
                // ?H?????S????????Z?b?g??????
1080
                if (worklist[0].ConstrSubPersonCode != 0)
1081
                {
1082
                    SetDepartmentCombData(worklist[0].ConstrSubDepCode, comboBoxEX3);
1083
                    SetcombBoxPerson(CommonMotions.cnvInt(comboBoxEX3.SelectedValue), cmbConstrSubPerson, worklist[0].ConstrSubPersonCode);
1084
                }
1077
                comboBoxEX3.SelectedValue = worklist[0].ConstrSubDepCode;
1078
                cmbConstrSubPerson.SelectedValue = worklist[0].ConstrSubPersonCode;
1079

  
1085 1080
                // ?w??????????Z?b?g??????
1086
                if (worklist[0].ConstructionInstructor != 0)
1087
                {
1088
                    SetDepartmentCombData(worklist[0].ConstrInstrDepCode, comboBoxEX4);
1089
                    SetcombBoxPerson(CommonMotions.cnvInt(comboBoxEX4.SelectedValue), cmbConstrInst, worklist[0].ConstructionInstructor);
1090
                }
1081
                comboBoxEX4.SelectedValue = worklist[0].ConstrInstrDepCode;
1082
                cmbConstrInst.SelectedValue = worklist[0].ConstructionInstructor;
1091 1083

  
1092 1084
                ((ComboBox)m_DspCtrl[(int)DspCnt.OrderersDivision]).SelectedValue = worklist[0].OrderersDivision;                                           // ???????
1093 1085
                // ??????R???{?X?V
......
2052 2044
        }
2053 2045
        #endregion
2054 2046

  
2055
        #region ?R???{?{?b?N?X??????R?[?h????????Z?b?g????
2056
        /// <summary>
2057
        /// ?R???{?{?b?N?X??????R?[?h????????Z?b?g????
2058
        /// </summary>
2059
        /// <param name="DepartMentCode"></param>
2060
        /// <param name="comb"></param>
2061
        private void SetDepartmentCombData(int DepartMentCode, ComboBox comb)
2062
        {
2063
            comb.SelectedIndexChanged -= new System.EventHandler(this.comboBoxEX1_SelectedIndexChanged);
2064
            IOMDepartment DepDB = new IOMDepartment();
2065
            try
2066
            {
2067
                // ?f?[?^???????????
2068
                List<KeyValuePair<int, string>> wrkList = (List<KeyValuePair<int, string>>)comb.DataSource;
2069
                KeyValuePair<int, string> wrkRec = wrkList.Find(x => x.Key == DepartMentCode);
2070
                // ??????????????
2071
                if (wrkRec.Key == 0 && wrkRec.Value == null)
2072
                {
2073
                    // ?????}?X?^???
2074
                    string strSQL = DepDB.CreatePrimarykeyString(DepartMentCode);
2075
                    DepartmentMaster depRec = new DepartmentMaster();
2076
                    if (!DepDB.SelectAction(strSQL, ref depRec)) return;
2077
                    wrkList.Add(new KeyValuePair<int, string>(depRec.DepartmentCode, depRec.DepartmentString));
2078

  
2079
                    // ?R???{?{?b?N?X?????\??
2080
                    ComboBoxAction.InitDataSetCombBox(comb, wrkList);
2081
                }
2082
                // ?R?[?h?Z?b?g
2083
                comb.SelectedValue = DepartMentCode;
2084
            }
2085
            catch (Exception ex)
2086
            {
2087
                logger.ErrorFormat("?V?X?e???G???[?F{0}?F{1}", CommonMotions.GetMethodName(), ex.Message);
2088
            }
2089
            finally
2090
            {
2091
                DepDB.close(); DepDB = null;
2092
                comb.SelectedIndexChanged += new System.EventHandler(this.comboBoxEX1_SelectedIndexChanged);
2093
            }
2094
        }
2095
        #endregion
2096

  
2097 2047
        #region ??????N??????????
2098 2048
        /// <summary>
2099 2049
        /// ??????N??????????
......
2196 2146
        }
2197 2147
        #endregion
2198 2148

  
2149

  
2150
        #region ?S????R???{?{?b?N?X?Z?b?g?????????Z?b?g????
2151
        /// <summary>
2152
        /// ?S????R???{?{?b?N?X?Z?b?g?????????Z?b?g????
2153
        /// </summary>
2154
        /// <returns></returns>
2155
        private bool SetPerosonToDepartment(ComboBox ManCmb)
2156
        {
2157
            IOMPersonInCharge PersonDB = new IOMPersonInCharge();
2158
            try
2159
            {
2160
                ComboBox DepCmb = GetPerson2DepartComb(ManCmb, true);
2161

  
2162
                // ?R???{?{?b?N?X???I??S???????????
2163
                int PersonCode = CommonMotions.cnvInt(ManCmb.SelectedValue);
2164
                if (PersonCode < 1) return true;
2165

  
2166
                int nTargetCount = GetTargetYear();
2167
                int DepartmentCode = CommonMotions.cnvInt(DepCmb.SelectedValue);
2168

  
2169
                StringBuilder strSQL = new StringBuilder();
2170
                CommonMotions.CreateMan2DepSQL(ref strSQL, nTargetCount, PersonCode);
2171

  
2172
                ArrayList arList = new ArrayList();
2173
                if (!PersonDB.ExecuteReader(strSQL.ToString(), ref arList)) return false;
2174
                if (arList.Count < 1) return false;
2175

  
2176
                object[] objRec = (object[])arList[0];
2177
                PersonInChargeMaster PersonRec = new PersonInChargeMaster();
2178
                PersonRec.PersonCode = CommonMotions.cnvInt(objRec[0]);         // ?S????R?[?h
2179
                PersonRec.PersonName = CommonMotions.cnvString(objRec[1]);      // ?S?????
2180
                PersonRec.DepartmentCode = CommonMotions.cnvInt(objRec[2]);     // ?????R?[?h
2181

  
2182
                // ?????????????????????
2183
                //if (DepartmentCode == PersonRec.DepartmentCode) return true;
2184

  
2185
                // ?????R???{?{?b?N?X??????R?[?h?Z?b?g
2186
                //SetcmbDepartment();
2187
                DepCmb.SelectedValue = PersonRec.DepartmentCode;
2188

  
2189
                //SetcmbPersons();    // ?S????R???{?{?b?N?X??X
2190
                ManCmb.SelectedValue = PersonCode;
2191

  
2192
                return true;
2193
            }
2194
            catch (Exception ex)
2195
            {
2196
                logger.ErrorFormat("?V?X?e???G???[?F{0}?F{1}", CommonMotions.GetMethodName(), ex.Message);
2197
                return false;
2198
            }
2199
            finally
2200
            {
2201
                PersonDB.close(); PersonDB = null;
2202
            }
2203
        }
2204
        #endregion
2205

  
2199 2206
        #region ?S????}?X?^?z???S????R?[?h?????????`?F?b?N??????????DataList????????
2200 2207
        /// <summary>
2201 2208
        /// ?S????}?X?^?z???S????R?[?h?????????`?F?b?N??????????DataList????????
......
2238 2245
        }
2239 2246
        #endregion
2240 2247

  
2241
        #region ?S????R???{?{?b?N?X?????Z?b?g
2248
        #region ?S????R???{?{?b?N?X?Z?b?g
2242 2249
        /// <summary>
2243
        /// ?S????R???{?{?b?N?X????????Z?b?g????
2250
        /// ?S????R???{?{?b?N?X?Z?b?g
2244 2251
        /// </summary>
2245
        private void SetInitcmbPersonInCharge()
2252
        private void SetcmbPersonInCharge()
2246 2253
        {
2247 2254
            IOMPersonInCharge picDB = new IOMPersonInCharge();
2248 2255
            try
2249 2256
            {
2250
                cmbSalesPerson.SelectedIndexChanged -= new EventHandler(cmbPerson_SelectedIndexChanged);
2251
                cmbSalesSubPerson.SelectedIndexChanged -= new EventHandler(cmbPerson_SelectedIndexChanged);
2252
                cmbConstrSubPerson.SelectedIndexChanged -= new EventHandler(cmbPerson_SelectedIndexChanged);
2253
                cmbConstrInst.SelectedIndexChanged -= new EventHandler(cmbPerson_SelectedIndexChanged);
2254

  
2255
                cmbSalesPerson.DataSource = null;
2256
                cmbSalesSubPerson.DataSource = null;
2257
                cmbConstrSubPerson.DataSource = null;
2258
                cmbConstrInst.DataSource = null;
2259

  
2260
                cmbSalesPerson.Items.Clear();
2261
                cmbSalesSubPerson.Items.Clear();
2262
                cmbConstrSubPerson.Items.Clear();
2263
                cmbConstrInst.Items.Clear();
2264

  
2265
                cmbSalesPerson.Text = "";
2266
                cmbSalesSubPerson.Text = "";
2267
                cmbConstrSubPerson.Text = "";
2268
                cmbConstrInst.Text = "";
2269

  
2270 2257
                // ?S????}?X?^??????????
2271 2258
                int nTargetCount = GetTargetYear();
2272 2259
                StringBuilder strSQL = new StringBuilder();
......
2276 2263
                ArrayList workList = new ArrayList();
2277 2264
                if (!picDB.ExecuteReader(strSQL.ToString(), ref workList)) return;
2278 2265

  
2279
                List<KeyValuePair<int, string>> DataList1 = new List<KeyValuePair<int, string>>();
2280
                List<KeyValuePair<int, string>> DataList2 = new List<KeyValuePair<int, string>>();
2281
                List<KeyValuePair<int, string>> DataList3 = new List<KeyValuePair<int, string>>();
2282
                List<KeyValuePair<int, string>> DataList4 = new List<KeyValuePair<int, string>>();
2283
                DataList1.Add(new KeyValuePair<int, string>(0, CommonDefine.s_UndecidedString));
2284
                DataList2.Add(new KeyValuePair<int, string>(0, CommonDefine.s_UndecidedString));
2285
                DataList3.Add(new KeyValuePair<int, string>(0, CommonDefine.s_UndecidedString));
2286
                DataList4.Add(new KeyValuePair<int, string>(0, CommonDefine.s_UndecidedString));
2266
                // ?R???{?{?b?N?X?????\??
2267
                SetcmbPersons(nTargetCount
2268
                                , GetPerson2DepartComb(cmbSalesPerson, true)
2269
                                , cmbSalesPerson
2270
                                , workList);
2271
                SetcmbPersons(nTargetCount
2272
                                , GetPerson2DepartComb(cmbSalesSubPerson, true)
2273
                                , cmbSalesSubPerson
2274
                                , workList);
2275
                SetcmbPersons(nTargetCount
2276
                                , GetPerson2DepartComb(cmbConstrSubPerson, true)
2277
                                , cmbConstrSubPerson
2278
                                , workList);
2279
                SetcmbPersons(nTargetCount
2280
                                , GetPerson2DepartComb(cmbConstrInst, true)
2281
                                , cmbConstrInst
2282
                                , workList);
2283
            }
2284
            catch (Exception ex)
2285
            {
2286
                logger.ErrorFormat("?V?X?e???G???[?F{0}?F{1}", CommonMotions.GetMethodName(), ex.Message);
2287
            }
2288
            finally
2289
            {
2290
                picDB.close(); picDB = null;
2291
            }
2292
        }
2293
        #endregion
2287 2294

  
2288
                // ?f?[?^?\??
2289
                PersonInChargeMaster workRec = new PersonInChargeMaster();
2295
        #region ?S????R???{?{?b?N?X???Z?b?g????
2296
        /// <summary>
2297
        /// ?S????R???{?{?b?N?X????????Z?b?g????
2298
        /// </summary>
2299
        private void SetcmbPersons(int nTargetCount, ComboBox DepCmb, ComboBox ManCmb, ArrayList workList)
2300
        {
2301
            try
2302
            {
2303
                int nBeforeCode = CommonMotions.cnvInt(ManCmb.SelectedValue);
2304
                int DepartmentCode = CommonMotions.cnvInt(DepCmb.SelectedValue);
2305
                if (DepartmentCode < 1) nBeforeCode = 0;
2306

  
2307
                List<KeyValuePair<int, string>> ConstructionDataList = new List<KeyValuePair<int, string>>();
2308
                ConstructionDataList.Add(new KeyValuePair<int, string>(0, CommonDefine.s_UndecidedString));
2309

  
2290 2310
                foreach (object[] work in workList)
2291 2311
                {
2292
                    picDB.Reader2Struct(work, ref workRec);
2293
                    KeyValuePair<int, string> keyval = new KeyValuePair<int, string>(workRec.PersonCode, workRec.PersonName);
2294

  
2295
                    DataList1.Add(keyval);
2296
                    DataList2.Add(keyval);
2297
                    DataList3.Add(keyval);
2298
                    DataList4.Add(keyval);
2312
                    KeyValuePair<int, string> keyval = new KeyValuePair<int, string>(
2313
                                                        CommonMotions.cnvInt(work[(int)IOMPersonInCharge.ColumnCnt.PersonCode])
2314
                                                        , CommonMotions.cnvString(work[(int)IOMPersonInCharge.ColumnCnt.PersonName]));
2315
                    ConstructionDataList.Add(keyval);
2299 2316
                }
2300 2317

  
2318
                ManCmb.DataSource = null;
2319
                ManCmb.Items.Clear();
2320
                ManCmb.Text = "";
2321

  
2301 2322
                // ?R???{?{?b?N?X?????\??
2302
                ComboBoxAction.InitDataSetCombBox(cmbSalesPerson, DataList1);
2303
                ComboBoxAction.InitDataSetCombBox(cmbSalesSubPerson, DataList2);
2304
                ComboBoxAction.InitDataSetCombBox(cmbConstrSubPerson, DataList3);
2305
                ComboBoxAction.InitDataSetCombBox(cmbConstrInst, DataList4);
2323
                ComboBoxAction.InitDataSetCombBox(ManCmb, ConstructionDataList);
2306 2324

  
2307
                cmbSalesPerson.SelectedIndex = 0;
2308
                cmbSalesSubPerson.SelectedIndex = 0;
2309
                cmbConstrSubPerson.SelectedIndex = 0;
2310
                cmbConstrInst.SelectedIndex = 0;
2325
                ManCmb.SelectedValue = nBeforeCode;
2311 2326
            }
2312 2327
            catch (Exception ex)
2313 2328
            {
2314 2329
                logger.ErrorFormat("?V?X?e???G???[?F{0}?F{1}", CommonMotions.GetMethodName(), ex.Message);
2315 2330
            }
2316
            finally
2317
            {
2318
                picDB.close(); picDB = null;
2319

  
2320
                cmbSalesPerson.SelectedIndexChanged += new EventHandler(cmbPerson_SelectedIndexChanged);
2321
                cmbSalesSubPerson.SelectedIndexChanged += new EventHandler(cmbPerson_SelectedIndexChanged);
2322
                cmbConstrSubPerson.SelectedIndexChanged += new EventHandler(cmbPerson_SelectedIndexChanged);
2323
                cmbConstrInst.SelectedIndexChanged += new EventHandler(cmbPerson_SelectedIndexChanged);
2324
            }
2325 2331
        }
2326 2332
        #endregion
2327 2333

  
......
2329 2335
        /// <summary>
2330 2336
        /// ?H???S????R???{?{?b?N?X????????Z?b?g????
2331 2337
        /// </summary>
2332
        private void SetConstructionPersonCombbox(int TransferCode = 0)
2338
        private void SetConstrManCombbox(int TransferCode = 0)
2333 2339
        {
2334 2340
            IOConstructionBaseInfo BaseDB = new IOConstructionBaseInfo();
2335 2341
            IOMPersonInCharge picDB = new IOMPersonInCharge();
2336 2342
            try
2337 2343
            {
2338
                cmbConstrPerson.SelectedIndexChanged -= new EventHandler(CmbConstrPerson_SelectedIndexChanged);
2339 2344
                int nBeforeCode = CommonMotions.cnvInt(cmbConstrPerson.SelectedValue);
2340 2345

  
2341 2346
                cmbConstrPerson.DataSource = null;
......
2386 2391
            {
2387 2392
                picDB.close(); picDB = null;
2388 2393
                BaseDB.close(); BaseDB = null;
2389

  
2390
                cmbConstrPerson.SelectedIndexChanged += new EventHandler(CmbConstrPerson_SelectedIndexChanged);
2391 2394
            }
2392 2395
        }
2393 2396
        #endregion
2394 2397

  
2395
        #region ?S????????R???{?{?b?N?X?Z?b?g
2398
        #region ?????R???{?{?b?N?X?Z?b?g
2396 2399
        /// <summary>
2397
        /// ?S????????R???{?{?b?N?X????????Z?b?g????
2400
        /// ?????R???{?{?b?N?X????????Z?b?g????
2398 2401
        /// </summary>
2399
        private void SetDepartmentCombbox(bool bInit = true)
2402
        private void SetDepartmentCombbox()
2400 2403
        {
2401 2404
            IOMDepartment dmDB = new IOMDepartment();
2402
            comboBoxEX1.SelectedIndexChanged -= new EventHandler(comboBoxEX1_SelectedIndexChanged);
2403
            comboBoxEX2.SelectedIndexChanged -= new EventHandler(comboBoxEX1_SelectedIndexChanged);
2404
            comboBoxEX3.SelectedIndexChanged -= new EventHandler(comboBoxEX1_SelectedIndexChanged);
2405
            comboBoxEX4.SelectedIndexChanged -= new EventHandler(comboBoxEX1_SelectedIndexChanged);
2406
            comboBoxEX5.SelectedIndexChanged -= new EventHandler(comboBoxEX1_SelectedIndexChanged);
2407 2405
            try
2408 2406
            {
2409
                int[] ArraryCode = new int[5];
2410
                // ?V?K??O??N???A????
2411
                if (!bInit)
2412
                {
2413
                    DepCombClear(ref ArraryCode);
2414
                }
2415

  
2416 2407
                // ?????}?X?^??????????
2417 2408
                int nPeriod = GetTargetYear();
2418 2409
                StringBuilder strSQL = new StringBuilder();
......
2422 2413
                // ?????}?X?^???
2423 2414
                if (!dmDB.ExecuteReader(strSQL.ToString(), ref dmList)) return;
2424 2415

  
2425
                // ?V?K????O???????????????S???????Z?b?g
2426
                if (!bInit)
2427
                {
2428
                    ChangeDepCode(dmList, ref ArraryCode);
2429
                }
2430

  
2431
                List<KeyValuePair<int, string>> DataList1 = new List<KeyValuePair<int, string>>();
2432
                List<KeyValuePair<int, string>> DataList2 = new List<KeyValuePair<int, string>>();
2433
                List<KeyValuePair<int, string>> DataList3 = new List<KeyValuePair<int, string>>();
2434
                List<KeyValuePair<int, string>> DataList4 = new List<KeyValuePair<int, string>>();
2435
                List<KeyValuePair<int, string>> DataList5 = new List<KeyValuePair<int, string>>();
2436
                DataList1.Add(new KeyValuePair<int, string>(0, CommonDefine.s_UndecidedString));
2437
                DataList2.Add(new KeyValuePair<int, string>(0, CommonDefine.s_UndecidedString));
2438
                DataList3.Add(new KeyValuePair<int, string>(0, CommonDefine.s_UndecidedString));
2439
                DataList4.Add(new KeyValuePair<int, string>(0, CommonDefine.s_UndecidedString));
2440
                DataList5.Add(new KeyValuePair<int, string>(0, CommonDefine.s_UndecidedString));
2441
                // ?f?[?^?\??
2442
                foreach (object[] wrk in dmList)
2443
                {
2444
                    KeyValuePair<int, string> keyval = new KeyValuePair<int, string>(CommonMotions.cnvInt(wrk[0])
2445
                                                                                    , CommonMotions.cnvString(wrk[1]));
2446

  
2447
                    DataList1.Add(keyval);
2448
                    DataList2.Add(keyval);
2449
                    DataList3.Add(keyval);
2450
                    DataList4.Add(keyval);
2451
                    DataList5.Add(keyval);
2452
                }
2453

  
2454 2416
                // ?R???{?{?b?N?X?????\??
2455
                ComboBoxAction.InitDataSetCombBox(comboBoxEX1, DataList1);
2456
                ComboBoxAction.InitDataSetCombBox(comboBoxEX2, DataList2);
2457
                ComboBoxAction.InitDataSetCombBox(comboBoxEX3, DataList3);
2458
                ComboBoxAction.InitDataSetCombBox(comboBoxEX4, DataList4);
2459
                ComboBoxAction.InitDataSetCombBox(comboBoxEX5, DataList5);
2460
                comboBoxEX1.SelectedValue = ArraryCode[0];
2461
                comboBoxEX2.SelectedValue = ArraryCode[1];
2462
                comboBoxEX3.SelectedValue = ArraryCode[2];
2463
                comboBoxEX4.SelectedValue = ArraryCode[3];
2464
                comboBoxEX5.SelectedValue = ArraryCode[4];
2417
                SetcmbDepartment(nPeriod, comboBoxEX1, dmList);
2418
                SetcmbDepartment(nPeriod, comboBoxEX2, dmList);
2419
                SetcmbDepartment(nPeriod, comboBoxEX3, dmList);
2420
                SetcmbDepartment(nPeriod, comboBoxEX4, dmList);
2421
                SetcmbDepartment(nPeriod, comboBoxEX5, dmList);
2465 2422

  
2466 2423
            }
2467 2424
            catch (Exception ex)
......
2471 2428
            finally
2472 2429
            {
2473 2430
                dmDB.close(); dmDB = null;
2474
                comboBoxEX1.SelectedIndexChanged += new EventHandler(comboBoxEX1_SelectedIndexChanged);
2475
                comboBoxEX2.SelectedIndexChanged += new EventHandler(comboBoxEX1_SelectedIndexChanged);
2476
                comboBoxEX3.SelectedIndexChanged += new EventHandler(comboBoxEX1_SelectedIndexChanged);
2477
                comboBoxEX4.SelectedIndexChanged += new EventHandler(comboBoxEX1_SelectedIndexChanged);
2478
                comboBoxEX5.SelectedIndexChanged += new EventHandler(comboBoxEX1_SelectedIndexChanged);
2479 2431
            }
2480 2432
        }
2481 2433
        #endregion
2482 2434

  
2483
        #region ?????R???{?{?b?N?X?N???A
2435
        #region ?????R???{?{?b?N?X???Z?b?g????
2484 2436
        /// <summary>
2485
        /// ?????R???{?{?b?N?X?N???A
2437
        /// ?????R???{?{?b?N?X????????Z?b?g????
2486 2438
        /// </summary>
2487
        private void DepCombClear(ref int[] berefoCode)
2439
        private void SetcmbDepartment(int nTargetCount, ComboBox comboBox, ArrayList dmList)
2488 2440
        {
2489 2441
            try
2490 2442
            {
2491
                berefoCode[0] = CommonMotions.cnvInt(comboBoxEX1.SelectedValue);
2492
                berefoCode[1] = CommonMotions.cnvInt(comboBoxEX2.SelectedValue);
2493
                berefoCode[2] = CommonMotions.cnvInt(comboBoxEX3.SelectedValue);
2494
                berefoCode[3] = CommonMotions.cnvInt(comboBoxEX4.SelectedValue);
2495
                berefoCode[4] = CommonMotions.cnvInt(comboBoxEX5.SelectedValue);
2443
                int nBeforeCode = CommonMotions.cnvInt(comboBox.SelectedValue);
2496 2444

  
2497
                comboBoxEX1.DataSource = null;
2498
                comboBoxEX2.DataSource = null;
2499
                comboBoxEX3.DataSource = null;
2500
                comboBoxEX4.DataSource = null;
2501
                comboBoxEX5.DataSource = null;
2502
                comboBoxEX1.Items.Clear();
2503
                comboBoxEX2.Items.Clear();
2504
                comboBoxEX3.Items.Clear();
2505
                comboBoxEX4.Items.Clear();
2506
                comboBoxEX5.Items.Clear();
2507
                comboBoxEX1.Text = "";
2508
                comboBoxEX2.Text = "";
2509
                comboBoxEX3.Text = "";
2510
                comboBoxEX4.Text = "";
2511
                comboBoxEX5.Text = "";
2512
            }
2513
            catch (Exception ex)
2514
            {
2515
                logger.ErrorFormat("?V?X?e???G???[?F{0}?F{1}", CommonMotions.GetMethodName(), ex.Message);
2516
            }
2517
        }
2518
        #endregion
2445
                List<KeyValuePair<int, string>> ConstructionDataList = new List<KeyValuePair<int, string>>();
2446
                ConstructionDataList.Add(new KeyValuePair<int, string>(0, CommonDefine.s_UndecidedString));
2519 2447

  
2520
        #region ???X?g??????????????A???????X????
2521
        /// <summary>
2522
        /// ???X?g??????????????A???????X????
2523
        /// </summary>
2524
        private void ChangeDepCode(ArrayList dmList, ref int[] berefoCode)
2525
        {
2526
            IOMPersonInCharge ChgManDB = new IOMPersonInCharge();
2527
            try
2528
            {
2529
                StringBuilder strSQL = new StringBuilder();
2530
                for (int nCnt = 0; nCnt < berefoCode.Length; nCnt++)
2448
                foreach (object[] work in dmList)
2531 2449
                {
2532
                    int CurDep = berefoCode[nCnt];
2533
                    if (CurDep < 1) continue;
2534
                    // ?????????X?g??????H
2535
                    var selData = dmList.Cast<object[]>().Where(x => CommonMotions.cnvInt(x[0]) == CurDep).ToArray();
2536
                    if (selData.Count() > 0) continue;
2450
                    KeyValuePair<int, string> keyval = new KeyValuePair<int, string>(CommonMotions.cnvInt(work[0])
2451
                                                                                    , CommonMotions.cnvString(work[1]));
2537 2452

  
2538
                    // ????????S????}?X?^??????????
2539
                    ComboBox CurBox = null;
2540
                    switch (nCnt)
2541
                    {
2542
                        case 0:
2543
                            CurBox = comboBoxEX1;
2544
                            break;
2545
                        case 1:
2546
                            CurBox = comboBoxEX2;
2547
                            break;
2548
                        case 2:
2549
                            CurBox = comboBoxEX3;
2550
                            break;
2551
                        case 3:
2552
                            CurBox = comboBoxEX4;
2553
                            break;
2554
                        case 4:
2555
                            CurBox = comboBoxEX5;
2556
                            break;
2557
                    }
2453
                    ConstructionDataList.Add(keyval);
2454
                }
2558 2455

  
2559
                    ComboBox ManBox = GetPerson2DepartComb(CurBox, false);
2560
                    int SelManNo = CommonMotions.cnvInt(ManBox.SelectedValue);
2561
                    strSQL.Clear();
2562
                    strSQL.Append(ChgManDB.CreatePrimarykeyString(SelManNo));
2563
                    PersonInChargeMaster ManRec = new PersonInChargeMaster();
2564
                    ChgManDB.SelectAction(strSQL.ToString(), ref ManRec);
2565
                    berefoCode[nCnt] = ManRec.DepartmentCode;
2566
                }
2456
                comboBox.DataSource = null;
2457
                comboBox.Items.Clear();
2458
                comboBox.Text = "";
2459

  
2460
                // ?R???{?{?b?N?X?????\??
2461
                ComboBoxAction.InitDataSetCombBox(comboBox, ConstructionDataList);
2462

  
2463
                comboBox.SelectedValue = nBeforeCode;
2567 2464
            }
2568 2465
            catch (Exception ex)
2569 2466
            {
2570 2467
                logger.ErrorFormat("?V?X?e???G???[?F{0}?F{1}", CommonMotions.GetMethodName(), ex.Message);
2571 2468
            }
2572
            finally
2573
            {
2574
                ChgManDB.close(); ChgManDB = null;
2575
            }
2576 2469
        }
2577 2470
        #endregion
2578 2471

  
......
2740 2633
        {
2741 2634
            try
2742 2635
            {
2743
                cmbConstructionPeriod.SelectedIndexChanged -= new EventHandler(cmbYear_SelectedIndexChanged);
2744

  
2745 2636
                cmbConstructionYear.Items.Clear();
2746 2637
                cmbConstructionYear.Text = "";
2747 2638

  
......
2776 2667
        {
2777 2668
            try
2778 2669
            {
2779
                cmbConstructionPeriod.SelectedIndexChanged -= new EventHandler(cmbYear_SelectedIndexChanged);
2780

  
2781 2670
                cmbConstructionPeriod.Items.Clear();
2782 2671
                cmbConstructionPeriod.Text = "";
2783 2672

  
......
2802 2691
            {
2803 2692
                logger.ErrorFormat("?V?X?e???G???[?F{0}?F{1}", CommonMotions.GetMethodName(), ex.Message);
2804 2693
            }
2805
            finally
2806
            {
2807
                cmbConstructionPeriod.SelectedIndexChanged += new EventHandler(cmbYear_SelectedIndexChanged);
2808
            }
2809 2694
        }
2810 2695
        #endregion
2811 2696

  
......
2970 2855
        }
2971 2856
        #endregion
2972 2857

  
2858
        #region ?H???N?x?R???{?{?b?N?X?C?x???g?Z?b?g
2859
        /// <summary>
2860
        /// ?H???N?x?R???{?{?b?N?X?C?x???g?Z?b?g
2861
        /// </summary>
2862
        private void SetcmbConstYearEvent(bool bSet)
2863
        {
2864
            try
2865
            {
2866
                if (bSet)
2867
                {
2868
                    cmbConstructionYear.SelectedIndexChanged += new EventHandler(cmbYear_SelectedIndexChanged);
2869
                    cmbConstructionPeriod.SelectedIndexChanged += new EventHandler(cmbYear_SelectedIndexChanged);
2870
                }
2871
                else
2872
                {
2873
                    cmbConstructionYear.SelectedIndexChanged -= new EventHandler(cmbYear_SelectedIndexChanged);
2874
                    cmbConstructionPeriod.SelectedIndexChanged -= new EventHandler(cmbYear_SelectedIndexChanged);
2875
                }
2876
            }
2877
            catch (Exception ex)
2878
            {
2879
                logger.ErrorFormat("?V?X?e???G???[?F{0}?F{1}", CommonMotions.GetMethodName(), ex.Message);
2880
            }
2881
        }
2882
        #endregion
2883

  
2884
        #region ?????R???{?{?b?N?X?C?x???g?Z?b?g
2885
        /// <summary>
2886
        /// ?????R???{?{?b?N?X?C?x???g?Z?b?g
2887
        /// </summary>
2888
        private void SetCmbDepartmentEvent(bool bSet)
2889
        {
2890
            try
2891
            {
2892
                if (bSet)
2893
                {
2894
                    comboBoxEX1.SelectedIndexChanged += new EventHandler(comboBoxEX1_SelectedIndexChanged);
2895
                    comboBoxEX2.SelectedIndexChanged += new EventHandler(comboBoxEX1_SelectedIndexChanged);
2896
                    comboBoxEX3.SelectedIndexChanged += new EventHandler(comboBoxEX1_SelectedIndexChanged);
2897
                    comboBoxEX4.SelectedIndexChanged += new EventHandler(comboBoxEX1_SelectedIndexChanged);
2898
                    comboBoxEX5.SelectedIndexChanged += new EventHandler(comboBoxEX1_SelectedIndexChanged);
2899
                }
2900
                else
2901
                {
2902
                    comboBoxEX1.SelectedIndexChanged -= new EventHandler(comboBoxEX1_SelectedIndexChanged);
2903
                    comboBoxEX2.SelectedIndexChanged -= new EventHandler(comboBoxEX1_SelectedIndexChanged);
2904
                    comboBoxEX3.SelectedIndexChanged -= new EventHandler(comboBoxEX1_SelectedIndexChanged);
2905
                    comboBoxEX4.SelectedIndexChanged -= new EventHandler(comboBoxEX1_SelectedIndexChanged);
2906
                    comboBoxEX5.SelectedIndexChanged -= new EventHandler(comboBoxEX1_SelectedIndexChanged);
2907
                }
2908
            }
2909
            catch (Exception ex)
2910
            {
2911
                logger.ErrorFormat("?V?X?e???G???[?F{0}?F{1}", CommonMotions.GetMethodName(), ex.Message);
2912
            }
2913
        }
2914
        #endregion
2915

  
2916
        #region ?S????R???{?{?b?N?X?C?x???g?Z?b?g
2917
        /// <summary>
2918
        /// ?S????R???{?{?b?N?X?C?x???g?Z?b?g
2919
        /// </summary>
2920
        private void SetCmbPersonEvent(bool bSet)
2921
        {
2922
            try
2923
            {
2924
                if (bSet)
2925
                {
2926
                    cmbSalesPerson.SelectedIndexChanged += new EventHandler(cmbPerson_SelectedIndexChanged);
2927
                    cmbSalesSubPerson.SelectedIndexChanged += new EventHandler(cmbPerson_SelectedIndexChanged);
2928
                    cmbConstrPerson.SelectedIndexChanged += new EventHandler(cmbPerson_SelectedIndexChanged);
2929
                    cmbConstrSubPerson.SelectedIndexChanged += new EventHandler(cmbPerson_SelectedIndexChanged);
2930
                    cmbConstrInst.SelectedIndexChanged += new EventHandler(cmbPerson_SelectedIndexChanged);
2931
                }
2932
                else
2933
                {
2934
                    cmbSalesPerson.SelectedIndexChanged -= new EventHandler(cmbPerson_SelectedIndexChanged);
2935
                    cmbSalesSubPerson.SelectedIndexChanged -= new EventHandler(cmbPerson_SelectedIndexChanged);
2936
                    cmbConstrPerson.SelectedIndexChanged -= new EventHandler(cmbPerson_SelectedIndexChanged);
2937
                    cmbConstrSubPerson.SelectedIndexChanged -= new EventHandler(cmbPerson_SelectedIndexChanged);
2938
                    cmbConstrInst.SelectedIndexChanged -= new EventHandler(cmbPerson_SelectedIndexChanged);
2939
                }
2940
            }
2941
            catch (Exception ex)
2942
            {
2943
                logger.ErrorFormat("?V?X?e???G???[?F{0}?F{1}", CommonMotions.GetMethodName(), ex.Message);
2944
            }
2945
        }
2946
        #endregion
2947

  
2948
        #region ????????R???{?{?b?N?X?C?x???g?Z?b?g
2949
        /// <summary>
2950
        /// ????????R???{?{?b?N?X?C?x???g?Z?b?g
2951
        /// </summary>
2952
        private void SetCmbOrdersDivEvent(bool bSet)
2953
        {
2954
            try
2955
            {
2956
                if (bSet)
2957
                {
2958
                    cmbOrdersDivision.SelectedIndexChanged += new EventHandler(cmbOrdersDivision_SelectedIndexChanged);
2959
                }
2960
                else
2961
                {
2962
                    cmbOrdersDivision.SelectedIndexChanged -= new EventHandler(cmbOrdersDivision_SelectedIndexChanged);
2963
                }
2964
            }
2965
            catch (Exception ex)
2966
            {
2967
                logger.ErrorFormat("?V?X?e???G???[?F{0}?F{1}", CommonMotions.GetMethodName(), ex.Message);
2968
            }
2969
        }
2970
        #endregion
2971

  
2972
        #region ?H?????R???{?{?b?N?X?C?x???g?Z?b?g
2973
        /// <summary>
2974
        /// ?H?????R???{?{?b?N?X?C?x???g?Z?b?g
2975
        /// </summary>
2976
        private void SetcmbConstrTypeEvent(bool bSet)
2977
        {
2978
            try
2979
            {
2980
                if (bSet)
2981
                {
2982
                    cmbConstructionType.SelectedIndexChanged += new EventHandler(cmbConstructionType_SelectedIndexChanged);
2983
                }
2984
                else
2985
                {
2986
                    cmbConstructionType.SelectedIndexChanged -= new EventHandler(cmbConstructionType_SelectedIndexChanged);
2987
                }
2988
            }
2989
            catch (Exception ex)
2990
            {
2991
                logger.ErrorFormat("?V?X?e???G???[?F{0}?F{1}", CommonMotions.GetMethodName(), ex.Message);
2992
            }
2993
        }
2994
        #endregion
2995

  
2996
        #region ????R???{?{?b?N?X
2997
        /// <summary>
2998
        /// ????R???{?{?b?N?X
2999
        /// </summary>
3000
        private void SetcmbTransConstrEvent(bool bSet)
3001
        {
3002
            try
3003
            {
3004
                if (bSet)
3005
                {
3006
                    cmbTransferConstruction.SelectedIndexChanged += new EventHandler(cmbTransferConstruction_SelectedIndexChanged);
3007
                }
3008
                else
3009
                {
3010
                    cmbTransferConstruction.SelectedIndexChanged -= new EventHandler(cmbTransferConstruction_SelectedIndexChanged);
3011
                }
3012
            }
3013
            catch (Exception ex)
3014
            {
3015
                logger.ErrorFormat("?V?X?e???G???[?F{0}?F{1}", CommonMotions.GetMethodName(), ex.Message);
3016
            }
3017
        }
3018
        #endregion
3019

  
3020
        #region ???E?N????X????
3021
        /// <summary>
3022
        /// ???E?N????X????
3023
        /// </summary>
3024
        private void ChangeYearAction()
3025
        {
3026
            try
3027
            {
3028
                int[] SaveCode = new int[5];
3029
                SavePersonCode(ref SaveCode, true);
3030

  
3031
                // ?R???{?{?b?N?X?C?x???g?N???A
3032
                SetCmbDepartmentEvent(false);
3033
                SetCmbPersonEvent(false);
3034

  
3035
                // ?R???{?{?b?N?X?Z?b?g
3036
                SetDepartmentCombbox();             // ????
3037
                SetcmbPersonInCharge();             // ?S????R???{?{?b?N?X?Z?b?g
3038

  
3039
                SetCmbPersonEvent(true);
3040
                SavePersonCode(ref SaveCode, false);
3041

  
3042
                // ?R???{?{?b?N?X?C?x???g?Z?b?g
3043
                SetCmbDepartmentEvent(true);
3044

  
3045
            }
3046
            catch (Exception ex)
3047
            {
3048
                logger.ErrorFormat("?V?X?e???G???[?F{0}?F{1}", CommonMotions.GetMethodName(), ex.Message);
3049
            }
3050
        }
3051
        #endregion
3052

  
3053
        #region ?S????R?[?h???????
3054
        /// <summary>
3055
        /// ?S????R?[?h???????
3056
        /// </summary>
3057
        /// <param name="CodeArray"></param>
3058
        private void SavePersonCode(ref int[] CodeArray, bool bSave)
3059
        {
3060
            try
3061
            {
3062
                if (bSave)
3063
                {
3064
                    CodeArray[0] = CommonMotions.cnvInt(cmbSalesPerson.SelectedValue);
3065
                    CodeArray[1] = CommonMotions.cnvInt(cmbSalesSubPerson.SelectedValue);
3066
                    CodeArray[2] = CommonMotions.cnvInt(cmbConstrPerson.SelectedValue);
3067
                    CodeArray[3] = CommonMotions.cnvInt(cmbConstrSubPerson.SelectedValue);
3068
                    CodeArray[4] = CommonMotions.cnvInt(cmbConstrInst.SelectedValue);
3069
                }
3070
                else
3071
                {
3072
                    cmbSalesPerson.SelectedValue = CodeArray[0];
3073
                    cmbSalesSubPerson.SelectedValue = CodeArray[1];
3074
                    cmbConstrPerson.SelectedValue = CodeArray[2];
3075
                    cmbConstrSubPerson.SelectedValue = CodeArray[3];
3076
                    cmbConstrInst.SelectedValue = CodeArray[4];
3077
                }
3078
            }
3079
            catch (Exception ex)
3080
            {
3081
                logger.ErrorFormat("?V?X?e???G???[?F{0}?F{1}", CommonMotions.GetMethodName(), ex.Message);
3082
            }
3083
        }
3084
        #endregion
3085

  
2973 3086
        #region ?H????{???o?^
2974 3087
        /// <summary>
2975 3088
        /// ?H????{???o?^
......
4072 4185
                string strWhere = mbdDB.CreatePrimarykeyString(data.RecordNumber, data.BranchNumber);
4073 4186

  
4074 4187
                // ?f?[?^?Z?b?g
4075
                int transferCode = CommonMotions.cnvInt(cmbTransferConstruction.SelectedValue);
4076
                string wkselect = cmbTransferConstruction.Text;
4188
                ComboBox wrkTransComb = (ComboBox)m_DspCtrl[(int)DspCnt.TransferConstruction];
4189
                int transferCode = CommonMotions.cnvInt(wrkTransComb.SelectedValue);
4190
                string wkselect = wrkTransComb.Text;
4077 4191

  
4078 4192
                string titleofhonor = "";
4079 4193
                if (transferCode > 99999)
4080 4194
                    titleofhonor = "?a";
4081 4195

  
4082 4196
                // ???M??Z?b?g
4083
                data.FromCode = CommonMotions.cnvInt(cmbSalesPerson.SelectedValue);
4084
                data.FromName = cmbSalesPerson.Text;
4197
                ComboBox wrkSalesComb = (ComboBox)m_DspCtrl[(int)DspCnt.SalesPersonCode];
4198
                data.FromCode = CommonMotions.cnvInt(wrkSalesComb.SelectedValue);
4199
                data.FromName = wrkSalesComb.Text;
4085 4200

  
4086 4201
                data.MessageTitle = "?H????????p???";
4087 4202
                data.MessageContent = string.Format("?H??????F{0}\r\n", m_DspCtrl[(int)DspCnt.ConstructionCode].Text);
branches/src/ProcessManagement/ProcessManagement/Properties/AssemblyInfo.cs
32 32
// すべての値を指定するか、下のように '*' を使ってビルドおよびリビジョン番号を 
33 33
// 既定値にすることができます:
34 34
// [assembly: AssemblyVersion("1.0.*")]
35
[assembly: AssemblyVersion("1.0.1.198")]
36
[assembly: AssemblyFileVersion("1.0.1.198")]
35
[assembly: AssemblyVersion("1.0.1.199")]
36
[assembly: AssemblyFileVersion("1.0.1.199")]
37 37
// Log4netを使用する
38 38
[assembly: log4net.Config.XmlConfigurator(ConfigFile = @"log4net.config", Watch = true)]

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