Пример #1
0
    // counts old shopping carts
    protected void countButton_Click(object sender, EventArgs e)
    {
        byte days     = byte.Parse(daysList.SelectedItem.Value);
        int  oldItems = ShoppingCartAccess.CountOldCarts(days);

        if (oldItems == -1)
        {
            countLabel.Text = "Could not count the old shopping carts!";
        }
        else if (oldItems == 0)
        {
            countLabel.Text = "There are no old shopping carts.";
        }
        else
        {
            countLabel.Text = "There are " + oldItems.ToString() +
                              " old shopping carts.";
        }
    }
Пример #2
0
        protected void countButton_Click(object sender, EventArgs e)
        {
            byte days     = byte.Parse(daysList.SelectedItem.Value);
            int  oldItems = ShoppingCartAccess.CountOldCarts(days);

            if (oldItems == -1)
            {
                countLabel.Text = "Не могат да бъдат преброени!";
            }
            else if (oldItems == 0)
            {
                countLabel.Text = "Няма стари колички.";
            }
            else
            {
                countLabel.Text = "Има " + oldItems.ToString() +
                                  " стари колички.";
            }
        }