结算前校验数量管理 - HISFC 组件
namespace Neusoft.HISFC.Components.Manager.Controls
{
//新增结算前校验数量 {8E5797C3-9757-4964-8C58-D2A9F1C169F7} xingshq 20210924
public partial class ucManagerItemNum : Neusoft.FrameWork.WinForms.Controls.ucBaseControl
{
public ucManagerItemNum()
{
InitializeComponent();
}
private void ucManagerItemNum_Load(object sender, System.EventArgs e)
{
this.Query();
}
#region 菜单
private Neusoft.FrameWork.WinForms.Forms.ToolBarService toolBarService = new Neusoft.FrameWork.WinForms.Forms.ToolBarService();
protected override Neusoft.FrameWork.WinForms.Forms.ToolBarService OnInit(object sender, object neuObject, object param)
{
toolBarService.AddToolButton('查询非药品项目', '', (int)Neusoft.FrameWork.WinForms.Classes.EnumImageList.C查询, true, false, null);
return toolBarService;
}
public override void ToolStrip_ItemClicked(object sender, ToolStripItemClickedEventArgs e)
{
switch (e.ClickedItem.Text)
{
case '查询非药品项目':
{
this.QueryByItemName();
break;
}
}
base.ToolStrip_ItemClicked(sender, e);
}
#endregion
public int Query()
{
ArrayList alItem = null;
Neusoft.HISFC.BizLogic.Fee.Item item = new Neusoft.HISFC.BizLogic.Fee.Item();
//alItem = item.getItemNumType();
alItem = item.getItemNumType('1', string.Empty, 100);
int count = 0;
foreach (Neusoft.HISFC.Models.Fee.Item.Undrug Item in alItem)
{
//if (count >= 100) break;//只显示100条数据 YY
this.neuSpread_sheet1.Rows.Add(count, 1);
this.neuSpread_sheet1.Cells[count, 0].Text = Item.ID;
this.neuSpread_sheet1.Cells[count, 1].Text = Item.Name;
if (Item.NumType == '1')
{
this.neuSpread_sheet1.Cells[count, 2].Text = '出院校验时提醒';
}
else if (Item.NumType == '2')
{
this.neuSpread_sheet1.Cells[count, 2].Text = '出院校验时拦截';
}
else
{
this.neuSpread_sheet1.Cells[count, 2].Text = '无校验';
}
this.neuSpread_sheet1.Cells[count, 3].Text = Item.NumTimes.ToString();
this.neuSpread_sheet1.Cells[count, 4].Tag = Item.FeeCheckGroup.ToString();
this.neuSpread_sheet1.Cells[count, 4].Text = Item.FeeCheckGroupName.ToString();
//count++;// YY
}
this.neuSpread_sheet1.Columns[0].HorizontalAlignment = FarPoint.Win.Spread.CellHorizontalAlignment.Left;
this.neuSpread_sheet1.Columns[1].HorizontalAlignment = FarPoint.Win.Spread.CellHorizontalAlignment.Left;
this.neuSpread_sheet1.Columns[2].HorizontalAlignment = FarPoint.Win.Spread.CellHorizontalAlignment.Left;
this.neuSpread_sheet1.Columns[3].HorizontalAlignment = FarPoint.Win.Spread.CellHorizontalAlignment.Left;
this.neuSpread_sheet1.Columns[4].HorizontalAlignment = FarPoint.Win.Spread.CellHorizontalAlignment.Left;
this.neuSpread_sheet1.Columns[0].Locked = true;
this.neuSpread_sheet1.Columns[1].Locked = true;
this.neuSpread_sheet1.Columns[2].Locked = true;
this.neuSpread_sheet1.Columns[3].Locked = true;
this.neuSpread_sheet1.Columns[4].Locked = true;
return 1;
}
public int QueryByItemName()
{
ArrayList alItem = null;
Neusoft.HISFC.BizLogic.Fee.Item item = new Neusoft.HISFC.BizLogic.Fee.Item();
string itemName = this.txtItemName.Text;
if (string.IsNullOrEmpty(itemName))
{
alItem = item.getItemNumType('1', string.Empty, 100);
}
else
{
//alItem = item.getItemNumType(itemName);
alItem = item.getItemNumType(string.Empty, itemName, 0);
}
int count = 0;
foreach (Neusoft.HISFC.Models.Fee.Item.Undrug Item in alItem)
{
//if (count >= 100) break;//只显示100条数据 YY
this.neuSpread_sheet1.Rows.Add(count, 1);
this.neuSpread_sheet1.Cells[count, 0].Text = Item.ID;
this.neuSpread_sheet1.Cells[count, 1].Text = Item.Name;
if (Item.NumType == '1')
{
this.neuSpread_sheet1.Cells[count, 2].Text = '出院校验时提醒';
}
else if (Item.NumType == '2')
{
this.neuSpread_sheet1.Cells[count, 2].Text = '出院校验时拦截';
}
else
{
this.neuSpread_sheet1.Cells[count, 2].Text = '无校验';
}
this.neuSpread_sheet1.Cells[count, 3].Text = Item.NumTimes.ToString();
this.neuSpread_sheet1.Cells[count, 4].Tag = Item.FeeCheckGroup.ToString();
this.neuSpread_sheet1.Cells[count, 4].Text = Item.FeeCheckGroupName.ToString();
//count++;// YY
}
this.neuSpread_sheet1.Columns[0].HorizontalAlignment = FarPoint.Win.Spread.CellHorizontalAlignment.Left;
this.neuSpread_sheet1.Columns[1].HorizontalAlignment = FarPoint.Win.Spread.CellHorizontalAlignment.Left;
this.neuSpread_sheet1.Columns[2].HorizontalAlignment = FarPoint.Win.Spread.CellHorizontalAlignment.Left;
this.neuSpread_sheet1.Columns[3].HorizontalAlignment = FarPoint.Win.Spread.CellHorizontalAlignment.Left;
this.neuSpread_sheet1.Columns[4].HorizontalAlignment = FarPoint.Win.Spread.CellHorizontalAlignment.Left;
this.neuSpread_sheet1.Columns[0].Locked = true;
this.neuSpread_sheet1.Columns[1].Locked = true;
this.neuSpread_sheet1.Columns[2].Locked = true;
this.neuSpread_sheet1.Columns[3].Locked = true;
this.neuSpread_sheet1.Columns[4].Locked = true;
return 1;
}
private void neuSpread_CellDoubleClick(object sender, FarPoint.Win.Spread.CellClickEventArgs e)
{
using (var editor = new frmManagerItemNum())
{
Neusoft.HISFC.Models.Fee.Item.Undrug undrug = new Neusoft.HISFC.Models.Fee.Item.Undrug();
undrug.ID = this.neuSpread_sheet1.Cells[e.Row, 0].Text.ToString().Trim();
undrug.Name = this.neuSpread_sheet1.Cells[e.Row, 1].Text.ToString().Trim();
undrug.NumType = this.neuSpread_sheet1.Cells[e.Row, 2].Text.ToString().Trim();
undrug.NumTimes = Convert.ToDecimal(this.neuSpread_sheet1.Cells[e.Row, 3].Text.ToString().Trim());
undrug.FeeCheckGroup = this.neuSpread_sheet1.Cells[e.Row, 4].Tag.ToString().Trim();
undrug.FeeCheckGroupName = this.neuSpread_sheet1.Cells[e.Row, 4].Text.ToString().Trim();
editor.undrug = undrug;
editor.ShowDialog();
}
}
}
} // 保存按钮点击事件 private void btnSave_Click(object sender, EventArgs e) { bool result = this.Save(); if (result) { MessageBox.Show('保存成功!'); // 刷新界面 this.neuSpread_sheet1.Rows.Clear(); this.Query(); }
原文地址: https://www.cveoy.top/t/topic/nXP5 著作权归作者所有。请勿转载和采集!