Ejemplo n.º 1
0
        private void OrderForm_Load(object sender, EventArgs e)
        {
            ConditionTextBox.Text = P.Condition;
            PlatformTextBox.Text  = P.Platform;
            ManufacTextBox.Text   = P.Manufac;
            ModelTextBox.Text     = P.Model;

            SpecsListBox.Items.Clear();
            SpecsListBox.Items.Add(P.Lcd);
            SpecsListBox.Items.Add("");
            SpecsListBox.Items.Add(P.Memory);
            SpecsListBox.Items.Add("");
            SpecsListBox.Items.Add(P.CpuBrand);
            SpecsListBox.Items.Add("");
            SpecsListBox.Items.Add(P.CpuType);
            SpecsListBox.Items.Add("");
            SpecsListBox.Items.Add(P.CpuNumber);
            SpecsListBox.Items.Add("");
            SpecsListBox.Items.Add(P.CpuSpeed);
            SpecsListBox.Items.Add("");
            SpecsListBox.Items.Add(P.Hdd);
            SpecsListBox.Items.Add("");
            SpecsListBox.Items.Add(P.GpuType);
            SpecsListBox.Items.Add("");
            SpecsListBox.Items.Add(P.Webcam);
            SpecsListBox.Items.Add("");
            SpecsListBox.Items.Add(P.OS);


            // Calculating Sales Tax 13 % and Total
            PriceTextBox.Text    = P.Cost.ToString();
            SalesTaxTextBox.Text = ((P.Cost / 100) * 13).ToString();
            TotalTextBox.Text    = (((P.Cost / 100) * 13) + P.Cost).ToString();

            // Load a random image
            int randomImage = new Random().Next(1, 4);

            ProductImageBox.Load(@"" + randomImage + ".jpg");
        }
        private void showSelectedItemImage()
        {
            int rand = new Random().Next(1, 5);

            ProductImageBox.Load(@"../../Resources/" + rand + ".jpg");
        }