protected void CtrlItemCommand(object source, RepeaterCommandEventArgs e) { var cArg = e.CommandArgument.ToString(); var param = new string[3]; switch (e.CommandName.ToLower()) { case "addnew": var shipping = new ShippingData(_ctrlkey); shipping.AddNewRule(); shipping.Save(); Response.Redirect(Globals.NavigateURL(TabId, "", param), true); break; case "delete": if (Utils.IsNumeric(cArg)) { var shipping2 = new ShippingData(_ctrlkey); shipping2.RemoveRule(Convert.ToInt32(cArg)); shipping2.Save(); } Response.Redirect(Globals.NavigateURL(TabId, "", param), true); break; case "saveall": Update(); Response.Redirect(Globals.NavigateURL(TabId, "", param), true); break; case "cancel": Response.Redirect(Globals.NavigateURL(TabId, "", param), true); break; } }
private void AlterCost() { var info = new NBrightInfo(); var shipping = new ShippingData(_ctrlkey); info.XMLData = GenXmlFunctions.GetGenXml(rpDataH); var percentValue = info.GetXmlPropertyDouble("genxml/textbox/alterpercent"); shipping.UpdateCost(percentValue); shipping.Save(); //remove current setting from cache for reload Utils.RemoveCache("NBrightBuyShipping" + PortalSettings.Current.PortalId.ToString("")); }
private void Update() { var shipping = new ShippingData(_ctrlkey); shipping.Update(rpDataH); shipping.UpdateRule(rpData); shipping.Save(); if (StoreSettings.Current.DebugMode) { shipping.Info.XMLDoc.Save(PortalSettings.HomeDirectoryMapPath + "\\debug_Shipping.xml"); } //remove current setting from cache for reload Utils.RemoveCache("NBrightBuyShipping" + PortalSettings.Current.PortalId.ToString("")); }
private void Update() { var shipping = new ShippingData(_ctrlkey); shipping.Update(rpDataH); shipping.UpdateRule(rpData); shipping.Save(); if (StoreSettings.Current.DebugMode) shipping.Info.XMLDoc.Save(PortalSettings.HomeDirectoryMapPath + "\\debug_Shipping.xml"); //remove current setting from cache for reload Utils.RemoveCache("NBrightBuyShipping" + PortalSettings.Current.PortalId.ToString("")); }