/// <summary> /// BtnMoveDown click event handler. /// </summary> protected void btnMoveDown_Click(object sender, EventArgs e) { // Move node down in xml definition CheckoutProcess.MoveCheckoutProcessStepNodeDown(((ImageButton)sender).CommandArgument); // Update xml definition in viewstate CheckoutProcessXml = CheckoutProcess.GetXmlDefinition(); if (OnCheckoutProcessDefinitionUpdate != null) { OnCheckoutProcessDefinitionUpdate("movedown"); } ReloadData(); }
/// <summary> /// Handles unigrid actions. /// </summary> protected void ugSteps_OnAction(string actionName, object actionArgument) { // Name of checkout process step string stepName = ValidationHelper.GetString(actionArgument, ""); switch (actionName.ToLowerCSafe()) { case "up": // Move node up in xml CheckoutProcess.MoveCheckoutProcessStepNodeUp(stepName); // Update xml definition in view state CheckoutProcessXml = CheckoutProcess.GetXmlDefinition(); RaiseDefinitionUpdate("moveup"); ReloadData(); break; case "down": // Move node down in xml definition CheckoutProcess.MoveCheckoutProcessStepNodeDown(stepName); // Update xml definition in viewstate CheckoutProcessXml = CheckoutProcess.GetXmlDefinition(); RaiseDefinitionUpdate("movedown"); ReloadData(); break; case "edit": ListingMode = false; plcDefaultTypes.Visible = EnableDefaultCheckoutProcessTypes; // Load step data to the form CheckoutProcessStepInfo stepObj = CheckoutProcess.GetCheckoutProcessStepInfo(stepName); if (stepObj != null) { breadcrumbsText = ResHelper.LocalizeString(stepObj.Caption); txtStepCaption.Text = stepObj.Caption; txtStepControlPath.Text = stepObj.ControlPath; txtStepImageUrl.Text = stepObj.Icon; txtStepName.Text = stepObj.Name; chkLiveSite.Checked = stepObj.ShowOnLiveSite; chkCMSDeskOrder.Checked = stepObj.ShowInCMSDeskOrder; chkCMSDeskCustomer.Checked = stepObj.ShowInCMSDeskCustomer; chkCMSDeskOrderItems.Checked = stepObj.ShowInCMSDeskOrderItems; // Save original step name OriginalStepName = stepObj.Name; } break; case "delete": // Remove node from xml CheckoutProcess.RemoveCheckoutProcessStepNode(stepName); // Update xml definition in view state CheckoutProcessXml = CheckoutProcess.GetXmlDefinition(); RaiseDefinitionUpdate("delete"); ReloadData(); break; } }