FrmOrdersCustomerRecord.cs 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  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.Windows.Forms;
  9. using System.Globalization;
  10. using LYFZ.ComponentLibrary;
  11. namespace LYFZ.Software.MainBusiness.Customers
  12. {
  13. public partial class FrmOrdersCustomerRecord : LYFZ.Software.UI.Customers.FrmOrdersCustomerRecord
  14. {
  15. /// <summary>
  16. /// 订单类型
  17. /// </summary>
  18. public string DindanType;
  19. public FrmOrdersCustomerRecord()
  20. {
  21. this.FormClosed += FrmOrdersCustomerRecord_FormClosed;
  22. this.Shown += FrmOrdersCustomerRecord_Shown;
  23. this.btnNO.Click += btnNO_Click;
  24. this.btnKO.Click += btnKO_Click;
  25. }
  26. List<LYFZ.Software.MainBusiness.EnumPermissions.BusinessType> Versions = LYFZ.Software.MainBusiness.CommonLogical.SuccessfulLogin.GetBusinessTypeList();
  27. void FrmOrdersCustomerRecord_Shown(object sender, EventArgs e)
  28. {
  29. radHS.Visible = false;
  30. radET.Visible = false;
  31. radXZ.Visible = false;
  32. radHS.Tag = 0;
  33. radET.Tag = 1;
  34. radXZ.Tag = 2;
  35. radFW.Tag = 3;
  36. for (int i = 0; i < Versions.Count; i++)
  37. {
  38. LYFZ.Software.MainBusiness.EnumPermissions.BusinessType Version = Versions[i];
  39. if (Version.ToString() == EnumPermissions.BusinessType.写真版.ToString())
  40. {
  41. radXZ.Visible = true;
  42. }
  43. if (Version.ToString() == EnumPermissions.BusinessType.婚纱版.ToString())
  44. {
  45. radHS.Visible = true;
  46. }
  47. if (Version.ToString() == EnumPermissions.BusinessType.儿童版.ToString())
  48. {
  49. radET.Visible = true;
  50. }
  51. }
  52. if (radHS.Visible == false)
  53. { radET.Checked = true; }
  54. else { radHS.Checked = true; }
  55. }
  56. void btnKO_Click(object sender, EventArgs e)
  57. {
  58. try
  59. {
  60. if (radHS.Checked == true) { DindanType = radHS.Tag.ToString(); }
  61. if (radXZ.Checked == true) { DindanType = radXZ.Tag.ToString(); }
  62. if (radET.Checked == true) { DindanType = radET.Tag.ToString(); }
  63. if (radFW.Checked == true) { DindanType = radFW.Tag.ToString(); }
  64. if (radHS.Checked == false && radXZ.Checked == false && radET.Checked == false && radFW.Checked == false)
  65. { MessageBoxCustom.Show("请选着添加类型!"); }
  66. else
  67. {
  68. this.DialogResult = DialogResult.OK;
  69. }
  70. }
  71. catch { }
  72. }
  73. void btnNO_Click(object sender, EventArgs e)
  74. { this.Close(); }
  75. void FrmOrdersCustomerRecord_FormClosed(object sender, FormClosedEventArgs e)
  76. {
  77. }
  78. }
  79. }