protected void submitEditPriceLevel(object sender, EventArgs e) { PriceLevelBusiness business = new PriceLevelBusiness(); string previousPriceLevel = (string)Session["EditPrice"]; string newPriceLevel = pricelevel.Text; bool activated = CheckBox1.Checked; int valueCheckBox; if (activated) { valueCheckBox = 1; } else { valueCheckBox = 0; } string error = business.editPriceLevel(previousPriceLevel, newPriceLevel, valueCheckBox); if (error != null) { Errors.Text = error; } else { Response.Redirect("PriceLevel.aspx"); } }
protected void deletePriceLevel(object sender, EventArgs e) { PriceLevelBusiness business = new PriceLevelBusiness(); string priceLevelToDelete = (string)Session["EditPrice"];; business.deletePriceLevel(priceLevelToDelete); Response.Redirect("PriceLevel.aspx"); }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { PriceLevelBusiness business = new PriceLevelBusiness(); List <string> priceLevelList = business.getPriceLevels(); showPriceLevels(priceLevelList); Session["PriceLeveslList"] = priceLevelList; } else { List <string> priceLevelList = (List <string>)Session["PriceLeveslList"]; showPriceLevels(priceLevelList); } }
protected void CreatePriceLevel(object sender, EventArgs e) { PriceLevelBusiness business = new PriceLevelBusiness(); string newPriceLevel = price.Text; int state = 1; string error = business.insertPriceLevel(newPriceLevel, state); if (error != null) { Errors.Text = error; } else { Response.Redirect("PriceLevel.aspx"); } }