8 Replies - 2091 Views - Last Post: 03 April 2009 - 06:36 PM Rate Topic: -----

#1 bugsfix  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 5
  • Joined: 05-February 09

JuiceBar School Project Question

Posted 05 February 2009 - 02:03 PM

Hello, Well I am new to the site as far as a registered member but have been "creeper" for a while

I am putting together this program for school where we have to make a "juice bar" application... It compiles with no errors and launches the form but when I try to use any of my buttons or anything nothing happens.... I am using visual studio 2008
If anyone could help or point me in the right direction it would help me out a lot.. thanks


using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace Ch04HandsOn
{
	public partial class JuiceBarForm : Form
	{
		//Declare class variables
		decimal itemPriceDecimal, totalOrderDecimal, totalSalesDecimal;
		int drinksInteger, ordersInteger;

		public JuiceBarForm()
		{
			InitializeComponent();
		}

		private void addToOrderButton_Click_1(object sender, EventArgs e)
		{
			// Add the current item price and quantity to the order.

			if (noSizeRadioButton.Checked)
			{
				MessageBox.Show("You must select a drink size.", 
				  "Missing required entry");
			}
			else
			{
				try
				{
					int quantityInteger = int.Parse(quantityTextBox.Text);
					if (quantityInteger != 0)
					{
						drinksInteger += quantityInteger;
						totalOrderDecimal += itemPriceDecimal * quantityInteger;
						orderCompleteButton.Enabled = true;

						//reset defaults for next item
						noSizeRadioButton.Checked = true;
						fruitJuiceRadioButton.Checked = true;
						vitaminPackCheckBox.Checked = false;
						energyBoosterCheckBox.Checked = false;
						ladiesCheckBox.Checked = false;
						itemPriceTextBox.Clear();
						quantityTextBox.Text = "1";
					}
					else
					{
						MessageBox.Show("Please enter a quantity.",
						  "Missing Required Entry");
					}
				}
				catch (FormatException)
				{
					MessageBox.Show("Invalid quantity.", "Data Entry Error");
					quantityTextBox.Focus();
					quantityTextBox.SelectAll();
				}
			}
}


		private void orderCompleteButton_Click_1(object sender, EventArgs e)
			{
			// Order is complete, add to summary and clear order.
			// Check if the last item was adde to the total.
			if (itemPriceTextBox.Text != "")
			{
				DialogResult responseDialogResult;
				string messageString = "Current Item not recorded, Add to order?";
				responseDialogResult = MessageBox.Show(messageString,
					"Verify Last Drink Purchase", MessageBoxButtons.YesNo,
					 MessageBoxIcon.Question);
				if (responseDialogResult == DialogResult.Yes)
				{
					addToOrderButton_Click_1(sender, e);
				}
			}
			
			//Display amount Due.
			string dueString = "Amount Due " + totalOrderDecimal.ToString("C");
			MessageBox.Show(dueString, "Order COmpelte");
			
			//Add to summary totals.
			ordersInteger++;
			totalSalesDecimal += totalOrderDecimal;
			
			//Reset buttons and total for new order.
			summaryButton.Enabled = true;
			orderCompleteButton.Enabled = false;
			totalOrderDecimal = 0m;
			
		}

			private void summaryButton_Click_1(object sender, EventArgs e)
		{
			//DIsokat tge sumamry ifnoirmun message box. 
			
			string summaryString = "Drinks Sold: " + drinksInteger.ToString()
				+ "\n\n" + "Number of Orders: " + ordersInteger.ToString()
				+ "\n\n" + "Total Sales: " + totalSalesDecimal.ToString("C");
			MessageBox.Show(summaryString, "Juice Bar Sales Summary",
				MessageBoxButtons.OK, MessageBoxIcon.Information);
		}

			private void exitButton_Click_1(object sender, EventArgs e)
		{
			// End the APplication.

			this.Close();

		}

		private void twelveOunceRadioButton_CheckedCHanged(object sender, EventArgs e)
		{
			//calculate and display the price for the selected item.
			//Handles all check boxes and radio buttons.
			int extraInteger = 0;

			if (twelveOunceRadioButton.Checked)
			{
				itemPriceDecimal = 3m;
			}
			else if (sixteenOunceRadioButton.Checked)
			{
				itemPriceDecimal = 3.5m;
			}
			else if (twentyOunceRadioButton.Checked)
			{
				itemPriceDecimal = 4m;
			}
			extraInteger = 0;
			if (vitaminPackCheckBox.Checked)
			{
				extraInteger++;
			}
			if (energyBoosterCheckBox.Checked)
			{
				extraInteger++;
			}
			if (ladiesCheckBox.Checked)
			{
				extraInteger++;
			}
			itemPriceDecimal += extraInteger * .5m;
			itemPriceTextBox.Text = itemPriceDecimal.ToString("C");
		}
	}
}



Is This A Good Question/Topic? 0
  • +

Replies To: JuiceBar School Project Question

#2 bugsfix  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 5
  • Joined: 05-February 09

Re: JuiceBar School Project Question

Posted 05 February 2009 - 02:26 PM

guess I have another problem.... the price for the 20oz ONLY shows up correctly IF i select 12oz first but not if Im changing it from 16oz... any ideas?
Was This Post Helpful? 0
  • +
  • -

#3 eclipsed4utoo  Icon User is offline

  • Not Your Ordinary Programmer
  • member icon

Reputation: 1524
  • View blog
  • Posts: 5,957
  • Joined: 21-March 08

Re: JuiceBar School Project Question

Posted 05 February 2009 - 04:20 PM

can you post the code from the "designer.cs" file?
Was This Post Helpful? 0
  • +
  • -

#4 bugsfix  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 5
  • Joined: 05-February 09

Re: JuiceBar School Project Question

Posted 06 February 2009 - 12:46 AM

namespace Ch04HandsOn
{
	partial class JuiceBarForm
	{
		/// <summary>
		/// Required designer variable.
		/// </summary>
		private System.ComponentModel.IContainer components = null;

		/// <summary>
		/// Clean up any resources being used.
		/// </summary>
		/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
		protected override void Dispose(bool disposing)
		{
			if (disposing && (components != null))
			{
				components.Dispose();
			}
			base.Dispose(disposing);
		}

		#region Windows Form Designer generated code

		/// <summary>
		/// Required method for Designer support - do not modify
		/// the contents of this method with the code editor.
		/// </summary>
		private void InitializeComponent()
		{
			this.groupBox1 = new System.Windows.Forms.GroupBox();
			this.noSizeRadioButton = new System.Windows.Forms.RadioButton();
			this.twentyOunceRadioButton = new System.Windows.Forms.RadioButton();
			this.sixteenOunceRadioButton = new System.Windows.Forms.RadioButton();
			this.twelveOunceRadioButton = new System.Windows.Forms.RadioButton();
			this.groupBox2 = new System.Windows.Forms.GroupBox();
			this.ladiesCheckBox = new System.Windows.Forms.CheckBox();
			this.energyBoosterCheckBox = new System.Windows.Forms.CheckBox();
			this.vitaminPackCheckBox = new System.Windows.Forms.CheckBox();
			this.groupBox3 = new System.Windows.Forms.GroupBox();
			this.wheatberrySmoothieRadioButton = new System.Windows.Forms.RadioButton();
			this.strawberryBananaRadioButton = new System.Windows.Forms.RadioButton();
			this.pomegranateSmoothieRadioButton = new System.Windows.Forms.RadioButton();
			this.label2 = new System.Windows.Forms.Label();
			this.veggieJuiceRadioButton = new System.Windows.Forms.RadioButton();
			this.fruitJuiceRadioButton = new System.Windows.Forms.RadioButton();
			this.label1 = new System.Windows.Forms.Label();
			this.label3 = new System.Windows.Forms.Label();
			this.label4 = new System.Windows.Forms.Label();
			this.quantityTextBox = new System.Windows.Forms.TextBox();
			this.itemPriceTextBox = new System.Windows.Forms.TextBox();
			this.addToOrderButton = new System.Windows.Forms.Button();
			this.orderCompleteButton = new System.Windows.Forms.Button();
			this.summaryButton = new System.Windows.Forms.Button();
			this.exitButton = new System.Windows.Forms.Button();
			this.groupBox1.SuspendLayout();
			this.groupBox2.SuspendLayout();
			this.groupBox3.SuspendLayout();
			this.SuspendLayout();
			// 
			// groupBox1
			// 
			this.groupBox1.Controls.Add(this.noSizeRadioButton);
			this.groupBox1.Controls.Add(this.twentyOunceRadioButton);
			this.groupBox1.Controls.Add(this.sixteenOunceRadioButton);
			this.groupBox1.Controls.Add(this.twelveOunceRadioButton);
			this.groupBox1.Location = new System.Drawing.Point(3, 8);
			this.groupBox1.Name = "groupBox1";
			this.groupBox1.Size = new System.Drawing.Size(249, 110);
			this.groupBox1.TabIndex = 0;
			this.groupBox1.TabStop = false;
			this.groupBox1.Text = "Size";
			this.groupBox1.Enter += new System.EventHandler(this.twelveOunceRadioButton_CheckedChanged);
			// 
			// noSizeRadioButton
			// 
			this.noSizeRadioButton.AutoSize = true;
			this.noSizeRadioButton.Checked = true;
			this.noSizeRadioButton.Location = new System.Drawing.Point(101, 88);
			this.noSizeRadioButton.Name = "noSizeRadioButton";
			this.noSizeRadioButton.Size = new System.Drawing.Size(85, 17);
			this.noSizeRadioButton.TabIndex = 3;
			this.noSizeRadioButton.TabStop = true;
			this.noSizeRadioButton.Text = "radioButton1";
			this.noSizeRadioButton.UseVisualStyleBackColor = true;
			this.noSizeRadioButton.Visible = false;
			// 
			// twentyOunceRadioButton
			// 
			this.twentyOunceRadioButton.AutoSize = true;
			this.twentyOunceRadioButton.Location = new System.Drawing.Point(9, 65);
			this.twentyOunceRadioButton.Name = "twentyOunceRadioButton";
			this.twentyOunceRadioButton.Size = new System.Drawing.Size(72, 17);
			this.twentyOunceRadioButton.TabIndex = 2;
			this.twentyOunceRadioButton.Text = "&20 Ounce";
			this.twentyOunceRadioButton.UseVisualStyleBackColor = true;
			// 
			// sixteenOunceRadioButton
			// 
			this.sixteenOunceRadioButton.AutoSize = true;
			this.sixteenOunceRadioButton.Location = new System.Drawing.Point(9, 42);
			this.sixteenOunceRadioButton.Name = "sixteenOunceRadioButton";
			this.sixteenOunceRadioButton.Size = new System.Drawing.Size(72, 17);
			this.sixteenOunceRadioButton.TabIndex = 1;
			this.sixteenOunceRadioButton.Text = "&16 Ounce";
			this.sixteenOunceRadioButton.UseVisualStyleBackColor = true;
			// 
			// twelveOunceRadioButton
			// 
			this.twelveOunceRadioButton.AutoSize = true;
			this.twelveOunceRadioButton.Location = new System.Drawing.Point(9, 19);
			this.twelveOunceRadioButton.Name = "twelveOunceRadioButton";
			this.twelveOunceRadioButton.Size = new System.Drawing.Size(72, 17);
			this.twelveOunceRadioButton.TabIndex = 0;
			this.twelveOunceRadioButton.Text = "12 &Ounce";
			this.twelveOunceRadioButton.UseVisualStyleBackColor = true;
			this.twelveOunceRadioButton.CheckedChanged += new System.EventHandler(this.twelveOunceRadioButton_CheckedChanged);
			// 
			// groupBox2
			// 
			this.groupBox2.Controls.Add(this.ladiesCheckBox);
			this.groupBox2.Controls.Add(this.energyBoosterCheckBox);
			this.groupBox2.Controls.Add(this.vitaminPackCheckBox);
			this.groupBox2.Location = new System.Drawing.Point(3, 124);
			this.groupBox2.Name = "groupBox2";
			this.groupBox2.Size = new System.Drawing.Size(249, 97);
			this.groupBox2.TabIndex = 1;
			this.groupBox2.TabStop = false;
			this.groupBox2.Text = "&Extra - $0.50 each";
			// 
			// ladiesCheckBox
			// 
			this.ladiesCheckBox.AutoSize = true;
			this.ladiesCheckBox.Location = new System.Drawing.Point(9, 64);
			this.ladiesCheckBox.Name = "ladiesCheckBox";
			this.ladiesCheckBox.Size = new System.Drawing.Size(93, 17);
			this.ladiesCheckBox.TabIndex = 2;
			this.ladiesCheckBox.Text = "For the &Ladies";
			this.ladiesCheckBox.UseVisualStyleBackColor = true;
			// 
			// energyBoosterCheckBox
			// 
			this.energyBoosterCheckBox.AutoSize = true;
			this.energyBoosterCheckBox.Location = new System.Drawing.Point(9, 42);
			this.energyBoosterCheckBox.Name = "energyBoosterCheckBox";
			this.energyBoosterCheckBox.Size = new System.Drawing.Size(98, 17);
			this.energyBoosterCheckBox.TabIndex = 1;
			this.energyBoosterCheckBox.Text = "Energy &Booster";
			this.energyBoosterCheckBox.UseVisualStyleBackColor = true;
			// 
			// vitaminPackCheckBox
			// 
			this.vitaminPackCheckBox.AutoSize = true;
			this.vitaminPackCheckBox.Location = new System.Drawing.Point(9, 19);
			this.vitaminPackCheckBox.Name = "vitaminPackCheckBox";
			this.vitaminPackCheckBox.Size = new System.Drawing.Size(88, 17);
			this.vitaminPackCheckBox.TabIndex = 0;
			this.vitaminPackCheckBox.Text = "&Vitamin Pack";
			this.vitaminPackCheckBox.UseVisualStyleBackColor = true;
			// 
			// groupBox3
			// 
			this.groupBox3.Controls.Add(this.wheatberrySmoothieRadioButton);
			this.groupBox3.Controls.Add(this.strawberryBananaRadioButton);
			this.groupBox3.Controls.Add(this.pomegranateSmoothieRadioButton);
			this.groupBox3.Controls.Add(this.label2);
			this.groupBox3.Controls.Add(this.veggieJuiceRadioButton);
			this.groupBox3.Controls.Add(this.fruitJuiceRadioButton);
			this.groupBox3.Controls.Add(this.label1);
			this.groupBox3.Location = new System.Drawing.Point(286, 8);
			this.groupBox3.Name = "groupBox3";
			this.groupBox3.Size = new System.Drawing.Size(216, 213);
			this.groupBox3.TabIndex = 2;
			this.groupBox3.TabStop = false;
			this.groupBox3.Text = "Select the drink type";
			// 
			// wheatberrySmoothieRadioButton
			// 
			this.wheatberrySmoothieRadioButton.AutoSize = true;
			this.wheatberrySmoothieRadioButton.Location = new System.Drawing.Point(9, 159);
			this.wheatberrySmoothieRadioButton.Name = "wheatberrySmoothieRadioButton";
			this.wheatberrySmoothieRadioButton.Size = new System.Drawing.Size(81, 17);
			this.wheatberrySmoothieRadioButton.TabIndex = 6;
			this.wheatberrySmoothieRadioButton.TabStop = true;
			this.wheatberrySmoothieRadioButton.Text = "&WheatBerry";
			this.wheatberrySmoothieRadioButton.UseVisualStyleBackColor = true;
			// 
			// strawberryBananaRadioButton
			// 
			this.strawberryBananaRadioButton.AutoSize = true;
			this.strawberryBananaRadioButton.Location = new System.Drawing.Point(9, 136);
			this.strawberryBananaRadioButton.Name = "strawberryBananaRadioButton";
			this.strawberryBananaRadioButton.Size = new System.Drawing.Size(115, 17);
			this.strawberryBananaRadioButton.TabIndex = 5;
			this.strawberryBananaRadioButton.TabStop = true;
			this.strawberryBananaRadioButton.Text = "&Strawberry Banana";
			this.strawberryBananaRadioButton.UseVisualStyleBackColor = true;
			// 
			// pomegranateSmoothieRadioButton
			// 
			this.pomegranateSmoothieRadioButton.AutoSize = true;
			this.pomegranateSmoothieRadioButton.Location = new System.Drawing.Point(9, 113);
			this.pomegranateSmoothieRadioButton.Name = "pomegranateSmoothieRadioButton";
			this.pomegranateSmoothieRadioButton.Size = new System.Drawing.Size(88, 17);
			this.pomegranateSmoothieRadioButton.TabIndex = 4;
			this.pomegranateSmoothieRadioButton.TabStop = true;
			this.pomegranateSmoothieRadioButton.Text = "&Pomegranate";
			this.pomegranateSmoothieRadioButton.UseVisualStyleBackColor = true;
			// 
			// label2
			// 
			this.label2.AutoSize = true;
			this.label2.Location = new System.Drawing.Point(6, 97);
			this.label2.Name = "label2";
			this.label2.Size = new System.Drawing.Size(56, 13);
			this.label2.TabIndex = 3;
			this.label2.Text = "Smoothies";
			// 
			// veggieJuiceRadioButton
			// 
			this.veggieJuiceRadioButton.AutoSize = true;
			this.veggieJuiceRadioButton.Checked = true;
			this.veggieJuiceRadioButton.Location = new System.Drawing.Point(17, 58);
			this.veggieJuiceRadioButton.Name = "veggieJuiceRadioButton";
			this.veggieJuiceRadioButton.Size = new System.Drawing.Size(58, 17);
			this.veggieJuiceRadioButton.TabIndex = 2;
			this.veggieJuiceRadioButton.TabStop = true;
			this.veggieJuiceRadioButton.Text = "Ve&ggie";
			this.veggieJuiceRadioButton.UseVisualStyleBackColor = true;
			// 
			// fruitJuiceRadioButton
			// 
			this.fruitJuiceRadioButton.AutoSize = true;
			this.fruitJuiceRadioButton.Checked = true;
			this.fruitJuiceRadioButton.Location = new System.Drawing.Point(17, 35);
			this.fruitJuiceRadioButton.Name = "fruitJuiceRadioButton";
			this.fruitJuiceRadioButton.Size = new System.Drawing.Size(45, 17);
			this.fruitJuiceRadioButton.TabIndex = 1;
			this.fruitJuiceRadioButton.TabStop = true;
			this.fruitJuiceRadioButton.Text = "&Fruit";
			this.fruitJuiceRadioButton.UseVisualStyleBackColor = true;
			// 
			// label1
			// 
			this.label1.AutoSize = true;
			this.label1.Location = new System.Drawing.Point(6, 19);
			this.label1.Name = "label1";
			this.label1.Size = new System.Drawing.Size(37, 13);
			this.label1.TabIndex = 0;
			this.label1.Text = "Juices";
			// 
			// label3
			// 
			this.label3.AutoSize = true;
			this.label3.Location = new System.Drawing.Point(9, 238);
			this.label3.Name = "label3";
			this.label3.Size = new System.Drawing.Size(46, 13);
			this.label3.TabIndex = 3;
			this.label3.Text = "&Quantity";
			// 
			// label4
			// 
			this.label4.AutoSize = true;
			this.label4.Location = new System.Drawing.Point(9, 266);
			this.label4.Name = "label4";
			this.label4.Size = new System.Drawing.Size(54, 13);
			this.label4.TabIndex = 4;
			this.label4.Text = "Item Price";
			// 
			// quantityTextBox
			// 
			this.quantityTextBox.Location = new System.Drawing.Point(69, 235);
			this.quantityTextBox.Name = "quantityTextBox";
			this.quantityTextBox.Size = new System.Drawing.Size(26, 20);
			this.quantityTextBox.TabIndex = 5;
			// 
			// itemPriceTextBox
			// 
			this.itemPriceTextBox.Location = new System.Drawing.Point(69, 263);
			this.itemPriceTextBox.Name = "itemPriceTextBox";
			this.itemPriceTextBox.ReadOnly = true;
			this.itemPriceTextBox.Size = new System.Drawing.Size(86, 20);
			this.itemPriceTextBox.TabIndex = 6;
			this.itemPriceTextBox.TabStop = false;
			// 
			// addToOrderButton
			// 
			this.addToOrderButton.Location = new System.Drawing.Point(382, 227);
			this.addToOrderButton.Name = "addToOrderButton";
			this.addToOrderButton.Size = new System.Drawing.Size(120, 24);
			this.addToOrderButton.TabIndex = 7;
			this.addToOrderButton.Text = "&Add to Order";
			this.addToOrderButton.UseVisualStyleBackColor = true;
			this.addToOrderButton.Click += new System.EventHandler(this.addToOrderButton_Click_1);
			// 
			// orderCompleteButton
			// 
			this.orderCompleteButton.Enabled = false;
			this.orderCompleteButton.Location = new System.Drawing.Point(380, 257);
			this.orderCompleteButton.Name = "orderCompleteButton";
			this.orderCompleteButton.Size = new System.Drawing.Size(122, 22);
			this.orderCompleteButton.TabIndex = 8;
			this.orderCompleteButton.Text = "Order &Complete";
			this.orderCompleteButton.UseVisualStyleBackColor = true;
			this.orderCompleteButton.Click += new System.EventHandler(this.orderCompleteButton_Click);
			// 
			// summaryButton
			// 
			this.summaryButton.Enabled = false;
			this.summaryButton.Location = new System.Drawing.Point(379, 285);
			this.summaryButton.Name = "summaryButton";
			this.summaryButton.Size = new System.Drawing.Size(123, 25);
			this.summaryButton.TabIndex = 9;
			this.summaryButton.Text = "Summary &Report";
			this.summaryButton.UseVisualStyleBackColor = true;
			this.summaryButton.Click += new System.EventHandler(this.summaryButton_Click_1);
			// 
			// exitButton
			// 
			this.exitButton.DialogResult = System.Windows.Forms.DialogResult.Cancel;
			this.exitButton.Location = new System.Drawing.Point(380, 316);
			this.exitButton.Name = "exitButton";
			this.exitButton.Size = new System.Drawing.Size(122, 25);
			this.exitButton.TabIndex = 10;
			this.exitButton.Text = "E&xit";
			this.exitButton.UseVisualStyleBackColor = true;
			this.exitButton.Click += new System.EventHandler(this.exitButton_Click);
			// 
			// JuiceBarForm
			// 
			this.AcceptButton = this.addToOrderButton;
			this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
			this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
			this.CancelButton = this.exitButton;
			this.ClientSize = new System.Drawing.Size(508, 369);
			this.Controls.Add(this.exitButton);
			this.Controls.Add(this.summaryButton);
			this.Controls.Add(this.orderCompleteButton);
			this.Controls.Add(this.addToOrderButton);
			this.Controls.Add(this.itemPriceTextBox);
			this.Controls.Add(this.quantityTextBox);
			this.Controls.Add(this.label4);
			this.Controls.Add(this.label3);
			this.Controls.Add(this.groupBox3);
			this.Controls.Add(this.groupBox2);
			this.Controls.Add(this.groupBox1);
			this.Name = "JuiceBarForm";
			this.Text = "Juice Bar Orders";
			this.groupBox1.ResumeLayout(false);
			this.groupBox1.PerformLayout();
			this.groupBox2.ResumeLayout(false);
			this.groupBox2.PerformLayout();
			this.groupBox3.ResumeLayout(false);
			this.groupBox3.PerformLayout();
			this.ResumeLayout(false);
			this.PerformLayout();

		}

		#endregion

		private System.Windows.Forms.GroupBox groupBox1;
		private System.Windows.Forms.RadioButton noSizeRadioButton;
		private System.Windows.Forms.RadioButton twentyOunceRadioButton;
		private System.Windows.Forms.RadioButton sixteenOunceRadioButton;
		private System.Windows.Forms.RadioButton twelveOunceRadioButton;
		private System.Windows.Forms.GroupBox groupBox2;
		private System.Windows.Forms.CheckBox ladiesCheckBox;
		private System.Windows.Forms.CheckBox energyBoosterCheckBox;
		private System.Windows.Forms.CheckBox vitaminPackCheckBox;
		private System.Windows.Forms.GroupBox groupBox3;
		private System.Windows.Forms.RadioButton fruitJuiceRadioButton;
		private System.Windows.Forms.Label label1;
		private System.Windows.Forms.RadioButton wheatberrySmoothieRadioButton;
		private System.Windows.Forms.RadioButton strawberryBananaRadioButton;
		private System.Windows.Forms.RadioButton pomegranateSmoothieRadioButton;
		private System.Windows.Forms.Label label2;
		private System.Windows.Forms.RadioButton veggieJuiceRadioButton;
		private System.Windows.Forms.Label label3;
		private System.Windows.Forms.Label label4;
		private System.Windows.Forms.TextBox quantityTextBox;
		private System.Windows.Forms.TextBox itemPriceTextBox;
		private System.Windows.Forms.Button addToOrderButton;
		private System.Windows.Forms.Button orderCompleteButton;
		private System.Windows.Forms.Button summaryButton;
		private System.Windows.Forms.Button exitButton;
	}
}


Was This Post Helpful? 0
  • +
  • -

#5 itlee  Icon User is offline

  • D.I.C Head

Reputation: 7
  • View blog
  • Posts: 55
  • Joined: 16-July 08

Re: JuiceBar School Project Question

Posted 06 February 2009 - 05:40 AM

View Postbugsfix, on 5 Feb, 2009 - 09:26 PM, said:

guess I have another problem.... the price for the 20oz ONLY shows up correctly IF i select 12oz first but not if Im changing it from 16oz... any ideas?


The controls are not connected to the events, check the event properties of the controls in the form designer.
Was This Post Helpful? 0
  • +
  • -

#6 eclipsed4utoo  Icon User is offline

  • Not Your Ordinary Programmer
  • member icon

Reputation: 1524
  • View blog
  • Posts: 5,957
  • Joined: 21-March 08

Re: JuiceBar School Project Question

Posted 06 February 2009 - 06:08 AM

by the looks of it, you need to get a beginner's book to programming in .Net and READ it. Looks like you created the events yourself without attaching them to the controls.

Just so you know, VS will create the events for you. For example, if you have a button on a form, just open up the designer for the form, and double-click. It will create the Click event for you.
Was This Post Helpful? 0
  • +
  • -

#7 Scott74  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 2
  • Joined: 17-February 09

Re: JuiceBar School Project Question

Posted 19 February 2009 - 09:16 PM

View Posteclipsed4utoo, on 6 Feb, 2009 - 05:08 AM, said:

by the looks of it, you need to get a beginner's book to programming in .Net and READ it. Looks like you created the events yourself without attaching them to the controls.


I understand your frustration, believe me. The problem is, this code is directly out of a beginning textbook on coding in C#. We're supposed to learn from it, but it doesn't work correctly, and we don't have the knowledge to understand what went wrong. Do you mind sharing where, exactly, the error might be?
Was This Post Helpful? 0
  • +
  • -

#8 itlee  Icon User is offline

  • D.I.C Head

Reputation: 7
  • View blog
  • Posts: 55
  • Joined: 16-July 08

Re: JuiceBar School Project Question

Posted 21 February 2009 - 10:13 AM

View PostScott74, on 20 Feb, 2009 - 04:16 AM, said:

I understand your frustration, believe me. The problem is, this code is directly out of a beginning textbook on coding in C#. We're supposed to learn from it, but it doesn't work correctly, and we don't have the knowledge to understand what went wrong. Do you mind sharing where, exactly, the error might be?



As I already said the controls are not connected to the events, check the event properties of the controls in the form designer. You can also double click the event in the property window which will create the event outline in the code file.

I think thats the point about the book, that it is slightly wrong which encourages you to do some thinking to make it work. As eclipsed4utoo said get yourself a book or read the MSDN Help to learn more, there are plenty of tutorials in MSDN.

itlee.
Was This Post Helpful? 0
  • +
  • -

#9 Scott74  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 2
  • Joined: 17-February 09

Re: JuiceBar School Project Question

Posted 03 April 2009 - 06:36 PM

Thanks for your help! I finally figured it out. You were right, of course :)

Scott74
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1