Guest User

Untitled

a guest
Jan 23rd, 2018
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 24.51 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.ComponentModel;
  4. using System.Data;
  5. using System.Drawing;
  6. using System.Linq;
  7. using System.Text;
  8. using System.Threading.Tasks;
  9. using System.Windows.Forms;
  10.  
  11. namespace Task3
  12. {
  13.  
  14. public partial class Medication : Form
  15. {
  16. int nudAntibiotic7OldValue;
  17. int nudAntibiotic14OldValue;
  18. int nudFleeAndMiteOldValue;
  19. int nudHeartwormOldValue;
  20. int nudAnesGasto30mOldValue;
  21. int nudAnesgasafter30mOldValue;
  22. int nudFentanylOldValue;
  23. int nudFrontlineOldValue;
  24. int nudAnalgesiaOldValue;
  25. int nudBaytrillOldValue;
  26. int nudMetronidazoleOldValue;
  27. int nudRimadylOldValue;
  28. int nudDrontalSmalldogOldValue;
  29. int nudDrontalLargedogOldValue;
  30. int nudCanineRabiesOldValue;
  31.  
  32. public Medication()
  33. {
  34. InitializeComponent();
  35. }
  36.  
  37. public static string PriceMedication = "";
  38.  
  39.  
  40. private void btnExit_Click(object sender, EventArgs e) //Exit button
  41. {
  42. Application.Exit();
  43. }
  44.  
  45. private void btnPrevious_Click(object sender, EventArgs e) //Previous button
  46. {
  47. Form Start = new ClientData();
  48. this.Hide();
  49. Start.Show();
  50. }
  51.  
  52. private void btnNextForm3_Click(object sender, EventArgs e)
  53. {
  54. Form Start = new Procedures();
  55. this.Hide();
  56. Start.Show();
  57.  
  58. PriceMedication = priceTotal.Text;
  59. }
  60.  
  61. private decimal Calculate(int count, string nudName)
  62. {
  63. decimal price;
  64. decimal result = 0;
  65.  
  66. switch (nudName)
  67. {
  68. case "UpdownAntibiotic7":
  69. count -= nudAntibiotic7OldValue;
  70. price = 19.60m;
  71. result = price * count;
  72. break;
  73.  
  74. case "UpdownAntibiotic14":
  75. count -= nudAntibiotic14OldValue;
  76. price = 25.20m;
  77. result = price * count;
  78. break;
  79.  
  80. case "UpdownFleeAndMite":
  81. count -= nudAntibiotic14OldValue;
  82. price = 6.75m;
  83. result = price * count;
  84. break;
  85.  
  86. case "UpdownHeartworm":
  87. count -= nudHeartwormOldValue;
  88. price = 12.05m;
  89. result = price * count;
  90. break;
  91.  
  92. case "UpdownAnesGasTo30min":
  93. count -= nudAnesGasto30mOldValue;
  94. price = 15.97m;
  95. result = price * count;
  96. break;
  97.  
  98. case "UpdownAnesGasAfter30min":
  99. count -= nudAnesgasafter30mOldValue;
  100. price = 25.97m;
  101. result = price * count;
  102. break;
  103.  
  104. case "UpdownFentanyl":
  105. count -= nudFentanylOldValue;
  106. price = 3.20m;
  107. result = price * count;
  108. break;
  109.  
  110. case "UpdownFrontline":
  111. count -= nudAntibiotic14OldValue;
  112. price = 9.99m;
  113. result = price * count;
  114. break;
  115.  
  116. case "UpDownAnalgesia":
  117. count -= nudAnalgesiaOldValue;
  118. price = 14.12m;
  119. result = price * count;
  120. break;
  121.  
  122. case "UpDownBaytrill":
  123. count -= nudBaytrillOldValue;
  124. price = 5.00m;
  125. result = price * count;
  126. break;
  127.  
  128. case "UpDownMetronidazole":
  129. count -= nudMetronidazoleOldValue;
  130. price = 3.88m;
  131. result = price * count;
  132. break;
  133.  
  134. case "UpDownRimadyl":
  135. count -= nudRimadylOldValue;
  136. price = 7.60m;
  137. result = price * count;
  138. break;
  139.  
  140. case "UpDownDrontalSmall":
  141. count -= nudDrontalSmalldogOldValue;
  142. price = 5.00m;
  143. result = price * count;
  144. break;
  145.  
  146. case "UpDownDrontalLarge":
  147. count -= nudDrontalLargedogOldValue;
  148. price = 7.00m;
  149. result = price * count;
  150. break;
  151.  
  152. case "UpDownCanineRabies":
  153. count -= nudCanineRabiesOldValue;
  154. price = 345m;
  155. result = price * count;
  156. break;
  157.  
  158.  
  159. //...add other cases for different medicine
  160.  
  161. default:
  162. break;
  163. }
  164.  
  165. return result;
  166. }
  167.  
  168.  
  169. private void UpdownAntibiotic7_ValueChanged(object sender, EventArgs e)
  170. {
  171. if (String.IsNullOrEmpty(priceTotal.Text))
  172. priceTotal.Text = (Calculate(Convert.ToInt32(UpdownAntibiotic7.Value), UpdownAntibiotic7.Name)).ToString();
  173. else
  174. priceTotal.Text = (decimal.Parse(priceTotal.Text.Replace('£', '0')) + Calculate(Convert.ToInt32(UpdownAntibiotic7.Value), UpdownAntibiotic7.Name)).ToString("C");
  175.  
  176. nudAntibiotic7OldValue = Convert.ToInt32(UpdownAntibiotic7.Value);
  177. }
  178.  
  179. private void UpdownAntibiotic14_ValueChanged(object sender, EventArgs e)
  180. {
  181. if (String.IsNullOrEmpty(priceTotal.Text))
  182. priceTotal.Text = (Calculate(Convert.ToInt32(UpdownAntibiotic14.Value), UpdownAntibiotic14.Name)).ToString();
  183. else
  184. priceTotal.Text = (decimal.Parse(priceTotal.Text.Replace('£', '0')) + Calculate(Convert.ToInt32(UpdownAntibiotic14.Value), UpdownAntibiotic14.Name)).ToString("C");
  185.  
  186. nudAntibiotic14OldValue = Convert.ToInt32(UpdownAntibiotic14.Value);
  187. }
  188.  
  189. private void UpdownFleeAndMite_ValueChanged(object sender, EventArgs e)
  190. {
  191. if (String.IsNullOrEmpty(priceTotal.Text))
  192. priceTotal.Text = (Calculate(Convert.ToInt32(UpdownFleeAndMite.Value), UpdownFleeAndMite.Name)).ToString();
  193. else
  194. priceTotal.Text = (decimal.Parse(priceTotal.Text.Replace('£', '0')) + Calculate(Convert.ToInt32(UpdownFleeAndMite.Value), UpdownFleeAndMite.Name)).ToString("C");
  195.  
  196. nudFleeAndMiteOldValue = Convert.ToInt32(UpdownFleeAndMite.Value);
  197. }
  198.  
  199. private void UpdownHeartworm_ValueChanged(object sender, EventArgs e)
  200. {
  201. if (String.IsNullOrEmpty(priceTotal.Text))
  202. priceTotal.Text = (Calculate(Convert.ToInt32(UpdownHeartworm.Value), UpdownHeartworm.Name)).ToString();
  203. else
  204. priceTotal.Text = (decimal.Parse(priceTotal.Text.Replace('£', '0')) + Calculate(Convert.ToInt32(UpdownHeartworm.Value), UpdownHeartworm.Name)).ToString("C");
  205.  
  206. nudHeartwormOldValue = Convert.ToInt32(UpdownHeartworm.Value);
  207. }
  208.  
  209. private void UpdownAnesGasTo30min_ValueChanged(object sender, EventArgs e)
  210. {
  211. if (String.IsNullOrEmpty(priceTotal.Text))
  212. priceTotal.Text = (Calculate(Convert.ToInt32(UpdownAnesGasTo30min.Value), UpdownAnesGasTo30min.Name)).ToString();
  213. else
  214. priceTotal.Text = (decimal.Parse(priceTotal.Text.Replace('£', '0')) + Calculate(Convert.ToInt32(UpdownAnesGasTo30min.Value), UpdownAnesGasTo30min.Name)).ToString("C");
  215.  
  216. nudAnesGasto30mOldValue = Convert.ToInt32(UpdownAnesGasTo30min.Value);
  217. }
  218.  
  219. private void UpdownAnesGasAfter30min_ValueChanged(object sender, EventArgs e)
  220. {
  221. if (String.IsNullOrEmpty(priceTotal.Text))
  222. priceTotal.Text = (Calculate(Convert.ToInt32(UpdownAnesGasAfter30min.Value), UpdownAnesGasAfter30min.Name)).ToString();
  223. else
  224. priceTotal.Text = (decimal.Parse(priceTotal.Text.Replace('£', '0')) + Calculate(Convert.ToInt32(UpdownAnesGasAfter30min.Value), UpdownAnesGasAfter30min.Name)).ToString("C");
  225.  
  226. nudAnesgasafter30mOldValue = Convert.ToInt32(UpdownAnesGasAfter30min.Value);
  227. }
  228.  
  229. private void UpdownFentanyl_ValueChanged(object sender, EventArgs e)
  230. {
  231. if (String.IsNullOrEmpty(priceTotal.Text))
  232. priceTotal.Text = (Calculate(Convert.ToInt32(UpdownFentanyl.Value), UpdownFentanyl.Name)).ToString();
  233. else
  234. priceTotal.Text = (decimal.Parse(priceTotal.Text.Replace('£', '0')) + Calculate(Convert.ToInt32(UpdownFentanyl.Value), UpdownFentanyl.Name)).ToString("C");
  235.  
  236. nudFentanylOldValue = Convert.ToInt32(UpdownFentanyl.Value);
  237. }
  238.  
  239. private void UpdownFrontline_ValueChanged(object sender, EventArgs e)
  240. {
  241. if (String.IsNullOrEmpty(priceTotal.Text))
  242. priceTotal.Text = (Calculate(Convert.ToInt32(UpdownFrontline.Value), UpdownFrontline.Name)).ToString();
  243. else
  244. priceTotal.Text = (decimal.Parse(priceTotal.Text.Replace('£', '0')) + Calculate(Convert.ToInt32(UpdownFrontline.Value), UpdownFrontline.Name)).ToString("C");
  245.  
  246. nudFrontlineOldValue = Convert.ToInt32(UpdownFrontline.Value);
  247. }
  248.  
  249. private void UpDownAnalgesia_ValueChanged(object sender, EventArgs e)
  250. {
  251. if (String.IsNullOrEmpty(priceTotal.Text))
  252. priceTotal.Text = (Calculate(Convert.ToInt32(UpDownAnalgesia.Value), UpDownAnalgesia.Name)).ToString();
  253. else
  254. priceTotal.Text = (decimal.Parse(priceTotal.Text.Replace('£', '0')) + Calculate(Convert.ToInt32(UpDownAnalgesia.Value), UpDownAnalgesia.Name)).ToString("C");
  255.  
  256. nudAnalgesiaOldValue = Convert.ToInt32(UpDownAnalgesia.Value);
  257. }
  258.  
  259. private void UpDownBaytrill_ValueChanged(object sender, EventArgs e)
  260. {
  261. if (String.IsNullOrEmpty(priceTotal.Text))
  262. priceTotal.Text = (Calculate(Convert.ToInt32(UpDownBaytrill.Value), UpDownBaytrill.Name)).ToString();
  263. else
  264. priceTotal.Text = (decimal.Parse(priceTotal.Text.Replace('£', '0')) + Calculate(Convert.ToInt32(UpDownBaytrill.Value), UpDownBaytrill.Name)).ToString("C");
  265.  
  266. nudBaytrillOldValue = Convert.ToInt32(UpDownBaytrill.Value);
  267. }
  268.  
  269. private void UpDownMetronidazole_ValueChanged(object sender, EventArgs e)
  270. {
  271. if (String.IsNullOrEmpty(priceTotal.Text))
  272. priceTotal.Text = (Calculate(Convert.ToInt32(UpDownMetronidazole.Value), UpDownMetronidazole.Name)).ToString();
  273. else
  274. priceTotal.Text = (decimal.Parse(priceTotal.Text.Replace('£', '0')) + Calculate(Convert.ToInt32(UpDownMetronidazole.Value), UpDownMetronidazole.Name)).ToString("C");
  275.  
  276. nudMetronidazoleOldValue = Convert.ToInt32(UpDownMetronidazole.Value);
  277. }
  278.  
  279. private void UpDownRimadyl_ValueChanged(object sender, EventArgs e)
  280. {
  281. if (String.IsNullOrEmpty(priceTotal.Text))
  282. priceTotal.Text = (Calculate(Convert.ToInt32(UpDownRimadyl.Value), UpDownRimadyl.Name)).ToString();
  283. else
  284. priceTotal.Text = (decimal.Parse(priceTotal.Text.Replace('£', '0')) + Calculate(Convert.ToInt32(UpDownRimadyl.Value), UpDownRimadyl.Name)).ToString("C");
  285.  
  286. nudRimadylOldValue = Convert.ToInt32(UpDownRimadyl.Value);
  287. }
  288.  
  289. private void UpDownDrontalSmall_ValueChanged(object sender, EventArgs e)
  290. {
  291. if (String.IsNullOrEmpty(priceTotal.Text))
  292. priceTotal.Text = (Calculate(Convert.ToInt32(UpDownDrontalSmall.Value), UpDownDrontalSmall.Name)).ToString();
  293. else
  294. priceTotal.Text = (decimal.Parse(priceTotal.Text.Replace('£', '0')) + Calculate(Convert.ToInt32(UpDownDrontalSmall.Value), UpDownDrontalSmall.Name)).ToString("C");
  295.  
  296. nudDrontalSmalldogOldValue = Convert.ToInt32(UpDownDrontalSmall.Value);
  297. }
  298.  
  299. private void UpDownDrontalLarge_ValueChanged(object sender, EventArgs e)
  300. {
  301. if (String.IsNullOrEmpty(priceTotal.Text))
  302. priceTotal.Text = (Calculate(Convert.ToInt32(UpDownDrontalLarge.Value), UpDownDrontalLarge.Name)).ToString();
  303. else
  304. priceTotal.Text = (decimal.Parse(priceTotal.Text.Replace('£', '0')) + Calculate(Convert.ToInt32(UpDownDrontalLarge.Value), UpDownDrontalLarge.Name)).ToString("C");
  305.  
  306. nudDrontalLargedogOldValue = Convert.ToInt32(UpDownDrontalLarge.Value);
  307. }
  308.  
  309. private void UpDownCanineRabies_ValueChanged(object sender, EventArgs e)
  310. {
  311. if (String.IsNullOrEmpty(priceTotal.Text))
  312. priceTotal.Text = (Calculate(Convert.ToInt32(UpDownCanineRabies.Value), UpDownCanineRabies.Name)).ToString();
  313. else
  314. priceTotal.Text = (decimal.Parse(priceTotal.Text.Replace('£', '0')) + Calculate(Convert.ToInt32(UpDownCanineRabies.Value), UpDownCanineRabies.Name)).ToString("C");
  315.  
  316. nudCanineRabiesOldValue = Convert.ToInt32(UpDownCanineRabies.Value);
  317. }
  318.  
  319. private void lblTotalAmountForm2_Click(object sender, EventArgs e)
  320. {
  321. if (String.IsNullOrEmpty(priceTotal.Text))
  322. priceTotal.Text = (Calculate(Convert.ToInt32(UpdownAntibiotic7.Value), UpdownAntibiotic7.Name)).ToString();
  323. else
  324. priceTotal.Text = (decimal.Parse(priceTotal.Text.Replace('£', '0')) + Calculate(Convert.ToInt32(UpdownAntibiotic7.Value), UpdownAntibiotic7.Name)).ToString("C");
  325.  
  326. nudAntibiotic7OldValue = Convert.ToInt32(UpdownAntibiotic7.Value);
  327. }
  328.  
  329. private void Medication_Load(object sender, EventArgs e)
  330. {
  331.  
  332. }
  333. }
  334. }
  335.  
  336. using System;
  337. using System.Collections.Generic;
  338. using System.ComponentModel;
  339. using System.Data;
  340. using System.Drawing;
  341. using System.Linq;
  342. using System.Text;
  343. using System.Threading.Tasks;
  344. using System.Windows.Forms;
  345.  
  346. namespace Task3
  347. {
  348. public partial class Procedures : Form
  349. {
  350.  
  351. int nudEarsCleanAndFlushOldValue;
  352. int nudLuxationOldValue;
  353. int nudSlingOldValue;
  354. int nudWoundSoreOldValue;
  355. int nudLacerationsOldValue;
  356. int nudBloodPressureOldValue;
  357. int nudECGOldValue;
  358. int nudTeethExtractionOldValue;
  359. int nudCatheterOldValue;
  360. int nudBiopsyOldValue;
  361. int nudRadiographOldValue;
  362. int nudPotassiumOldValue;
  363. int nudIVOldValue;
  364.  
  365. public static string ProceduresTotal = "";
  366.  
  367. public Procedures()
  368. {
  369. InitializeComponent();
  370. }
  371.  
  372. private void btnPrevious_Click(object sender, EventArgs e)
  373. //Previous button
  374. {
  375. Form Start = new Medication();
  376. this.Hide();
  377. Start.Show();
  378. }
  379.  
  380. private void btnExit_Click(object sender, EventArgs e)
  381. {
  382. Application.Exit();
  383. }
  384.  
  385. private void btnNextForm4_Click(object sender, EventArgs e)
  386. {
  387. Form finish = new Receipt();
  388. this.Hide();
  389. finish.Show();
  390.  
  391. ProceduresTotal = price.Text;
  392. }
  393.  
  394. private decimal Calculate(int count, string nudName)
  395. {
  396. decimal price;
  397. decimal result = 0;
  398.  
  399. switch (nudName)
  400. {
  401. case "UpdownEarsCleanAndFlush":
  402. count -= nudEarsCleanAndFlushOldValue;
  403. price = 8.00m;
  404. result = price * count;
  405. break;
  406.  
  407. case "UpdownLuxation":
  408. count -= nudLuxationOldValue;
  409. price = 48.67m;
  410. result = price * count;
  411. break;
  412.  
  413. case "UpdownSling":
  414. count -= nudSlingOldValue;
  415. price = 1.20m;
  416. result = price * count;
  417. break;
  418.  
  419. case "UpdownWoundsore":
  420. count -= nudWoundSoreOldValue;
  421. price = 2.99m;
  422. result = price * count;
  423. break;
  424.  
  425. case "UpdownLacerations":
  426. count -= nudLacerationsOldValue;
  427. price = 98.00m;
  428. result = price * count;
  429. break;
  430.  
  431. case "UpDownBloodPressure":
  432. count -= nudBloodPressureOldValue;
  433. price = 0.95m;
  434. result = price * count;
  435. break;
  436.  
  437. case "UpDownECG":
  438. count -= nudECGOldValue;
  439. price = 133.45m;
  440. result = price * count;
  441. break;
  442.  
  443. case "UpDownTeethExtraction":
  444. count -= nudTeethExtractionOldValue;
  445. price = 96.55m;
  446. result = price * count;
  447. break;
  448.  
  449. case "UpDownCatheter":
  450. count -= nudCatheterOldValue;
  451. price = 35.00m;
  452. result = price * count;
  453. break;
  454.  
  455. case "UpDownBiopsy":
  456. count -= nudBiopsyOldValue;
  457. price = 389.00m;
  458. result = price * count;
  459. break;
  460.  
  461. case "UpDownRadiograph":
  462. count -= nudRadiographOldValue;
  463. price = 10.29m;
  464. result = price * count;
  465. break;
  466.  
  467. case "UpDownPotassium":
  468. count -= nudPotassiumOldValue;
  469. price = 0.45m;
  470. result = price * count;
  471. break;
  472.  
  473. case "UpDownIV":
  474. count -= nudIVOldValue;
  475. price = 3.90m;
  476. result = price * count;
  477. break;
  478.  
  479. //...add other cases for different medicine
  480.  
  481. default:
  482. break;
  483. }
  484.  
  485. return result;
  486. }
  487.  
  488. private void UpdownEarsCleanAndFlush_ValueChanged(object sender, EventArgs e)
  489. {
  490. if (String.IsNullOrEmpty(price.Text))
  491. price.Text = (Calculate(Convert.ToInt32(UpdownEarsCleanAndFlush.Value), UpdownEarsCleanAndFlush.Name)).ToString();
  492. else
  493. price.Text = (decimal.Parse(price.Text.Replace('£', '0')) + Calculate(Convert.ToInt32(UpdownEarsCleanAndFlush.Value), UpdownEarsCleanAndFlush.Name)).ToString("C");
  494.  
  495. nudEarsCleanAndFlushOldValue = Convert.ToInt32(UpdownEarsCleanAndFlush.Value);
  496. }
  497.  
  498. private void UpdownLuxation_ValueChanged(object sender, EventArgs e)
  499. {
  500. if (String.IsNullOrEmpty(price.Text))
  501. price.Text = (Calculate(Convert.ToInt32(UpdownLuxation.Value), UpdownLuxation.Name)).ToString();
  502. else
  503. price.Text = (decimal.Parse(price.Text.Replace('£', '0')) + Calculate(Convert.ToInt32(UpdownLuxation.Value), UpdownLuxation.Name)).ToString("C");
  504.  
  505. nudLuxationOldValue = Convert.ToInt32(UpdownLuxation.Value);
  506. }
  507.  
  508. private void UpdownSling_ValueChanged(object sender, EventArgs e)
  509. {
  510. if (String.IsNullOrEmpty(price.Text))
  511. price.Text = (Calculate(Convert.ToInt32(UpdownSling.Value), UpdownSling.Name)).ToString();
  512. else
  513. price.Text = (decimal.Parse(price.Text.Replace('£', '0')) + Calculate(Convert.ToInt32(UpdownSling.Value), UpdownSling.Name)).ToString("C");
  514.  
  515. nudSlingOldValue = Convert.ToInt32(UpdownSling.Value);
  516. }
  517.  
  518. private void UpdownWoundsore_ValueChanged(object sender, EventArgs e)
  519. {
  520. if (String.IsNullOrEmpty(price.Text))
  521. price.Text = (Calculate(Convert.ToInt32(UpdownWoundsore.Value), UpdownWoundsore.Name)).ToString();
  522. else
  523. price.Text = (decimal.Parse(price.Text.Replace('£', '0')) + Calculate(Convert.ToInt32(UpdownWoundsore.Value), UpdownWoundsore.Name)).ToString("C");
  524.  
  525. nudWoundSoreOldValue = Convert.ToInt32(UpdownWoundsore.Value);
  526. }
  527.  
  528. private void UpdownLacerations_ValueChanged(object sender, EventArgs e)
  529. {
  530. if (String.IsNullOrEmpty(price.Text))
  531. price.Text = (Calculate(Convert.ToInt32(UpdownLacerations.Value), UpdownLacerations.Name)).ToString();
  532. else
  533. price.Text = (decimal.Parse(price.Text.Replace('£', '0')) + Calculate(Convert.ToInt32(UpdownLacerations.Value), UpdownLacerations.Name)).ToString("C");
  534.  
  535. nudLacerationsOldValue = Convert.ToInt32(UpdownLacerations.Value);
  536. }
  537.  
  538. private void UpDownBloodPressure_ValueChanged(object sender, EventArgs e)
  539. {
  540. if (String.IsNullOrEmpty(price.Text))
  541. price.Text = (Calculate(Convert.ToInt32(UpDownBloodPressure.Value), UpDownBloodPressure.Name)).ToString();
  542. else
  543. price.Text = (decimal.Parse(price.Text.Replace('£', '0')) + Calculate(Convert.ToInt32(UpDownBloodPressure.Value), UpDownBloodPressure.Name)).ToString("C");
  544.  
  545. nudBloodPressureOldValue = Convert.ToInt32(UpDownBloodPressure.Value);
  546. }
  547.  
  548. private void UpDownECG_ValueChanged(object sender, EventArgs e)
  549. {
  550. if (String.IsNullOrEmpty(price.Text))
  551. price.Text = (Calculate(Convert.ToInt32(UpDownECG.Value), UpDownECG.Name)).ToString();
  552. else
  553. price.Text = (decimal.Parse(price.Text.Replace('£', '0')) + Calculate(Convert.ToInt32(UpDownECG.Value), UpDownECG.Name)).ToString("C");
  554.  
  555. nudECGOldValue = Convert.ToInt32(UpDownECG.Value);
  556. }
  557.  
  558. private void UpDownTeethExtraction_ValueChanged(object sender, EventArgs e)
  559. {
  560. if (String.IsNullOrEmpty(price.Text))
  561. price.Text = (Calculate(Convert.ToInt32(UpDownTeethExtraction.Value), UpDownTeethExtraction.Name)).ToString();
  562. else
  563. price.Text = (decimal.Parse(price.Text.Replace('£', '0')) + Calculate(Convert.ToInt32(UpDownTeethExtraction.Value), UpDownTeethExtraction.Name)).ToString("C");
  564.  
  565. nudTeethExtractionOldValue = Convert.ToInt32(UpDownTeethExtraction.Value);
  566. }
  567.  
  568. private void UpDownCatheter_ValueChanged(object sender, EventArgs e)
  569. {
  570. if (String.IsNullOrEmpty(price.Text))
  571. price.Text = (Calculate(Convert.ToInt32(UpDownCatheter.Value), UpDownCatheter.Name)).ToString();
  572. else
  573. price.Text = (decimal.Parse(price.Text.Replace('£', '0')) + Calculate(Convert.ToInt32(UpDownCatheter.Value), UpDownCatheter.Name)).ToString("C");
  574.  
  575. nudCatheterOldValue = Convert.ToInt32(UpDownCatheter.Value);
  576. }
  577.  
  578. private void UpDownBiopsy_ValueChanged(object sender, EventArgs e)
  579. {
  580. if (String.IsNullOrEmpty(price.Text))
  581. price.Text = (Calculate(Convert.ToInt32(UpDownBiopsy.Value), UpDownBiopsy.Name)).ToString();
  582. else
  583. price.Text = (decimal.Parse(price.Text.Replace('£', '0')) + Calculate(Convert.ToInt32(UpDownBiopsy.Value), UpDownBiopsy.Name)).ToString("C");
  584.  
  585. nudBiopsyOldValue = Convert.ToInt32(UpDownBiopsy.Value);
  586. }
  587.  
  588. private void UpDownRadiograph_ValueChanged(object sender, EventArgs e)
  589. {
  590. if (String.IsNullOrEmpty(price.Text))
  591. price.Text = (Calculate(Convert.ToInt32(UpDownRadiograph.Value), UpDownRadiograph.Name)).ToString();
  592. else
  593. price.Text = (decimal.Parse(price.Text.Replace('£', '0')) + Calculate(Convert.ToInt32(UpDownRadiograph.Value), UpDownRadiograph.Name)).ToString("C");
  594.  
  595. nudRadiographOldValue = Convert.ToInt32(UpDownRadiograph.Value);
  596. }
  597.  
  598. private void UpDownIV_ValueChanged(object sender, EventArgs e)
  599. {
  600. if (String.IsNullOrEmpty(price.Text))
  601. price.Text = (Calculate(Convert.ToInt32(UpDownIV.Value), UpDownIV.Name)).ToString();
  602. else
  603. price.Text = (decimal.Parse(price.Text.Replace('£', '0')) + Calculate(Convert.ToInt32(UpDownIV.Value), UpDownIV.Name)).ToString("C");
  604.  
  605. nudIVOldValue = Convert.ToInt32(UpDownIV.Value);
  606. }
  607.  
  608. private void UpDownPotassium_ValueChanged(object sender, EventArgs e)
  609. {
  610. if (String.IsNullOrEmpty(price.Text))
  611. price.Text = (Calculate(Convert.ToInt32(UpDownPotassium.Value), UpDownPotassium.Name)).ToString();
  612. else
  613. price.Text = (decimal.Parse(price.Text.Replace('£', '0')) + Calculate(Convert.ToInt32(UpDownPotassium.Value), UpDownPotassium.Name)).ToString("C");
  614.  
  615. nudPotassiumOldValue = Convert.ToInt32(UpDownPotassium.Value);
  616. }
  617.  
  618. private void Procedures_Load(object sender, EventArgs e)
  619. {
  620.  
  621. }
  622. }
  623. }
Add Comment
Please, Sign In to add comment