..
This commit is contained in:
@@ -893,5 +893,33 @@ namespace FPJ0000
|
||||
f.ShowDialog();
|
||||
//this.fpSpread1.ActiveSheet.ClearSelection();
|
||||
}
|
||||
|
||||
private void toolStripButton6_Click(object sender, EventArgs e)
|
||||
{
|
||||
using (var f = new Project.finputcurrency())
|
||||
{
|
||||
if(f.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
var cur = (decimal)f.Value;
|
||||
var dlg = FCOMMON.Util.MsgQ("usd 단가가 입력된 자료의 단가를 자동 계산할까요?");
|
||||
if (dlg != DialogResult.Yes) return;
|
||||
|
||||
foreach(var dr in this.dsPRJ.ProjectsPart)
|
||||
{
|
||||
if (dr.RowState == DataRowState.Detached || dr.RowState == DataRowState.Deleted) continue;
|
||||
if (dr.IspriceDNull()) continue;
|
||||
if (dr.priceD == 0) continue;
|
||||
dr.price = Math.Round(dr.priceD * cur,0);
|
||||
if(dr.IsqtyNull()==false)
|
||||
dr.amt = dr.qty * dr.price;
|
||||
if (dr.IsqtynNull() == false)
|
||||
dr.amtn = dr.qtyn * dr.price;
|
||||
dr.EndEdit();
|
||||
}
|
||||
|
||||
this.Validate();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user