..
This commit is contained in:
@@ -4,6 +4,7 @@ using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
@@ -12,7 +13,7 @@ namespace FCOMMON
|
||||
{
|
||||
public partial class fSFI : Form
|
||||
{
|
||||
public fSFI(string sfi_type, float time, float cnt)
|
||||
public fSFI(string sfi_type, float time, float cnt, double shiftcount, int itemcnt)
|
||||
{
|
||||
InitializeComponent();
|
||||
if (sfi_type == "M")
|
||||
@@ -23,10 +24,12 @@ namespace FCOMMON
|
||||
else
|
||||
{
|
||||
radO.Checked = true;
|
||||
nudOsavetime.Value= (decimal)time;
|
||||
nudOsavetime.Value = (decimal)time;
|
||||
}
|
||||
nudMSaveCnt.Value = (decimal)cnt;
|
||||
|
||||
nudShiftCnt.Value = (decimal)shiftcount;
|
||||
this.nudCnt.Value = (decimal)itemcnt;
|
||||
|
||||
}
|
||||
|
||||
private void label1_Click(object sender, EventArgs e)
|
||||
@@ -46,7 +49,7 @@ namespace FCOMMON
|
||||
var nud = sender as NumericUpDown;
|
||||
if (nud.Tag.ToString().ToLower() == "o")
|
||||
{
|
||||
updateOFF();
|
||||
UpdateOffice();
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -58,36 +61,60 @@ namespace FCOMMON
|
||||
var nud = sender as NumericUpDown;
|
||||
//mfg의 총 절감 시간이 변경되었다
|
||||
var 총절감시간 = (double)nud.Value;
|
||||
var sfi = 총절감시간 / (int)numericUpDown5.Value;
|
||||
numericUpDown4.Value = (Decimal)sfi;
|
||||
var sfi = 총절감시간 / (float)numericUpDown5.Value;
|
||||
nudSFIMFG.Value = (Decimal)sfi;
|
||||
}
|
||||
public double Value { get; set; } = 0;
|
||||
void updateMFG()
|
||||
{
|
||||
var 절감시간 = (double)nudMsavetime.Value;
|
||||
var SHIFT수 = (int)nudMSaveCnt.Value;
|
||||
var SHIFT수 = (float)nudMSaveCnt.Value;
|
||||
var shift총수 = (double)(절감시간 * SHIFT수);
|
||||
numericUpDown9.Value = (decimal)shift총수; //1쉬프트 개선절감횟수
|
||||
var 쉬프트수 = (int)numericUpDown10.Value;
|
||||
numericUpDown6.Value = (decimal)(shift총수 * 쉬프트수);
|
||||
|
||||
if (numericUpDown9.Value != (decimal)shift총수)
|
||||
numericUpDown9.Value = (decimal)shift총수; //1쉬프트 개선절감횟수
|
||||
|
||||
var 쉬프트수 = (int)nudShiftCnt.Value;
|
||||
var 장비수 = (int)nudCnt.Value;
|
||||
numericUpDown6.Value = (decimal)(shift총수 * 쉬프트수 * 장비수);
|
||||
}
|
||||
void updateOFF()
|
||||
void UpdateOffice()
|
||||
{
|
||||
var savetime = (double)nudOsavetime.Value;
|
||||
var min = (int)numericUpDown2.Value;
|
||||
var sfi = savetime / min;
|
||||
numericUpDown3.Value = (decimal)sfi;
|
||||
var cnt = (int)nudCnt.Value;
|
||||
nudSFIOffice.Value = (decimal)(sfi * cnt);
|
||||
}
|
||||
|
||||
private void button1_Click(object sender, EventArgs e)
|
||||
{
|
||||
this.Invalidate();
|
||||
if (radO.Checked)
|
||||
this.Value = (double)numericUpDown3.Value;
|
||||
this.Value = (double)nudSFIOffice.Value;
|
||||
else
|
||||
this.Value = (double)numericUpDown4.Value;
|
||||
this.Value = (double)nudSFIMFG.Value;
|
||||
DialogResult = DialogResult.OK;
|
||||
|
||||
}
|
||||
|
||||
private void fSFI_Load(object sender, EventArgs e)
|
||||
{
|
||||
nudMSaveCnt.DecimalPlaces = 1;
|
||||
}
|
||||
|
||||
private void nudSIFOffice_ValueChanged(object sender, EventArgs e)
|
||||
{
|
||||
//offcie update
|
||||
var sfi = (double)nudSFIOffice.Value;
|
||||
numericUpDown3.Value = (decimal)(sfi * 1.25);
|
||||
}
|
||||
|
||||
private void numericUpDown4_ValueChanged(object sender, EventArgs e)
|
||||
{
|
||||
//mfg update
|
||||
var sfi = (double)nudSFIMFG.Value;
|
||||
numericUpDown1.Value = (decimal)(sfi * 1.25);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user