Пример #1
0
        protected void btnSave_ServerClick(object sender, System.EventArgs e)
        {
            Page.Validate();
            if (!Page.IsValid)
            {
                return;
            }

            txtTitle.Text       = HttpUtility.HtmlEncode(txtTitle.Text);
            txtDescription.Text = HttpUtility.HtmlEncode(txtDescription.Text);

            Issue2.UpdateGeneralInfo(IncidentId, txtTitle.Text, txtDescription.Text, int.Parse(ddlType.SelectedValue), int.Parse(ddlSeverity.SelectedValue));
            Issue2.UpdatePriority(IncidentId, int.Parse(ddlPriority.SelectedValue));

            if (!String.IsNullOrEmpty(Command))                 // popup mode
            {
                CommandParameters cp = new CommandParameters(Command);
                Mediachase.Ibn.Web.UI.WebControls.CommandHandler.RegisterCloseOpenedFrameScript(this.Page, cp.ToString());
            }
            else
            {
                Page.ClientScript.RegisterStartupScript(this.GetType(), Guid.NewGuid().ToString(),
                                                        "try {window.opener.top.frames['right'].location.href='../Incidents/IncidentView.aspx?IncidentId=" + IncidentId + "';}" +
                                                        "catch (e){} window.close();", true);
            }
        }