Graded Exercise #4 Array and Mainmenu Control Form 1: Password Entry
Graded Exercise #4 Array and Mainmenu Control Form 1: Password Entry
Note: No limit for password, if incorrect password will prompt the user to RETRY & CANCEL and
username should have an entered value otherwise will prompt the user to enter value for
username.
<File><Exit>
Will close the program
FORM 3
Logical Problems:
Double click Appliance item (List Box) then the selected item will be displayed to the
Appliance Sold (List Box) and Unit Price (List Box) (see example below)
Note: Be sure that you have enter value in the Quantity
If quantity is less than or equal to zero (0) it will prompt the user to input quantity.
Amount: Text Box will be based on the Appliance: Unit Price * Quantity
Example: Appliance sold: Electric Fan, Unit Price: 500, Quantity: 2 (see example below)
Sub-total Text Box will be based on the total item sold.
Example: Appliance Sold: Air Conditioner: 10,000.00 x 1 and Electric Fan: 500 x 2 (see
example below)
Choose Type of Payment: cash or Charge then, will enable Compute button
If Compute button is clicked; for CASH
Total Amount = Sub-total less 5% discount
If help then About is clicked will display a Form “About the program”
If button OK is clicked will close the form window.
Problem:
Compute for Total Amount based on the date of check-in and checkout.
Select room capacity, room type and payment type before clicking Compute button
otherwise, will prompt you with “No selected room capacity” or “No selected room
type” or “No selected type of payment”
Note: If the customer checked-in and checked-out on the same day will charge him/her
of 1 day.
FORM 1 CODES:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace Honrada
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace Honrada
{
public partial class Form2 : Form
{
public Form2()
{
InitializeComponent();
}
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace Honrada
{
public partial class Form3 : Form
{
public Form3()
{
InitializeComponent();
button2.Enabled = false;
button4.Enabled = false;
button5.Enabled = false;
button7.Enabled = false;
}
}
}
}
FORM 4 CODES:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace Honrada
{
public partial class Form4 : Form
{
public Form4()
{
InitializeComponent();
}
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace Number2
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
textBox2.Text = days.ToString();