リビジョン 152
データチェッククラス、ハンドル初期化位置変更
部署まとめ・台帳まとめヘッダー、給与日付バグ修正
branches/src/ProcessManagement/ProcessManagement/Common/CommonMotions.cs | ||
---|---|---|
70 | 70 |
private static List<ProcessExcute> m_LoginUserProcExe = new List<ProcessExcute>(); |
71 | 71 |
|
72 | 72 |
/// <summary> |
73 |
/// システム初回起動チェック処理クラス |
|
74 |
/// </summary> |
|
75 |
private static ClsSystemOnceExecute m_CheckProc = null; |
|
76 |
|
|
77 |
/// <summary> |
|
78 | 73 |
/// 製品ファイルバージョン格納エリア |
79 | 74 |
/// </summary> |
80 | 75 |
private static FileVersionInfo m_ProductVersionInfo = FileVersionInfo.GetVersionInfo(System.Reflection.Assembly.GetExecutingAssembly().Location); |
... | ... | |
156 | 151 |
get { return m_ProductVersionInfo; } |
157 | 152 |
} |
158 | 153 |
|
159 |
/// <summary> |
|
160 |
/// システム起動チェック処理クラス |
|
161 |
/// </summary> |
|
162 |
public static ClsSystemOnceExecute CheckProc |
|
163 |
{ |
|
164 |
get { return m_CheckProc; } |
|
165 |
} |
|
166 |
|
|
167 | 154 |
#endregion |
168 | 155 |
|
169 | 156 |
#region 初期化 |
... | ... | |
182 | 169 |
|
183 | 170 |
// 管理マスタ取得 |
184 | 171 |
SetSystemMaster(); |
185 |
|
|
186 |
// 起動チェッククラス初期化 |
|
187 |
m_CheckProc = new ClsSystemOnceExecute(); |
|
188 | 172 |
} |
189 | 173 |
catch (Exception ex) |
190 | 174 |
{ |
branches/src/ProcessManagement/ProcessManagement/Common/CommonVersion.cs | ||
---|---|---|
14 | 14 |
/// <summary> |
15 | 15 |
/// 本体バージョン |
16 | 16 |
/// </summary> |
17 |
public static int s_SystemVersion = 35;
|
|
17 |
public static int s_SystemVersion = 36;
|
|
18 | 18 |
|
19 | 19 |
/// <summary> |
20 | 20 |
/// コピー・環境バージョン |
branches/src/ProcessManagement/ProcessManagement/Common/Process/ClsChangeLedgerData.cs | ||
---|---|---|
147 | 147 |
} |
148 | 148 |
|
149 | 149 |
// 工事詳細台帳の更新 |
150 |
if (!LedgerRecalculate(LedgerDB, LedgerExcuteDB, ConstrCodeList))
|
|
150 |
if (!LedgerRecalculate(LedgerExcuteDB, ConstrCodeList)) |
|
151 | 151 |
{ |
152 | 152 |
LedgerExcuteDB.rollback(); |
153 | 153 |
LedgerDB.rollback(); |
... | ... | |
181 | 181 |
/// 工事詳細台帳再計算処理(総支払額・粗利・給与・純利益が対象) |
182 | 182 |
/// </summary> |
183 | 183 |
/// <param name="ConstrCode"></param> |
184 |
private static bool LedgerRecalculate(IOConstructionLedger LedgerDB, |
|
185 |
IOConstructionLedgerExcute LedgerExcuteDB, |
|
186 |
List<int> ConstrCodeList) |
|
184 |
private static bool LedgerRecalculate(IOConstructionLedgerExcute LedgerExcuteDB, List<int> ConstrCodeList) |
|
187 | 185 |
{ |
188 | 186 |
try |
189 | 187 |
{ |
... | ... | |
389 | 387 |
} |
390 | 388 |
#endregion |
391 | 389 |
|
392 |
#region 個人毎経費データから工事詳細台帳の工事毎のデータ再計算更新処理 |
|
393 |
/// <summary> |
|
394 |
/// 個人毎経費データから工事詳細台帳の工事毎のデータ再計算更新処理 |
|
395 |
/// </summary> |
|
396 |
/// <param name="PersonCode"></param> |
|
397 |
/// <param name="TargetMonth"></param> |
|
398 |
/// <returns></returns> |
|
399 |
public static bool UpdateRecalLedgerDataFromTAndPCost(int PersonCode, string TargetMonth) |
|
400 |
{ |
|
401 |
IOConstructionLedger LedgerDB = new IOConstructionLedger(); |
|
402 |
IOConstructionLedgerExcute LedgerExcuteDB = new IOConstructionLedgerExcute(); |
|
403 |
IOCostDataOfPerson CostDB = new IOCostDataOfPerson(); |
|
404 |
try |
|
405 |
{ |
|
406 |
string strSQL = "SELECT PERSONCODE, DATE_FORMAT(ACTIONDATE,'%Y/%m'), CONSTRUCTIONCODE FROM COSTDATAOFPERSON"; |
|
407 |
strSQL += String.Format(" WHERE PERSONCODE = {0} AND DATE_FORMAT(ACTIONDATE,'%Y/%m') = '{1}'", PersonCode, TargetMonth); |
|
408 |
strSQL += " GROUP BY PERSONCODE, DATE_FORMAT(ACTIONDATE,'%Y/%m'), CONSTRUCTIONCODE"; |
|
409 |
strSQL += " ORDER BY CONSTRUCTIONCODE"; |
|
410 |
|
|
411 |
ArrayList arList = new ArrayList(); |
|
412 |
if (!CostDB.ExecuteReader(strSQL, ref arList)) return false; |
|
413 |
if (arList.Count == 0) return true; |
|
414 |
|
|
415 |
List<int> ConstructionCodeList = new List<int>(); |
|
416 |
foreach (object[] wrkobj in arList) |
|
417 |
{ |
|
418 |
int ConstructionCode = CommonMotions.cnvInt(wrkobj[2]); |
|
419 |
|
|
420 |
} |
|
421 |
// 工事番号が存在しないデータは更新にしない |
|
422 |
if (ConstructionCodeList.Count < 1) return true; |
|
423 |
|
|
424 |
// 工事詳細台帳の更新 |
|
425 |
if (!LedgerRecalculate(LedgerDB, LedgerExcuteDB, ConstructionCodeList)) |
|
426 |
{ |
|
427 |
LedgerExcuteDB.rollback(); |
|
428 |
LedgerDB.rollback(); |
|
429 |
return false; |
|
430 |
} |
|
431 |
|
|
432 |
return true; |
|
433 |
} |
|
434 |
catch (System.Exception ex) |
|
435 |
{ |
|
436 |
logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
|
437 |
return false; |
|
438 |
} |
|
439 |
finally |
|
440 |
{ |
|
441 |
CostDB.close(); CostDB = null; |
|
442 |
} |
|
443 |
} |
|
444 |
#endregion |
|
445 |
|
|
446 | 390 |
#region 工事詳細台帳データを新規作成する |
447 | 391 |
/// <summary> |
448 | 392 |
/// 工事詳細台帳データを新規作成する |
... | ... | |
612 | 556 |
int NowValue = 0; |
613 | 557 |
string strExecout = "SELECT PAYMENTAMOUNT FROM CONSTRUCTIONLEDGEREXCUTE"; |
614 | 558 |
strExecout += LedgerExDB.CreatePrimarykeyString(CurRec.ConstructionCode, CurRec.GroupCount, CurRec.LineCount); |
615 |
strExecout += string.Format(" AND DATE(TargetMonth) = STR_TO_DATE('{0}', '%y/%m/%d')", DateTimeUtil.BeginOfMonth(TargetDate).ToShortDateString());
|
|
559 |
strExecout += string.Format(" AND DATE(TargetMonth) = STR_TO_DATE('{0}', '%Y/%m/%d')", DateTimeUtil.BeginOfMonth(TargetDate).ToShortDateString());
|
|
616 | 560 |
ArrayList arExecList = new ArrayList(); |
617 | 561 |
LedgerExDB.ExecuteReader(strExecout, ref arExecList, false); |
618 | 562 |
if (arExecList.Count != 0) |
branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstructionLedgerList/FrmConstructionLedgerListAuxiliary.cs | ||
---|---|---|
1757 | 1757 |
} |
1758 | 1758 |
#endregion |
1759 | 1759 |
|
1760 |
#region ???J?n?O?w?b?_?[?Z?b?g
|
|
1760 |
#region ???J?n?O?w?b?_?[?N???A
|
|
1761 | 1761 |
/// <summary> |
1762 |
/// ???J?n?O?w?b?_?[?Z?b?g
|
|
1762 |
/// ???J?n?O?w?b?_?[?N???A
|
|
1763 | 1763 |
/// </summary> |
1764 | 1764 |
private void SetUnreachedPeriod() |
1765 | 1765 |
{ |
... | ... | |
1832 | 1832 |
|
1833 | 1833 |
DateTime stDate = DateTime.Today; |
1834 | 1834 |
DateTime edDate = DateTime.Today; |
1835 |
DateTime DspSTDate = DateTime.MaxValue; |
|
1836 |
DateTime DspEdDate = DateTime.MinValue; |
|
1835 | 1837 |
|
1836 | 1838 |
// ???^???W?v???? |
1837 | 1839 |
for (int i = 0; i < PersonCDArray.Count; i++) |
... | ... | |
1845 | 1847 |
int workSalary = CalcElapsedSalary(stDate, edDate, PersonCDArray[i], SalaryArray[i]); |
1846 | 1848 |
// ??v???Z |
1847 | 1849 |
TotalSalary += workSalary; |
1848 |
|
|
1850 |
// ?\?????t?? |
|
1851 |
if (DspSTDate > stDate) DspSTDate = stDate; |
|
1852 |
if (DspEdDate < edDate) DspEdDate = edDate; |
|
1849 | 1853 |
} |
1850 | 1854 |
|
1851 | 1855 |
// ----- ?\?????? |
... | ... | |
1883 | 1887 |
lblTotalCalcValue.Text = CalcTotal.ToString("#,0"); |
1884 | 1888 |
|
1885 | 1889 |
// ???^?v?Z?J?n???E?I???? |
1886 |
lblStartDate.Text = stDate.ToShortDateString();
|
|
1887 |
lblEndDate.Text = edDate.ToShortDateString();
|
|
1890 |
lblStartDate.Text = DspSTDate.ToShortDateString();
|
|
1891 |
lblEndDate.Text = DspEdDate.ToShortDateString();
|
|
1888 | 1892 |
} |
1889 | 1893 |
catch (Exception ex) |
1890 | 1894 |
{ |
branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/DepExpenssList/FrmDepExpenssListAuxiliary.cs | ||
---|---|---|
1864 | 1864 |
|
1865 | 1865 |
DateTime stDate = DateTime.Today; |
1866 | 1866 |
DateTime edDate = DateTime.Today; |
1867 |
DateTime DspSTDate = DateTime.MaxValue; |
|
1868 |
DateTime DspEdDate = DateTime.MinValue; |
|
1867 | 1869 |
|
1868 | 1870 |
// ???^???W?v???? |
1869 | 1871 |
for (int i = 0; i < PersonCDArray.Count; i++) |
... | ... | |
1877 | 1879 |
int workSalary = CalcElapsedSalary(stDate, edDate, PersonCDArray[i], SalaryArray[i]); |
1878 | 1880 |
// ??v???Z |
1879 | 1881 |
TotalSalary += workSalary; |
1882 |
|
|
1883 |
// ?\?????t?? |
|
1884 |
if (DspSTDate > stDate) DspSTDate = stDate; |
|
1885 |
if (DspEdDate < edDate) DspEdDate = edDate; |
|
1880 | 1886 |
} |
1881 | 1887 |
|
1882 | 1888 |
// ----- ?\?????? |
... | ... | |
1914 | 1920 |
lblTotalCalcValue.Text = CalcTotal.ToString("#,0"); |
1915 | 1921 |
|
1916 | 1922 |
// ???^?v?Z?J?n???E?I???? |
1917 |
lblStartDate.Text = stDate.ToShortDateString();
|
|
1918 |
lblEndDate.Text = edDate.ToShortDateString();
|
|
1923 |
lblStartDate.Text = DspSTDate.ToShortDateString();
|
|
1924 |
lblEndDate.Text = DspEdDate.ToShortDateString();
|
|
1919 | 1925 |
} |
1920 | 1926 |
catch (Exception ex) |
1921 | 1927 |
{ |
branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/TAndPCosts/FrmTAndPCosts.Designer.cs | ||
---|---|---|
709 | 709 |
this.btnTab1LineNew.Size = new System.Drawing.Size(130, 30); |
710 | 710 |
this.btnTab1LineNew.TabIndex = 101; |
711 | 711 |
this.btnTab1LineNew.TabStop = false; |
712 |
this.btnTab1LineNew.Text = "行新規作成";
|
|
712 |
this.btnTab1LineNew.Text = "行 作 成";
|
|
713 | 713 |
this.btnTab1LineNew.UseVisualStyleBackColor = false; |
714 | 714 |
this.btnTab1LineNew.Click += new System.EventHandler(this.btnTabLineNew_Click); |
715 | 715 |
// |
branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/TAndPCosts/FrmTAndPCosts.cs | ||
---|---|---|
710 | 710 |
} |
711 | 711 |
#endregion |
712 | 712 |
|
713 |
#region 新規行作成ボタン
|
|
713 |
#region 行作成ボタン |
|
714 | 714 |
/// <summary> |
715 |
/// 新規行作成ボタン
|
|
715 |
/// 行作成ボタン |
|
716 | 716 |
/// </summary> |
717 | 717 |
/// <param name="sender"></param> |
718 | 718 |
/// <param name="e"></param> |
... | ... | |
900 | 900 |
// データ削除処理 |
901 | 901 |
if (!RemoveGridData()) return; |
902 | 902 |
|
903 |
// 終了時に工事詳細台帳とのデータ連携を行う |
|
904 |
LinkageLedgerData(); |
|
905 |
|
|
906 | 903 |
CommonMotions.RemoveEndMessage("交通費・購入品データ"); |
907 | 904 |
|
908 | 905 |
bool bSelFlg = false; |
branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/TAndPCosts/FrmTAndPCostsAuxiliary.cs | ||
---|---|---|
1077 | 1077 |
} |
1078 | 1078 |
#endregion |
1079 | 1079 |
|
1080 |
#region 行追加ボタン押下後処理
|
|
1080 |
#region 行追加処理 |
|
1081 | 1081 |
/// <summary> |
1082 | 1082 |
/// 行追加ボタン押下後処理 |
1083 | 1083 |
/// </summary> |
... | ... | |
1249 | 1249 |
int CurTabCnt = TabControl1.SelectedIndex; |
1250 | 1250 |
|
1251 | 1251 |
// データチェック |
1252 |
if (!DispFeildCheck(CurTabCnt)) return false;
|
|
1252 |
if (!DispFeildCheck()) return false; |
|
1253 | 1253 |
|
1254 |
if (MessageBox.Show(s_DataTypeString[CurTabCnt] + "データを登録します、よろしいですか?", "登録確認"
|
|
1254 |
if (MessageBox.Show("対象年月のデータを登録します、よろしいですか?", "登録確認"
|
|
1255 | 1255 |
, MessageBoxButtons.YesNo, MessageBoxIcon.Question) != DialogResult.Yes) return true; |
1256 | 1256 |
|
1257 | 1257 |
// 対象月を取得する |
... | ... | |
1513 | 1513 |
/// 画面項目のチェック |
1514 | 1514 |
/// </summary> |
1515 | 1515 |
/// <returns></returns> |
1516 |
private bool DispFeildCheck(int CurTabCnt)
|
|
1516 |
private bool DispFeildCheck() |
|
1517 | 1517 |
{ |
1518 | 1518 |
bool bRet = true; |
1519 | 1519 |
bool bAns = true; |
... | ... | |
1630 | 1630 |
} |
1631 | 1631 |
#endregion |
1632 | 1632 |
|
1633 |
#region 工事詳細台帳とのデータ連携を行う |
|
1634 |
/// <summary> |
|
1635 |
/// 工事詳細台帳とのデータ連携を行う |
|
1636 |
/// </summary> |
|
1637 |
private void LinkageLedgerData() |
|
1638 |
{ |
|
1639 |
// 元のカーソルを保持 |
|
1640 |
Cursor preCursor = Cursor.Current; |
|
1641 |
try |
|
1642 |
{ |
|
1643 |
// 登録・削除を行っていない場合は処理しない |
|
1644 |
if (!m_bChengeAns) return; |
|
1645 |
|
|
1646 |
// カーソルを待機カーソルに変更 |
|
1647 |
Cursor.Current = Cursors.WaitCursor; |
|
1648 |
// 画面入力不可 |
|
1649 |
this.Enabled = false; |
|
1650 |
|
|
1651 |
// 対象月を取得する |
|
1652 |
string TargetMonth = GetTargetMonth(); |
|
1653 |
|
|
1654 |
// 担当者コンボボックス値取得 |
|
1655 |
int PersonCode = GetConstructionPersonCode(); |
|
1656 |
|
|
1657 |
// 工事詳細台帳の更新を行う |
|
1658 |
ClsChangeLedgerData.UpdateRecalLedgerDataFromTAndPCost(PersonCode, TargetMonth); |
|
1659 |
|
|
1660 |
// フラグクリア |
|
1661 |
m_bChengeAns = false; |
|
1662 |
} |
|
1663 |
catch (Exception ex) |
|
1664 |
{ |
|
1665 |
logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
|
1666 |
} |
|
1667 |
finally |
|
1668 |
{ |
|
1669 |
// 画面入力可能 |
|
1670 |
this.Enabled = true; |
|
1671 |
// カーソルを元に戻す |
|
1672 |
this.Cursor = preCursor; |
|
1673 |
} |
|
1674 |
} |
|
1675 |
#endregion |
|
1676 |
|
|
1677 | 1633 |
#region 工事名称選択 |
1678 | 1634 |
/// <summary> |
1679 | 1635 |
/// 工事名称選択 |
branches/src/ProcessManagement/ProcessManagement/Forms/ZMenu/FrmMenu.cs | ||
---|---|---|
766 | 766 |
private FileVersionInfo m_VersionInfo = null; |
767 | 767 |
|
768 | 768 |
/// <summary> |
769 |
/// システム初回起動チェック処理クラス |
|
770 |
/// </summary> |
|
771 |
private static ClsSystemOnceExecute m_CheckProc = null; |
|
772 |
|
|
773 |
/// <summary> |
|
769 | 774 |
/// 初期化フラグ |
770 | 775 |
/// </summary> |
771 | 776 |
private bool m_bInitFlg = true; |
... | ... | |
867 | 872 |
m_KidouCheck = false; |
868 | 873 |
} |
869 | 874 |
InitializeComponent(); |
875 |
// 開始メッセージログ |
|
870 | 876 |
logger.Info("Start Process Management System"); |
871 | 877 |
} |
872 | 878 |
#endregion |
... | ... | |
902 | 908 |
} |
903 | 909 |
finally |
904 | 910 |
{ |
911 |
// 終了メッセージログ |
|
905 | 912 |
logger.Info("End Process Management System"); |
906 | 913 |
} |
907 | 914 |
} |
... | ... | |
959 | 966 |
{ |
960 | 967 |
try |
961 | 968 |
{ |
969 |
// 起動チェッククラス初期化 |
|
970 |
m_CheckProc = new ClsSystemOnceExecute(); |
|
971 |
|
|
962 | 972 |
// ---- 初回起動チェック(毎日最初に起動する人がデータチェックする) |
963 |
CommonMotions.CheckProc.FirstExecute();
|
|
973 |
m_CheckProc.FirstExecute();
|
|
964 | 974 |
|
965 | 975 |
// エラーログファイル削除 |
966 | 976 |
ClsCleanUp.CleanLogFile(); |
branches/src/ProcessManagement/ProcessManagement/Forms/ZMenu/FrmMenuAuxiliary.cs | ||
---|---|---|
1259 | 1259 |
|
1260 | 1260 |
if (m_Alldgv[Tabcount] == null) continue; |
1261 | 1261 |
|
1262 |
// 人員配置は処理しない |
|
1263 |
if (Tabcount == (int)MenuTabAssign.StaffAssignment) continue; |
|
1264 |
|
|
1262 | 1265 |
// ----- グリッドのサイズを変更する |
1263 | 1266 |
if (m_GridWidthSize[Tabcount] < 0) continue; |
1264 | 1267 |
|
... | ... | |
3160 | 3163 |
try |
3161 | 3164 |
{ |
3162 | 3165 |
List<TermMaster> term = new List<TermMaster>(); |
3163 |
if (!CommonMotions.CheckProc.ConstructionStatusCheck(wrkRec, DateTime.Now, ref term))
|
|
3166 |
if (!m_CheckProc.ConstructionStatusCheck(wrkRec, DateTime.Now, ref term))
|
|
3164 | 3167 |
{ |
3165 | 3168 |
int DataIndex = term.Count - 1; |
3166 | 3169 |
wrkRow.Cells[4].Style.BackColor = CommonMotions.getBackForeColor(term[DataIndex].BackColor, CommonDefine.PalceOfColor.BackColor); |
branches/src/ProcessManagement/ProcessManagement/Properties/AssemblyInfo.cs | ||
---|---|---|
32 | 32 |
// すべての値を指定するか、下のように '*' を使ってビルドおよびリビジョン番号を |
33 | 33 |
// 既定値にすることができます: |
34 | 34 |
// [assembly: AssemblyVersion("1.0.*")] |
35 |
[assembly: AssemblyVersion("1.0.0.34")]
|
|
36 |
[assembly: AssemblyFileVersion("1.0.0.34")]
|
|
35 |
[assembly: AssemblyVersion("1.0.0.36")]
|
|
36 |
[assembly: AssemblyFileVersion("1.0.0.36")]
|
|
37 | 37 |
// Log4netを使用する |
38 | 38 |
[assembly: log4net.Config.XmlConfigurator(ConfigFile = @"log4net.config", Watch = true)] |
他の形式にエクスポート: Unified diff