Exemplo n.º 1
0
        void addPromotion()
        {
            try
            {
                string name     = promotionname_TextBox.Text.ToString();
                int    type     = int.Parse(DropDownList1.SelectedValue.ToString());
                string discount = promotiondiscount_TextBox.Text.ToString();

                promotions = new PromotionList();
                promotions.addPromotion(name, discount, type);
            }
            catch (Exception ex)
            {
                string error = ex.Message;
            }
            finally
            {
                this.selectPromotion();
            }
        }