Ejemplo n.º 1
0
        protected int Save()
        {
            oForecast.DeleteBackup(intID);
            if (radYes.Checked == true)
            {
                string strWeekly      = chkWeekly.Checked ? ddlWeekly.SelectedItem.Value : "0";
                string strMonthlyDay  = ddlMonthlyDay.SelectedItem.Value;
                string strMonthlyDays = ddlMonthlyDays.SelectedItem.Value;
                oForecast.AddBackup(intID, (chkDaily.Checked ? 1 : 0), (chkWeekly.Checked ? 1 : 0), strWeekly, (chkMonthly.Checked ? 1 : 0), strMonthlyDay, strMonthlyDays, 1, ddlTimeHour.SelectedItem.Value, ddlTimeSwitch.SelectedItem.Value, txtDate.Text, Int32.Parse(ddlLocation.SelectedItem.Value), txtCFPercent.Text, txtCFCompression.Text, ddlCFAverage.SelectedItem.Value, txtCFBackup.Text, txtCFArchive.Text, txtCFWindow.Text, txtCFSets.Text, ddlCDType.SelectedItem.Value, txtCDPercent.Text, txtCDCompression.Text, txtCDVersions.Text, txtCDWindow.Text, txtCDGrowth.Text, (txtAverage.Text == "" ? 0 : Int32.Parse(txtAverage.Text)), txtDocumentation.Text);
            }
            // Check to see if step is done
            int intBackup = 0;

            if (radLater.Checked == true)
            {
                intBackup = -1;
            }
            else if (radYes.Checked == true)
            {
                intBackup = 1;
            }
            oForecast.UpdateBackup(intID, intBackup);
            return(radNo.Checked == true || radYes.Checked == true || panShared.Visible == true ? 1 : 0);
        }