リビジョン 480
台帳データ:発注書フラグ上書きのバグ修正
| trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstructionLedger/FrmConstructionLedgerAuxiliary.cs | ||
|---|---|---|
| 6089 | 6089 |
#endregion |
| 6090 | 6090 |
// ---------- データ登録↑↑ |
| 6091 | 6091 |
|
| 6092 |
#region データ最新時間チェック
|
|
| 6092 |
#region データ更新時間チェック
|
|
| 6093 | 6093 |
/// <summary> |
| 6094 |
/// データ最新時間チェック
|
|
| 6094 |
/// データ更新時間チェック
|
|
| 6095 | 6095 |
/// </summary> |
| 6096 | 6096 |
private bool CheckDataLoadTime(IOConstructionLedger LedgerDB, bool Display) |
| 6097 | 6097 |
{
|
| ... | ... | |
| 6102 | 6102 |
if (!Display) return true; |
| 6103 | 6103 |
|
| 6104 | 6104 |
StringBuilder strSQL = new StringBuilder(); |
| 6105 |
DataGridView dgv = dgvAllDisplay; |
|
| 6106 |
|
|
| 6107 |
strSQL.Append("Select DetailCount, PurchaseOrderFlg From constructionledgerdetail");
|
|
| 6108 |
strSQL.AppendFormat(" Where ConstructionCode = {0}", m_ConstructionCode);
|
|
| 6109 |
strSQL.AppendFormat(" And GroupCount = {0}", (int)FrmConstructionLedger.DataGroup.ConstructionCosts);
|
|
| 6110 |
ArrayList FlgData = new ArrayList(); |
|
| 6111 |
if (!LedgerDB.ExecuteReader(strSQL.ToString(), ref FlgData)) return false; |
|
| 6112 |
if (FlgData.Count > 0) |
|
| 6113 |
{
|
|
| 6114 |
bool bError = false; |
|
| 6115 |
foreach (object[] objRec in FlgData) |
|
| 6116 |
{
|
|
| 6117 |
int nDCount = CommonMotions.cnvInt(objRec[0]); |
|
| 6118 |
int nMakeFlg = CommonMotions.cnvInt(objRec[1]); |
|
| 6119 |
int nData = dgv.Rows.Cast<DataGridViewRow>().Where(x => CommonMotions.cnvInt(x.Cells[(int)GridColumn.GroupCount].Value) == (int)DataGroup.ConstructionCosts |
|
| 6120 |
&& CommonMotions.cnvInt(x.Cells[(int)GridColumn.DetailNo].Value) == nDCount |
|
| 6121 |
&& CommonMotions.cnvInt(x.Cells[(int)GridColumn.PurchaseOrderFlg].Value) != nMakeFlg) |
|
| 6122 |
.Count(); |
|
| 6123 |
if(nData > 0) |
|
| 6124 |
{
|
|
| 6125 |
bError = true; |
|
| 6126 |
break; |
|
| 6127 |
} |
|
| 6128 |
} |
|
| 6129 |
if (bError) |
|
| 6130 |
{
|
|
| 6131 |
// 表示文字表示/非表示 |
|
| 6132 |
frm.DisplayVisbleType1 = true; |
|
| 6133 |
frm.DisplayVisbleType2 = false; |
|
| 6134 |
frm.VisibleType2_1 = false; |
|
| 6135 |
frm.VisibleType2_2 = false; |
|
| 6136 |
// Type1表示文字 |
|
| 6137 |
frm.DisplayTextType1 = "台帳表示後に\r\n発注書が作成されています。\r\n変更するには\r\n最新状態にしてから変更してください。"; |
|
| 6138 |
// Type1表示文字色 |
|
| 6139 |
frm.DisplayTextForeColorType1 = Color.Red; |
|
| 6140 |
frm.DisplayTextBackColorType1 = Color.Black; |
|
| 6141 |
// Type1表示文字フォント |
|
| 6142 |
frm.DisplayTextFontType1 = new Font(frm.DisplayTextFontType1.Name, 20f, FontStyle.Bold); |
|
| 6143 |
// ボタン選択 |
|
| 6144 |
frm.VisibleCANCELButton = false; |
|
| 6145 |
frm.PositionOKButton = frm.PositionCANCELButton; |
|
| 6146 |
frm.ShowDialog(); |
|
| 6147 |
return false; |
|
| 6148 |
} |
|
| 6149 |
} |
|
| 6150 |
|
|
| 6151 |
strSQL.Clear(); |
|
| 6105 | 6152 |
strSQL.Append("Select Max(UpdateDate) From constructionledgerdetail");
|
| 6106 | 6153 |
strSQL.AppendFormat(" Where ConstructionCode = {0}", m_ConstructionCode);
|
| 6107 | 6154 |
strSQL.AppendFormat(" And GroupCount = {0}", (int)FrmConstructionLedger.DataGroup.ConstructionCosts);
|
| trunk/src/ProcessManagement/ProcessManagement/Forms/SubForms/FrmCustomMsgBox.cs | ||
|---|---|---|
| 236 | 236 |
set { lblType2_2.Visible = value; }
|
| 237 | 237 |
} |
| 238 | 238 |
#endregion |
| 239 |
|
|
| 240 |
#region OKボタン表示 |
|
| 241 |
/// <summary> |
|
| 242 |
/// OKボタン表示 |
|
| 243 |
/// </summary> |
|
| 244 |
public bool VisibleOKButton |
|
| 245 |
{
|
|
| 246 |
get { return btnOK.Visible; }
|
|
| 247 |
set { btnOK.Visible = value; }
|
|
| 248 |
} |
|
| 239 | 249 |
#endregion |
| 240 | 250 |
|
| 251 |
#region OKボタン位置 |
|
| 252 |
/// <summary> |
|
| 253 |
/// OKボタン位置 |
|
| 254 |
/// </summary> |
|
| 255 |
public Point PositionOKButton |
|
| 256 |
{
|
|
| 257 |
get { return btnOK.Location; }
|
|
| 258 |
set { btnOK.Location = value; }
|
|
| 259 |
} |
|
| 260 |
#endregion |
|
| 261 |
|
|
| 262 |
#region CANCELボタン表示 |
|
| 263 |
/// <summary> |
|
| 264 |
/// CANCELボタン表示 |
|
| 265 |
/// </summary> |
|
| 266 |
public bool VisibleCANCELButton |
|
| 267 |
{
|
|
| 268 |
get { return btnCANCEL.Visible; }
|
|
| 269 |
set { btnCANCEL.Visible = value; }
|
|
| 270 |
} |
|
| 271 |
#endregion |
|
| 272 |
|
|
| 273 |
#region CANCELボタン位置 |
|
| 274 |
/// <summary> |
|
| 275 |
/// CANCELボタン位置 |
|
| 276 |
/// </summary> |
|
| 277 |
public Point PositionCANCELButton |
|
| 278 |
{
|
|
| 279 |
get { return btnCANCEL.Location; }
|
|
| 280 |
set { btnCANCEL.Location = value; }
|
|
| 281 |
} |
|
| 282 |
#endregion |
|
| 283 |
|
|
| 284 |
#endregion |
|
| 285 |
|
|
| 241 | 286 |
#region コンストラクタ |
| 242 | 287 |
/// <summary> |
| 243 | 288 |
/// コンストラクタ |
他の形式にエクスポート: Unified diff