protected void CloseButtonClick_Click(object sender, EventArgs e) { VisibleSomeElements(true); ReportMultiView.SetActiveView(TemplateView); if (TemplateDesigner.template != null) { if (TemplateDesigner.template.Name != oldTemplateName) { FillDropDownList(); } } TemplateDesigner.template = null; // не засоряем ViewState oldTemplateName = null; if (TemplateDesigner.TemplateID != null) { GetInstanceList(); } }
protected void TemplateConstructorButton_Click(object sender, EventArgs e) { if (Frame.TemplateList.SelectedIndex == 0 || Frame.TemplateList.SelectedIndex == 1) { if (!AuthorizationRules.TemplateResolution(ActionType.create, Session["SystemUser.objID"].ToString())) { WarningMessageBoxAuthorization.Show(); return; } } else { if (!AuthorizationRules.TemplateResolution(ActionType.read, Session["SystemUser.objID"].ToString(), Frame.TemplateList.SelectedValue)) { WarningMessageBoxAuthorization.Show(); return; } } if (TemplateDesigner.template != null) { oldTemplateName = TemplateDesigner.template.Name; } TemplateDesigner.IsNotShowThis = false; TemplateDesigner.TemplateID = Frame.TemplateList.SelectedValue; TemplateDesigner.EntityID = Request["entity"]; TemplateDesigner.userID = Convert.ToInt32(Session["SystemUser.objID"]); TemplateDesigner.DataBind(); ReportMultiView.SetActiveView(TemplateDesignerView); VisibleSomeElements(false); }