protected int Save() { oForecast.DeleteStorage(intID); if (radYes.Checked == true) { int intHigh = (chkOldHigh.Checked ? 1 : 0); double dblHighTotal = 0.00; double dblHighQA = 0.00; double dblHighTest = 0.00; if (intHigh == 1) { if (panOldHighProduction.Visible == true) { dblHighTotal = double.Parse(txtOldHighRequire.Text); } if (panOldHighQA.Visible == true) { dblHighQA = double.Parse(txtOldHighRequireQA.Text); } if (panOldHighTest.Visible == true) { dblHighTest = double.Parse(txtOldHighRequireTest.Text); } } int intStandard = (chkOldStandard.Checked ? 1 : 0); double dblStandardTotal = 0.00; double dblStandardQA = 0.00; double dblStandardTest = 0.00; double dblStandardReplicated = 0.00; if (intStandard == 1) { if (panOldStandardProduction.Visible == true) { dblStandardTotal = double.Parse(txtOldStandardRequire.Text); if (panOldStandardReplication.Visible == true && ddlOldStandardReplicated.SelectedIndex == (ddlOldStandardReplicated.Items.Count - 1)) { dblStandardReplicated = double.Parse(txtOldStandardReplicated.Text); } } if (panOldStandardQA.Visible == true) { dblStandardQA = double.Parse(txtOldStandardRequireQA.Text); } if (panOldStandardTest.Visible == true) { dblStandardTest = double.Parse(txtOldStandardRequireTest.Text); } } int intLow = (chkOldLow.Checked ? 1 : 0); double dblLowTotal = 0.00; double dblLowQA = 0.00; double dblLowTest = 0.00; if (intLow == 1) { if (panOldLowProduction.Visible == true) { dblLowTotal = double.Parse(txtOldLowRequire.Text); } if (panOldLowQA.Visible == true) { dblLowQA = double.Parse(txtOldLowRequireQA.Text); } if (panOldLowTest.Visible == true) { dblLowTest = double.Parse(txtOldLowRequireTest.Text); } } oForecast.AddStorage(intID, intHigh, dblHighTotal, dblHighQA, dblHighTest, 0.00, "", 0.00, intStandard, dblStandardTotal, dblStandardQA, dblStandardTest, dblStandardReplicated, "", 0.00, intLow, dblLowTotal, dblLowQA, dblLowTest, 0.00, "", 0.00); } int intStorage = 0; if (radLater.Checked == true) { intStorage = -1; } else if (radYes.Checked == true) { intStorage = 1; } oForecast.UpdateStorage(intID, intStorage); return(radNo.Checked == true || radYes.Checked == true ? 1 : 0); }