protected void Binding_Delete(object sender, DataGridCommandEventArgs e) { BindingTemplate binding = bindings[e.Item.ItemIndex]; string name; if (null != binding.AccessPoint) { name = binding.AccessPoint.Value; } else { name = Localization.GetString("HEADING_BINDING"); } string key = binding.BindingKey; // // The user has not yet confirmed the delete operation, so display // a confirmation dialog. // string message = String.Format( Localization.GetString("TEXT_DELETE_CONFIRMATION"), name); Page.RegisterStartupScript( "Confirm", ClientScripts.Confirm( message, "editbinding.aspx?frames=" + (frames ? "true" : "false") + "&key=" + key + "&mode=delete&confirm=true&tab=1")); }
protected void Name_OnUpdate(object sender, DataGridCommandEventArgs e) { Page.Validate(); if (Page.IsValid) { int index = grid.EditItemIndex; DataGridItem item = grid.Items[index]; if (index >= names.Count) { names.Add(""); } Name name = names[index]; name.IsoLangCode = ((DropDownList)item.FindControl("language")).SelectedItem.Value; name.Value = ((TextBox)item.FindControl("name")).Text.Trim(); CheckBox checkbox = (CheckBox)item.FindControl("default"); if (index > 0 && null != checkbox && checkbox.Checked) { for (int i = index; i > 0; i--) { names[i] = names[i - 1]; } names[0] = name; index = 0; } parentEntity.Save(); if (0 == index && !IsDownlevel) { Page.RegisterStartupScript( "Reload", ClientScripts.ReloadExplorerPane( parentKey)); } grid.EditItemIndex = -1; CancelEditMode(); PopulateDataGrid(); } }
protected void InstanceInfo_Edit(object sender, DataGridCommandEventArgs e) { int index = e.Item.ItemIndex; if (frames) { Response.Write( ClientScripts.ReloadExplorerAndViewPanes("editinstanceinfo.aspx?frames=true&key=" + parent.BindingKey + "&index=" + index, parent.BindingKey + ":" + index)); Response.End(); } else { Response.Redirect("editinstanceinfo.aspx?frames=false&key=" + parent.BindingKey + "&index=" + index); Response.End(); } }
protected void Name_OnDelete(object sender, DataGridCommandEventArgs e) { int index = e.Item.ItemIndex; names.RemoveAt(index); parentEntity.Save(); PopulateDataGrid(); if (0 == index && !IsDownlevel) { Page.RegisterStartupScript( "Reload", ClientScripts.ReloadExplorerPane( parentKey)); } }
protected void Service_Edit(object sender, DataGridCommandEventArgs e) { string key = bindableServices[e.Item.ItemIndex].ServiceKey; if (frames) { Response.Write( ClientScripts.ReloadExplorerAndViewPanes("editservice.aspx?frames=true&key=" + key, key)); Response.End(); } else { Response.Redirect("editservice.aspx?frames=false&key=" + key); Response.End(); } }
protected void TModel_Edit(object sender, DataGridCommandEventArgs e) { string key = tModelInfos[e.Item.ItemIndex].TModelKey; if (frames) { // // Reload explorer and view panes. // Response.Write( ClientScripts.ReloadExplorerAndViewPanes("editmodel.aspx?frames=true&key=" + key, key)); } else { Response.Redirect("editmodel.aspx?frames=false&key=" + key); } }
protected void Service_Delete(object sender, DataGridCommandEventArgs e) { string name = bindableServices[e.Item.ItemIndex].Names[0].Value; string key = bindableServices[e.Item.ItemIndex].ServiceKey; // // The user has not yet confirmed the delete operation, so display // a confirmation dialog. // string message = String.Format( Localization.GetString("TEXT_DELETE_CONFIRMATION"), name); Page.RegisterStartupScript( "Confirm", ClientScripts.Confirm( message, "editservice.aspx?frames=" + (frames ? "true" : "false") + "&key=" + key + "&mode=delete&confirm=true&tab=1")); }
protected void ServiceProjection_View(object sender, DataGridCommandEventArgs e) { string key = bindableServiceProjections[e.Item.ItemIndex].ServiceKey; string root = ((Request.ApplicationPath == "/")?"":Request.ApplicationPath); if (frames) { string explkey = "sp:" + bindableServiceProjections[e.Item.ItemIndex].BusinessKey + ":" + key; Response.Write( ClientScripts.ReloadExplorerAndViewPanes(root + "/details/servicedetail.aspx?projectionContext=edit&frames=true&projectionKey=" + parentKey + "&key=" + key, explkey)); Response.End(); } else { Response.Redirect("editservice.aspx?frames=false&key=" + key); Response.End(); } }
protected void InstanceInfo_Delete(object sender, DataGridCommandEventArgs e) { int index = e.Item.ItemIndex; string name = Lookup.TModelName(instanceInfos[index].TModelKey); string key = parent.BindingKey; // // The user has not yet confirmed the delete operation, so display // a confirmation dialog. // string message = String.Format( Localization.GetString("TEXT_DELETE_CONFIRMATION"), name); Page.RegisterStartupScript( "Confirm", ClientScripts.Confirm( message, "editinstanceinfo.aspx?frames=" + (frames ? "true" : "false") + "&key=" + key + "&index=" + index + "&mode=delete&confirm=true&tab=1")); }