リビジョン 441
入金削除の挙動を修正
trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/Request/SelectPayment/FrmEntryDeposit.cs | ||
---|---|---|
162 | 162 |
{ |
163 | 163 |
try |
164 | 164 |
{ |
165 |
dgv1.Rows.Clear(); |
|
166 |
|
|
165 | 167 |
var Dep = SelectDepositData().OfType<object[]>(); |
166 | 168 |
Dlist = new List<DepositList>(); |
167 | 169 |
|
... | ... | |
708 | 710 |
#region 削除ボタン押下 |
709 | 711 |
private void btnDelete_Click(object sender, EventArgs e) |
710 | 712 |
{ |
713 |
var ioDepositData = new IODepositData(); |
|
711 | 714 |
try |
712 | 715 |
{ |
713 | 716 |
if (MessageBox.Show("選択しているデータを削除します。よろしいですか。", "削除確認", MessageBoxButtons.YesNo, MessageBoxIcon.Question) != DialogResult.Yes) |
... | ... | |
715 | 718 |
return; |
716 | 719 |
} |
717 | 720 |
int row = dgv1.CurrentCell.RowIndex; |
718 |
Dlist[row].AddEdit = 3; |
|
719 |
//CommonMotions.RemoveEndMessage("入金データ"); |
|
720 |
dgv1.Rows[row].Cells[(int)DispColumn.note].Value = "登録ボタンで削除完了"; |
|
721 |
dgv1.Rows[row].Cells[(int)DispColumn.note].Style.ForeColor = Color.Red; |
|
721 |
var sql = String.Format( |
|
722 |
" where OrderersDivision = {0} and OrderersCode = {1} and TargetDate = {2} and SeqNo = {3}", |
|
723 |
dgv1.Rows[row].Cells[(int)DispColumn.orderersDivision].Value, |
|
724 |
dgv1.Rows[row].Cells[(int)DispColumn.orderersCode].Value, |
|
725 |
dgv1.Rows[row].Cells[(int)DispColumn.targetDate].Value, |
|
726 |
(int)dgv1.Rows[row].Cells[(int)DispColumn.seqNo].Value |
|
727 |
); |
|
728 |
if (!ioDepositData.DeleteAction(sql)) |
|
729 |
{ |
|
730 |
throw new Exception(); |
|
731 |
} |
|
722 | 732 |
} |
723 | 733 |
catch (Exception ex) |
724 | 734 |
{ |
735 |
ioDepositData.rollback(); |
|
725 | 736 |
logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
726 | 737 |
} |
738 |
finally |
|
739 |
{ |
|
740 |
ioDepositData.close(); |
|
741 |
ioDepositData = null; |
|
742 |
InitDataLoad(); |
|
743 |
} |
|
727 | 744 |
|
728 | 745 |
} |
729 | 746 |
#endregion |
他の形式にエクスポート: Unified diff