这是一个名为ucManagerItemNum的自定义控件,主要功能是查询并展示医疗收费项目的数量校验信息。下面逐行分析代码:

  1. namespace Neusoft.HISFC.Components.Manager.Controls 这是命名空间的声明,表示该文件中定义的类所在的命名空间。

  2. public partial class ucManagerItemNum : Neusoft.FrameWork.WinForms.Controls.ucBaseControl 这是类的声明,名称为ucManagerItemNum,继承自Neusoft.FrameWork.WinForms.Controls.ucBaseControl,是一个自定义控件。

  3. public ucManagerItemNum() 这是ucManagerItemNum类的构造函数,会在类实例化时被调用。

  4. InitializeComponent(); 这是一个自动生成的方法,用于初始化控件。

  5. private void ucManagerItemNum_Load(object sender, System.EventArgs e) 当ucManagerItemNum控件加载时,会调用该方法。

  6. this.Query(); 调用Query方法查询并展示医疗收费项目的数量校验信息。

  7. #region 菜单 这是一个注释,表示下面的代码是关于菜单的实现。

  8. private Neusoft.FrameWork.WinForms.Forms.ToolBarService toolBarService = new Neusoft.FrameWork.WinForms.Forms.ToolBarService(); 声明一个名为toolBarService的Neusoft.FrameWork.WinForms.Forms.ToolBarService类型的变量,用于创建菜单。

  9. protected override Neusoft.FrameWork.WinForms.Forms.ToolBarService OnInit(object sender, object neuObject, object param) 覆盖OnInit方法,用于初始化菜单。

  10. toolBarService.AddToolButton("查询非药品项目", "", (int)Neusoft.FrameWork.WinForms.Classes.EnumImageList.C查询, true, false, null); 向菜单中添加一个名为“查询非药品项目”的按钮。

  11. return toolBarService; 返回创建好的菜单。

  12. public override void ToolStrip_ItemClicked(object sender, ToolStripItemClickedEventArgs e) 覆盖ToolStrip_ItemClicked方法,用于处理菜单项的点击事件。

  13. switch (e.ClickedItem.Text) 判断被点击的菜单项的文本内容。

  14. case "查询非药品项目": 如果是“查询非药品项目”菜单项,则调用QueryByItemName方法查询并展示医疗收费项目的数量校验信息。

  15. this.QueryByItemName(); 调用QueryByItemName方法查询并展示医疗收费项目的数量校验信息。

  16. break; 结束switch语句。

  17. base.ToolStrip_ItemClicked(sender, e); 调用基类ToolStrip_ItemClicked方法处理菜单项的点击事件。

  18. #endregion 结束菜单的实现。

  19. public int Query() 声明Query方法,用于查询并展示医疗收费项目的数量校验信息。

  20. ArrayList alItem = null; 声明一个名为alItem的ArrayList类型的变量,用于存储查询结果。

  21. Neusoft.HISFC.BizLogic.Fee.Item item = new Neusoft.HISFC.BizLogic.Fee.Item(); 声明一个名为item的Neusoft.HISFC.BizLogic.Fee.Item类型的变量,用于查询医疗收费项目的数量校验信息。

  22. alItem = item.getItemNumType(); 调用Neusoft.HISFC.BizLogic.Fee.Item类的getItemNumType方法查询医疗收费项目的数量校验信息,并将结果存储在alItem变量中。

  23. int count = 0; 声明一个名为count的整型变量,用于记录查询结果的数量。

  24. foreach (Neusoft.HISFC.Models.Fee.Item.Undrug Item in alItem) 遍历查询结果。

  25. this.neuSpread_sheet1.Rows.Add(count, 1); 在控件中添加一行。

  26. this.neuSpread_sheet1.Cells[count, 0].Text = Item.ID; 将查询结果中的医疗收费项目ID存储在控件中。

  27. this.neuSpread_sheet1.Cells[count, 1].Text = Item.Name; 将查询结果中的医疗收费项目名称存储在控件中。

  28. if (Item.NumType == "1") 判断查询结果中的医疗收费项目的数量校验类型。

  29. this.neuSpread_sheet1.Cells[count, 2].Text = "出院校验时提醒"; 如果是出院校验时提醒,则在控件中存储“出院校验时提醒”。

  30. else if (Item.NumType == "2") 判断查询结果中的医疗收费项目的数量校验类型。

  31. this.neuSpread_sheet1.Cells[count, 2].Text = "出院校验时拦截"; 如果是出院校验时拦截,则在控件中存储“出院校验时拦截”。

  32. else 如果是无校验,则在控件中存储“无校验”。

  33. this.neuSpread_sheet1.Cells[count, 3].Text = Item.NumTimes.ToString(); 将查询结果中的医疗收费项目的数量校验次数存储在控件中。

  34. this.neuSpread_sheet1.Cells[count, 4].Tag = Item.FeeCheckGroup.ToString(); 将查询结果中的医疗收费项目的收费检查组ID存储在控件中。

  35. this.neuSpread_sheet1.Cells[count, 4].Text = Item.FeeCheckGroupName.ToString(); 将查询结果中的医疗收费项目的收费检查组名称存储在控件中。

  36. this.neuSpread_sheet1.Columns[0].HorizontalAlignment = FarPoint.Win.Spread.CellHorizontalAlignment.Left; 设置控件中第一列的水平对齐方式为左对齐。

  37. this.neuSpread_sheet1.Columns[1].HorizontalAlignment = FarPoint.Win.Spread.CellHorizontalAlignment.Left; 设置控件中第二列的水平对齐方式为左对齐。

  38. this.neuSpread_sheet1.Columns[2].HorizontalAlignment = FarPoint.Win.Spread.CellHorizontalAlignment.Left; 设置控件中第三列的水平对齐方式为左对齐。

  39. this.neuSpread_sheet1.Columns[3].HorizontalAlignment = FarPoint.Win.Spread.CellHorizontalAlignment.Left; 设置控件中第四列的水平对齐方式为左对齐。

  40. this.neuSpread_sheet1.Columns[4].HorizontalAlignment = FarPoint.Win.Spread.CellHorizontalAlignment.Left; 设置控件中第五列的水平对齐方式为左对齐。

  41. this.neuSpread_sheet1.Columns[0].Locked = true; 设置控件中第一列为只读。

  42. this.neuSpread_sheet1.Columns[1].Locked = true; 设置控件中第二列为只读。

  43. this.neuSpread_sheet1.Columns[2].Locked = true; 设置控件中第三列为只读。

  44. this.neuSpread_sheet1.Columns[3].Locked = true; 设置控件中第四列为只读。

  45. this.neuSpread_sheet1.Columns[4].Locked = true; 设置控件中第五列为只读。

  46. return 1; 返回查询结果的数量。

  47. public int QueryByItemName() 声明QueryByItemName方法,用于根据医疗收费项目名称查询并展示医疗收费项目的数量校验信息。

  48. ArrayList alItem = null; 声明一个名为alItem的ArrayList类型的变量,用于存储查询结果。

  49. Neusoft.HISFC.BizLogic.Fee.Item item = new Neusoft.HISFC.BizLogic.Fee.Item(); 声明一个名为item的Neusoft.HISFC.BizLogic.Fee.Item类型的变量,用于查询医疗收费项目的数量校验信息。

  50. string itemName = this.txtItemName.Text; 获取控件中输入的医疗收费项目名称。

  51. alItem = item.getItemNumType(itemName); 调用Neusoft.HISFC.BizLogic.Fee.Item类的getItemNumType方法根据医疗收费项目名称查询数量校验信息,并将结果存储在alItem变量中。

  52. int count = 0; 声明一个名为count的整型变量,用于记录查询结果的数量。

  53. foreach (Neusoft.HISFC.Models.Fee.Item.Undrug Item in alItem) 遍历查询结果。

  54. this.neuSpread_sheet1.Rows.Add(count, 1); 在控件中添加一行。

  55. this.neuSpread_sheet1.Cells[count, 0].Text = Item.ID; 将查询结果中的医疗收费项目ID存储在控件中。

  56. this.neuSpread_sheet1.Cells[count, 1].Text = Item.Name; 将查询结果中的医疗收费项目名称存储在控件中。

  57. if (Item.NumType == "1") 判断查询结果中的医疗收费项目的数量校验类型。

  58. this.neuSpread_sheet1.Cells[count, 2].Text = "出院校验时提醒"; 如果是出院校验时提醒,则在控件中存储“出院校验时提醒”。

  59. else if (Item.NumType == "2") 判断查询结果中的医疗收费项目的数量校验类型。

  60. this.neuSpread_sheet1.Cells[count, 2].Text = "出院校验时拦截"; 如果是出院校验时拦截,则在控件中存储“出院校验时拦截”。

  61. else 如果是无校验,则在控件中存储“无校验”。

  62. this.neuSpread_sheet1.Cells[count, 3].Text = Item.NumTimes.ToString(); 将查询结果中的医疗收费项目的数量


原文地址: https://www.cveoy.top/t/topic/bCwG 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录