Ejemplo n.º 1
0
        protected void btnSave_Click(Object sender, EventArgs e)
        {
            int intValid    = -1;
            int intComplete = Int32.Parse(rblComplete.SelectedValue);

            if (intComplete == 1)
            {
                oForecast.UpdateAnswerSetComplete(intId);
            }
            else
            {
                intValid = Int32.Parse(rblValid.SelectedValue);
                if (intValid == 1)
                {
                    if (txtCommitmentDate.Text != "")
                    {
                        oForecast.UpdateAnswerImplementation(intId, DateTime.Parse(txtCommitmentDate.Text));
                    }
                }
                else
                {
                    oForecast.DeleteAnswer(intId);
                }
            }
            oForecast.AddAnswerUpdate(intId, intComplete, intValid, txtComments.Text, intProfile);
            Response.Redirect(Request.Path + "?id=" + intId + "&update=success");
        }