Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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 Task3
- {
- public partial class Procedures : Form
- {
- int nudEarsCleanAndFlushOldValue;
- int nudLuxationOldValue;
- int nudSlingOldValue;
- int nudWoundSoreOldValue;
- int nudLacerationsOldValue;
- int nudBloodPressureOldValue;
- int nudECGOldValue;
- int nudTeethExtractionOldValue;
- int nudCatheterOldValue;
- int nudBiopsyOldValue;
- int nudRadiographOldValue;
- int nudPotassiumOldValue;
- int nudIVOldValue;
- public static string ProceduresTotal = "";
- public Procedures()
- {
- InitializeComponent();
- }
- private void btnPrevious_Click(object sender, EventArgs e) //Previous button
- {
- Form Start = new Medication();
- this.Hide();
- Start.Show();
- }
- private void btnExit_Click(object sender, EventArgs e)
- {
- Application.Exit();
- }
- private void btnNextForm4_Click(object sender, EventArgs e)
- {
- Form finish = new Receipt();
- this.Hide();
- finish.Show();
- ProceduresTotal = price.Text;
- }
- private decimal Calculate(int count, string nudName)
- {
- decimal price;
- decimal result = 0;
- switch (nudName)
- {
- case "UpdownEarsCleanAndFlush":
- count -= nudEarsCleanAndFlushOldValue;
- price = 8.00m;
- result = price * count;
- break;
- case "UpdownLuxation":
- count -= nudLuxationOldValue;
- price = 48.67m;
- result = price * count;
- break;
- case "UpdownSling":
- count -= nudSlingOldValue;
- price = 1.20m;
- result = price * count;
- break;
- case "UpdownWoundsore":
- count -= nudWoundSoreOldValue;
- price = 2.99m;
- result = price * count;
- break;
- case "UpdownLacerations":
- count -= nudLacerationsOldValue;
- price = 98.00m;
- result = price * count;
- break;
- case "UpDownBloodPressure":
- count -= nudBloodPressureOldValue;
- price = 0.95m;
- result = price * count;
- break;
- case "UpDownECG":
- count -= nudECGOldValue;
- price = 133.45m;
- result = price * count;
- break;
- case "UpDownTeethExtraction":
- count -= nudTeethExtractionOldValue;
- price = 96.55m;
- result = price * count;
- break;
- case "UpDownCatheter":
- count -= nudCatheterOldValue;
- price = 35.00m;
- result = price * count;
- break;
- case "UpDownBiopsy":
- count -= nudBiopsyOldValue;
- price = 389.00m;
- result = price * count;
- break;
- case "UpDownRadiograph":
- count -= nudRadiographOldValue;
- price = 10.29m;
- result = price * count;
- break;
- case "UpDownPotassium":
- count -= nudPotassiumOldValue;
- price = 0.45m;
- result = price * count;
- break;
- case "UpDownIV":
- count -= nudIVOldValue;
- price = 3.90m;
- result = price * count;
- break;
- //...add other cases for different medicine
- default:
- break;
- }
- return result;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement