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); } }
protected void PriorityList_ItemCommand(object source, DataListCommandEventArgs e) { int priorityId = int.Parse(e.CommandArgument.ToString()); if (ObjectTypeId == (int)ObjectTypes.Task) { Task2.UpdatePriority(ObjectId, priorityId); } else if (ObjectTypeId == (int)ObjectTypes.ToDo) { ToDo2.UpdatePriority(ObjectId, priorityId); } else if (ObjectTypeId == (int)ObjectTypes.Issue) { Issue2.UpdatePriority(ObjectId, priorityId); } else if (ObjectTypeId == (int)ObjectTypes.Document) { if (AssignmentId.HasValue) { AssignmentEntity assignment = (AssignmentEntity)BusinessManager.Load(AssignmentEntity.ClassName, (PrimaryKeyId)AssignmentId.Value); if (priorityId == (int)Priority.Low) { assignment.Priority = (int)AssignmentPriority.Low; } else if (priorityId == (int)Priority.Normal) { assignment.Priority = (int)AssignmentPriority.Normal; } else if (priorityId == (int)Priority.High) { assignment.Priority = (int)AssignmentPriority.High; } else if (priorityId == (int)Priority.VeryHigh) { assignment.Priority = (int)AssignmentPriority.VeryHigh; } else { assignment.Priority = (int)AssignmentPriority.Urgent; } BusinessManager.Update(assignment); } } CommandParameters cp = new CommandParameters(CommandName); Mediachase.Ibn.Web.UI.WebControls.CommandHandler.RegisterCloseOpenedFrameScript(this.Page, cp.ToString(), true); }