Esempio n. 1
0
        private void lnbPerson_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            if (this.alTargetPerson == null)
            {
                Neusoft.HISFC.BizLogic.Manager.Person managerIntegrate = new Neusoft.HISFC.BizLogic.Manager.Person();
                this.alTargetPerson = managerIntegrate.GetEmployeeAll();
            }
            //弹出选择窗口
            Neusoft.FrameWork.Models.NeuObject info = new Neusoft.FrameWork.Models.NeuObject();
            if (Neusoft.FrameWork.WinForms.Classes.Function.ChooseItem(this.alTargetPerson, ref info) == 0)
            {
                return;
            }
            else
            {
                if (info.ID == this.targetPerson.ID)            //如果类型不发生变化则返回
                {
                    return;
                }
                else
                {
                    this.OnBeginPersonChanged(info, null);

                    this.TargetPerson = info;

                    this.OnEndPersonChanged(info, null);
                }
            }
        }
Esempio n. 2
0
        //private void txtEmployeeCode_Leave(object sender, EventArgs e)
        //{
        //    if (this.txtEmployeeCode.Text != "")
        //    {
        //        if (this.txtEmployeeCode.ReadOnly == false)
        //        {
        //            this.txtEmployeeCode.Text = this.txtEmployeeCode.Text.PadLeft(6, '0');
        //            Neusoft.HISFC.BizLogic.Manager.Person ps = new Neusoft.HISFC.BizLogic.Manager.Person();
        //            int temp = ps.SelectEmployIsExist(this.txtEmployeeCode.Text);
        //            if (temp == -1)
        //            {
        //                MessageBox.Show("查询出错,编码可能会重复");
        //            }
        //            else if (temp == 1)
        //            {
        //                MessageBox.Show("编码已经存在,请重新输入");
        //                this.txtEmployeeCode.Focus();
        //                this.txtEmployeeCode.Text = "";
        //            }
        //        }
        //    }

        //}

        private void txtEmployeeCode_KeyDown(object sender, System.Windows.Forms.KeyEventArgs e)
        {
            if (e.KeyCode == Keys.Enter)
            {
                if (this.txtEmployeeCode.Text != "")
                {
                    if (this.txtEmployeeCode.ReadOnly == false)
                    {
                        this.txtEmployeeCode.Text = this.txtEmployeeCode.Text.PadLeft(6, '0');
                        Neusoft.HISFC.BizLogic.Manager.Person ps = new Neusoft.HISFC.BizLogic.Manager.Person();
                        int temp = ps.SelectEmployIsExist(this.txtEmployeeCode.Text);
                        if (temp == -1)
                        {
                            MessageBox.Show("查询出错,编码可能会重复");
                        }
                        else if (temp == 1)
                        {
                            MessageBox.Show("编码已经存在,请重新输入");
                            this.txtEmployeeCode.Focus();
                            this.txtEmployeeCode.Text = "";
                        }
                    }
                }
            }
        }
        public frmSetUserGroup(Neusoft.HISFC.Models.Base.Employee obj)
        {
            InitializeComponent();
            this.employee = obj.Clone();
            this.getPerson();
            if (obj.ID == "")
            {
                this.UpdateOrAdd         = "A";
                this.lblEmployee.Visible = true;
            }
            else
            {
                this.UpdateOrAdd         = "U";
                this.lblEmployee.Visible = false;
            }
            this.employee = obj;
            try
            {
                Neusoft.HISFC.BizLogic.Manager.Person managerPerson = new Neusoft.HISFC.BizLogic.Manager.Person();
                form = new Neusoft.FrameWork.WinForms.Forms.frmEasyChoose(managerPerson.GetUserEmployeeAll());
                form.SelectedItem += new Neusoft.FrameWork.WinForms.Forms.SelectedItemHandler(form_SelectedItem);

                this.tvGroup1.DoubleClick += new EventHandler(this.treeView_DoubleClick);
                this.lsvGroup.DoubleClick += new EventHandler(listView1_DoubleClick);
                this.RefreshGroupList();
                this.tvGroup1.Visible = true;
            }
            catch { }
        }
Esempio n. 4
0
        /// <summary>
        /// 初始化
        /// </summary>
        public void Init()
        {
            Neusoft.HISFC.BizLogic.Manager.Constant consManager = new Neusoft.HISFC.BizLogic.Manager.Constant();
            System.Collections.ArrayList            alTypelist  = consManager.GetList(Neusoft.HISFC.Models.Base.EnumConstant.ITEMTYPE);
            if (alTypelist == null)
            {
                MessageBox.Show(Neusoft.FrameWork.Management.Language.Msg("加载药品列表失败") + consManager.Err);
                return;
            }

            this.itemTypeHelper = new Neusoft.FrameWork.Public.ObjectHelper(alTypelist);
            FarPoint.Win.Spread.CellType.ComboBoxCellType cmbCellType = new FarPoint.Win.Spread.CellType.ComboBoxCellType();
            string[] strItemType = new string[alTypelist.Count];
            for (int i = 0; i < strItemType.Length; i++)
            {
                Neusoft.HISFC.Models.Base.Const tempCons = alTypelist[i] as Neusoft.HISFC.Models.Base.Const;
                strItemType[i] = "<" + tempCons.ID + ">" + tempCons.Name;
            }
            cmbCellType.Items = strItemType;
            this.neuSpread1_Sheet1.Columns[0].CellType = cmbCellType;

            Neusoft.HISFC.BizLogic.Manager.Person personManager = new Neusoft.HISFC.BizLogic.Manager.Person();
            this.alPerson = personManager.GetEmployeeAll();
            if (this.alPerson == null)
            {
                MessageBox.Show(Neusoft.FrameWork.Management.Language.Msg("加载人员列表失败") + personManager.Err);
                return;
            }
        }
Esempio n. 5
0
        /// <summary>
        /// 数据初始化
        /// </summary>
        protected void Init()
        {
            ArrayList al = new ArrayList();

            #region 银行

            Neusoft.HISFC.BizLogic.Manager.Constant constantManager = new Neusoft.HISFC.BizLogic.Manager.Constant();
            al = constantManager.GetList("BANK");
            if (al == null)
            {
                MessageBox.Show(Language.Msg("获取银行列表失败" + constantManager.Err));
                return;
            }
            bankHelper.ArrayObject = al;

            #endregion

            #region 人员

            Neusoft.HISFC.BizLogic.Manager.Person personManager = new Neusoft.HISFC.BizLogic.Manager.Person();
            al = personManager.GetEmployeeAll();
            if (al == null)
            {
                MessageBox.Show(Language.Msg("获取所有人员列表" + personManager.Err));
                return;
            }
            this.personHelper.ArrayObject = al;

            #endregion

            #region 供货单位

            Neusoft.HISFC.BizLogic.Pharmacy.Constant constant = new Neusoft.HISFC.BizLogic.Pharmacy.Constant();
            this.alCompany = constant.QueryCompany("1");
            if (this.alCompany == null)
            {
                MessageBox.Show(constant.Err);
                return;
            }
            //{49390DE5-B54F-4b15-A012-208CDF288FF5}  可选择全部供货公司 增加银行列表选择功能
            Neusoft.HISFC.Models.Pharmacy.Company rootCompany = new Neusoft.HISFC.Models.Pharmacy.Company();
            rootCompany.ID   = "AAAA";
            rootCompany.Name = "全部供货公司";

            this.alCompany.Insert(0, rootCompany);

            this.companyHelper = new Neusoft.FrameWork.Public.ObjectHelper(this.alCompany);

            #endregion

            Neusoft.FrameWork.Management.DataBaseManger dataBaseManager = new Neusoft.FrameWork.Management.DataBaseManger();
            DateTime sysTime = dataBaseManager.GetDateTimeFromSysDateTime().Date.AddDays(1);
            this.dtBegin = sysTime.AddDays(-30);
            this.dtEnd   = sysTime;

            this.privOper = dataBaseManager.Operator;

            this.payFlag = "'0','1'";
        }
Esempio n. 6
0
        /// <summary>
        /// 初始化
        /// </summary>
        protected void Init()
        {
            ArrayList al = new ArrayList();

            #region 银行信息

            Neusoft.HISFC.BizLogic.Manager.Constant constantManager = new Neusoft.HISFC.BizLogic.Manager.Constant();
            al = constantManager.GetList("BANK");
            if (al == null)
            {
                MessageBox.Show(Language.Msg("获取银行列表失败" + constantManager.Err));
                return;
            }
            bankHelper.ArrayObject = al;

            #endregion

            #region 人员

            Neusoft.HISFC.BizLogic.Manager.Person personManager = new Neusoft.HISFC.BizLogic.Manager.Person();
            al = personManager.GetEmployeeAll();
            if (al == null)
            {
                MessageBox.Show(Language.Msg("获取所有人员列表" + personManager.Err));
                return;
            }
            this.personHelper.ArrayObject = al;

            #endregion

            #region 供应商

            Neusoft.HISFC.BizLogic.Material.ComCompany companyManager = new Neusoft.HISFC.BizLogic.Material.ComCompany();

            this.alCompany = companyManager.QueryCompany("1", "A");

            if (this.alCompany == null)
            {
                MessageBox.Show(constantManager.Err);
                return;
            }

            #endregion

            #region 时间

            Neusoft.FrameWork.Management.DataBaseManger databaseManager = new Neusoft.FrameWork.Management.DataBaseManger();
            DateTime sysTime = databaseManager.GetDateTimeFromSysDateTime().Date.AddDays(1);
            this.dtBegin = sysTime.AddDays(-30);
            this.dtEnd   = sysTime;

            this.privOper = databaseManager.Operator;

            this.payFlag = "'0','1'";

            #endregion
        }
        private void cmbDoc_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (this.cmbDoc.Tag == null)
            {
                return;
            }

            string docCode = this.cmbDoc.Tag.ToString();

            Neusoft.HISFC.BizLogic.Manager.Person personManager = new Neusoft.HISFC.BizLogic.Manager.Person();
            Neusoft.HISFC.Models.Base.Employee    person        = personManager.GetPersonByID(docCode);

            this.lbDocInfo.Text = string.Format("医生信息: {0} 职级 {1} 职务 {2}", person.Name, person.Level.ID, person.Duty.ID);
        }
        /// <summary>
        /// 初始化
        /// </summary>
        /// <returns></returns>
        public int Init()
        {
            Neusoft.HISFC.BizLogic.Manager.Department deptManager = new Neusoft.HISFC.BizLogic.Manager.Department();
            ArrayList alDpet = deptManager.GetDeptmentAll();

            this.cmbDept.AddItems(alDpet);

            Neusoft.HISFC.BizLogic.Manager.Person personManager = new Neusoft.HISFC.BizLogic.Manager.Person();
            ArrayList alPerson = personManager.GetEmployeeAll();

            this.cmbDoc.AddItems(alPerson);

            this.InitDataTable();

            return(1);
        }
Esempio n. 9
0
        private void frmLendCard_Load(object sender, System.EventArgs e)
        {
            //InitDateTable();
            LockFp();
            Neusoft.HISFC.BizLogic.Manager.Person      person     = new Neusoft.HISFC.BizLogic.Manager.Person();
            Neusoft.HISFC.BizProcess.Integrate.Manager managerMgr = new Neusoft.HISFC.BizProcess.Integrate.Manager();
            //获取人员列表
            ArrayList DoctorList = person.GetEmployeeAll();

            this.comPerson.AppendItems(DoctorList);
            txReturnTime.Value         = Neusoft.FrameWork.Function.NConvert.ToDateTime(baseDml.GetSysDate()).AddDays(14);
            comPerson.BackColor        = System.Drawing.Color.White;
            this.SexHelper.ArrayObject = Neusoft.HISFC.Models.Base.SexEnumService.List();
            ArrayList list = managerMgr.GetConstantList(Neusoft.HISFC.Models.Base.EnumConstant.NATION);

            this.NationalHelper.ArrayObject = list;
        }
Esempio n. 10
0
        public int Query()
        {
            DateTime myBeginDate = this.dtpBeginDate.Value; //取开始时间

            DateTime myEndDate = this.dtpEndDate.Value;     //取结束时间


            //判断时间的有效性

            if (myEndDate.CompareTo(myBeginDate) < 0)
            {
                MessageBox.Show(Neusoft.FrameWork.Management.Language.Msg("终止时间必须大于起始时间"));
                return(-1);
            }

            this.lblTop.Text = Neusoft.FrameWork.Management.Language.Msg("统计时间:") + myBeginDate.ToString() + " - " + myEndDate.ToString();

            Neusoft.HISFC.BizLogic.Manager.Report report = new Neusoft.HISFC.BizLogic.Manager.Report();

            Neusoft.HISFC.BizLogic.Manager.Person ps  = new Neusoft.HISFC.BizLogic.Manager.Person();
            Neusoft.HISFC.Models.Base.Employee    var = new Neusoft.HISFC.Models.Base.Employee();
            var            = ps.GetPersonByID(ps.Operator.ID);
            this.myDataSet = new DataSet();
            int parm = report.ExecQuery(reportParm, ref this.myDataSet, myBeginDate.ToString(), myEndDate.ToString(), var.Dept.ID);

            if (parm == -1)
            {
                MessageBox.Show(Neusoft.FrameWork.Management.Language.Msg(report.Err));
                return(-1);
            }

            //对farpoint绑定数据源

            this.myDataView = new DataView(myDataSet.Tables[0]);
            this.neuSpread1_Sheet1.DataSource = this.myDataView;

            //格式化 该函数不在起作用
            this.SetFormat();

            if (this.iIndex != null)
            {
                this.SetSum(this.iTextIndex, this.iIndex);
            }
            return(1);
        }
Esempio n. 11
0
        /// <summary>
        /// 设置领送人
        /// </summary>
        /// <param name="isAllEmployee">所有人员 设置为True时 employeeType参数无意义</param>
        /// <param name="personType">人员类别</param>
        /// <returns>成功返回1 失败返回-1</returns>
        public int SetTargetPerson(bool isAllEmployee, Neusoft.HISFC.Models.Base.EnumEmployeeType personType)
        {
            this.alTargetPerson.Clear();

            this.lnbTargetPerson.Visible = true;
            this.cmbTargetPerson.Visible = true;

            Neusoft.HISFC.BizLogic.Manager.Person managerIntegrate = new Neusoft.HISFC.BizLogic.Manager.Person();
            if (isAllEmployee)
            {
                this.alTargetPerson = managerIntegrate.GetEmployeeAll();
            }
            else
            {
                this.alTargetPerson = managerIntegrate.GetEmployee(personType);
            }

            if (this.alTargetPerson == null)
            {
                MessageBox.Show("根据人员类别获取人员列表发生错误" + managerIntegrate.Err);
                return(-1);
            }

            if (this.isSetDefaultTargetPerson)
            {
                if (this.targetPerson.ID == "")
                {
                    if (this.alTargetPerson.Count > 0)
                    {
                        if (this.localTargetPerson != null && this.localTargetPerson.ID != "")
                        {
                            this.TargetPerson      = this.localTargetPerson;
                            this.localTargetPerson = null;
                        }
                        else
                        {
                            this.TargetPerson = this.alTargetPerson[0] as Neusoft.FrameWork.Models.NeuObject;
                        }
                    }
                }
            }

            return(1);
        }
Esempio n. 12
0
        private void frmCardManage_Load(object sender, System.EventArgs e)
        {
            if (card.GetCardInfo(ref ds) != -1)
            {
                this.fpSpread1_Sheet1.DataSource = ds;
            }
            LockFp();
            Neusoft.HISFC.BizLogic.Manager.Person person = new Neusoft.HISFC.BizLogic.Manager.Person();
            //获取人员列表
            ArrayList DoctorList = person.GetEmployeeAll();

            frm.SetPersonList(DoctorList);

            Neusoft.HISFC.BizLogic.Manager.Department dept = new Neusoft.HISFC.BizLogic.Manager.Department();
            //获取部门列表
            ArrayList deptList = dept.GetInHosDepartment();

            frm.SetDeptList(deptList);
            frm.SaveHandle += new frmCaseCard.SaveInfo(frm_SaveHandle);
        }
Esempio n. 13
0
        /// <summary>
        /// 初始化
        /// </summary>
        private int Init()
        {
            Neusoft.FrameWork.WinForms.Classes.Function.ShowWaitForm("正在加载查询数据 请稍候");
            Application.DoEvents();
            Neusoft.HISFC.BizLogic.Manager.Department deptManager   = new Neusoft.HISFC.BizLogic.Manager.Department();
            Neusoft.HISFC.BizLogic.Manager.Person     personManager = new Neusoft.HISFC.BizLogic.Manager.Person();

            DateTime sysTime = deptManager.GetDateTimeFromSysDateTime();

            this.dtBegin.Value = sysTime.Date.AddDays(-1);
            this.dtEnd.Value   = sysTime;

            ArrayList al = deptManager.GetDeptmentAll();

            if (al == null)
            {
                Function.ShowMsg("加载科室列表失败" + deptManager.Err);
                return(-1);
            }
            foreach (Neusoft.HISFC.Models.Base.Department info in al)
            {
                if (info.DeptType.ID.ToString() == "P")
                {
                    this.deptData.Add(info);
                }
            }

            this.personData = personManager.GetEmployeeAll();
            if (this.personData == null)
            {
                Function.ShowMsg("加载人员列表失败" + personManager.Err);
                return(-1);
            }

            this.privDept = ((Neusoft.HISFC.Models.Base.Employee)deptManager.Operator).Dept;
            this.privOper = deptManager.Operator;

            Neusoft.FrameWork.WinForms.Classes.Function.HideWaitForm();
            return(1);
        }
Esempio n. 14
0
        private void tree_AfterSelect(object sender, TreeViewEventArgs e)
        {
            try
            {
                Neusoft.HISFC.Models.Base.Department obj;
                //得到node的Tag
                obj = (Neusoft.HISFC.Models.Base.Department)e.Node.Tag;
                if (obj == null)
                {
                    return;
                }
                ArrayList al = new ArrayList();

                Neusoft.HISFC.BizLogic.Manager.Person      manager  = new Neusoft.HISFC.BizLogic.Manager.Person();
                Neusoft.HISFC.BizLogic.Manager.UserManager manager1 = new Neusoft.HISFC.BizLogic.Manager.UserManager();
                //科室人员
                al = manager.GetEmployee(obj.ID);
                this.neuSpread1_Sheet1.Rows.Count = 0;
                //加载人员信息
                foreach (Neusoft.HISFC.Models.Base.Employee objPerson1 in al)
                {
                    Neusoft.HISFC.Models.Base.Employee objPerson = new Neusoft.HISFC.Models.Base.Employee();
                    objPerson = manager1.GetPerson(objPerson1.ID);
                    this.neuSpread1_Sheet1.Rows.Add(0, 1);
                    this.neuSpread1_Sheet1.Cells[0, 0].Text = objPerson.Name;
                    this.neuSpread1_Sheet1.Cells[0, 1].Text = objPerson.EmployeeType.Name;
                    this.neuSpread1_Sheet1.Cells[0, 2].Text = objPerson.Memo;
                    this.neuSpread1_Sheet1.Rows[0].Tag      = objPerson;

                    if (objPerson.PermissionGroup == null || objPerson.PermissionGroup.Count == 0)
                    {
                        this.neuSpread1_Sheet1.Rows[0].BackColor = Color.Gray;
                    }
                }
            }
            catch
            {
                MessageBox.Show("显示数据失败!", "错误提示", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
Esempio n. 15
0
        /// <summary>
        /// 数据初始化
        /// </summary>
        /// <returns></returns>
        private int Init()
        {
            //药品列表加载
            this.ucDrugList1.ShowInfoList("Pharmacy.Item.SpeDrug", new string[] { "SPELL_CODE", "WB_CODE", "TRADE_NAME", "CUSTOM_CODE" });

            this.ucDrugList1.SetFormat(new string[] { "编码", "商品名称", "规格", "拼音码", "五笔码", "自定义码" }, new int[] { 100, 120, 100, 60, 60, 60 }, new bool[] { false, true, true, false, false, false, false, false, false, false });


            Neusoft.HISFC.BizLogic.Manager.Department deptManager = new Neusoft.HISFC.BizLogic.Manager.Department();
            this.alDpet = deptManager.GetDeptmentAll();
            if (this.alDpet == null)
            {
                MessageBox.Show(Language.Msg("科室列表加载失败") + deptManager.Err);
                return(-1);
            }

            Neusoft.HISFC.BizLogic.Manager.Person personManager = new Neusoft.HISFC.BizLogic.Manager.Person();
            this.alPerson = personManager.GetEmployeeAll();
            if (this.alPerson == null)
            {
                MessageBox.Show(Language.Msg("人员列表加载失败") + personManager.Err);
                return(-1);
            }

            this.SetItemListWidth(3);

            #region 屏蔽Fp回车/换行键

            FarPoint.Win.Spread.InputMap im;

            im = this.neuSpread1.GetInputMap(FarPoint.Win.Spread.InputMapMode.WhenAncestorOfFocused);
            im.Put(new FarPoint.Win.Spread.Keystroke(Keys.Enter, Keys.None), FarPoint.Win.Spread.SpreadActions.None);

            im = this.neuSpread1.GetInputMap(FarPoint.Win.Spread.InputMapMode.WhenAncestorOfFocused);
            im.Put(new FarPoint.Win.Spread.Keystroke(Keys.Space, Keys.None), FarPoint.Win.Spread.SpreadActions.None);

            #endregion

            return(1);
        }
        /// <summary>
        /// 选择人员
        /// </summary>
        private void ChooseUser()
        {
            //取此统计分类下面不存在的人员
            Neusoft.HISFC.BizLogic.Manager.Person person = new Neusoft.HISFC.BizLogic.Manager.Person();
            ArrayList al = person.GetEmployeeForStat(this.userPowerDetail.Class1Code, this.userPowerDetail.Dept.ID);

            if (al == null)
            {
                MessageBox.Show(person.Err);
                return;
            }
            GetPersonObj(al);
            //Neusoft.FrameWork.Models.NeuObject neuObj = null;
            //if (Neusoft.FrameWork.WinForms.Classes.Function.ChooseItem(al, ref neuObj) == 0) return;

            ////取返回数据的编码和名称
            //this.lblCode.Text = neuObj.ID;
            //this.comboName.Text = neuObj.Name;
            //Neusoft.HISFC.Models.Base.Employee objPer = this.psMgr.GetPersonByID(neuObj.ID);
            //if (objPer == null)
            //{
            //    MessageBox.Show("查询人员信息失败");
            //    return;
            //}

            //this.setInfo(objPer);

            //#region 默认选中多科室
            //foreach (ListViewItem lvi in this.lvPrivList.Items)
            //{
            //    Neusoft.HISFC.Models.Admin.PowerLevelClass3 class3 = lvi.Tag as Neusoft.HISFC.Models.Admin.PowerLevelClass3;
            //    if (class3.Class3Code == "01" && class3.Class2Code == "0000")
            //    {
            //        lvi.Checked = true;
            //    }
            //}
            //#endregion
            //this.txtMark.Focus();
        }
Esempio n. 17
0
        /// <summary>
        /// 数据初始化
        /// </summary>
        protected void Init()
        {
            Neusoft.FrameWork.WinForms.Classes.Function.ShowWaitForm("正在加载基础查询数据 请稍候...");
            Application.DoEvents();

            Neusoft.HISFC.BizLogic.Manager.Department deptManager = new Neusoft.HISFC.BizLogic.Manager.Department();
            System.Collections.ArrayList alDept = deptManager.GetDeptmentAll();
            if (alDept == null)
            {
                Neusoft.FrameWork.WinForms.Classes.Function.HideWaitForm();
                MessageBox.Show("加载科室列表失败");
                return;
            }
            System.Collections.ArrayList alData = new System.Collections.ArrayList();
            foreach (Neusoft.HISFC.Models.Base.Department info in alDept)
            {
                if (info.DeptType.ID.ToString() == "P" || info.DeptType.ID.ToString() == "PI")
                {
                    alData.Add(info);
                }
            }
            this.InitItemData(0, Neusoft.HISFC.Components.Pharmacy.Report.CustomItemTypeEnum.Custom, "查询药品:", alData);

            if (this.isShowDrug)
            {
                this.InitItemData(1, Neusoft.HISFC.Components.Pharmacy.Report.CustomItemTypeEnum.Drug, "", null);
                this.ckSingle.Visible = true;
            }
            else
            {
                this.ckSingle.Visible = false;
            }

            Neusoft.HISFC.BizLogic.Manager.Person personManager = new Neusoft.HISFC.BizLogic.Manager.Person();
            System.Collections.ArrayList          alPerson      = personManager.GetEmployeeAll();
            this.personHelper = new Neusoft.FrameWork.Public.ObjectHelper(alPerson);

            Neusoft.FrameWork.WinForms.Classes.Function.HideWaitForm();
        }
Esempio n. 18
0
 /// <summary>
 /// 判断是不是要废弃或停用,如果停用或废弃 ,判断本科室下是不是 有没有停用或废弃的人员 如果有 返回FALSE 否则 返回true
 /// </summary>
 /// <returns></returns>
 private bool IsDisuse()
 {
     if (this.radioBValid2.Checked || this.radioBValid3.Checked)
     {
         if (department != null)
         {
             Neusoft.HISFC.BizLogic.Manager.Person p = new Neusoft.HISFC.BizLogic.Manager.Person();
             ArrayList list = new ArrayList();
             list = p.GetPersonsByDeptID(department.ID);
             if (list != null)
             {
                 if (list.Count > 0)
                 {
                     MessageBox.Show("要废弃或停用本科室,请先将本科室内的人员转移或置成废弃或停用");
                     return(false);
                 }
             }
         }
     }
     return(true);
     //departmentInfo
 }
Esempio n. 19
0
        /// <summary>
        /// 清除数字签名
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnDele_Click(object sender, EventArgs e)
        {
            this.picBox.Image                     = null;
            this.picBox.ImageLocation             = null;
            this.employee.EmployeeExt.DigitalSign = null;

            Neusoft.HISFC.Models.Base.Employee empl = ConvertUcContextToObject();

            if (empl == null)
            {
                return;
            }

            try
            {
                Neusoft.FrameWork.Management.PublicTrans.BeginTransaction();

                Neusoft.HISFC.BizLogic.Manager.Person perMgr = new Neusoft.HISFC.BizLogic.Manager.Person();

                if (perMgr.DeleEmplDigitalSignByID(empl.ID) == -1)
                {
                    Neusoft.FrameWork.Management.PublicTrans.RollBack();
                    MessageBox.Show("删除失败!");
                    return;
                }

                Neusoft.FrameWork.Management.PublicTrans.Commit();
                MessageBox.Show("删除成功!");
                tr = true;
                return;
            }
            catch (Exception a)
            {
                MessageBox.Show(a.Message);
                return;
            }
        }
Esempio n. 20
0
        /// <summary>
        /// 检索查询结果
        /// </summary>
        public virtual void Query()
        {
            // TODO:  添加 ucReportBase.Query 实现

            this.myBeginDate = this.dtpBeginDate.Value; //取开始时间
            this.myEndDate   = this.dtpEndDate.Value;   //取结束时间

            //判断时间的有效性
            if (this.myEndDate.CompareTo(this.myBeginDate) < 0)
            {
                MessageBox.Show("终止时间必须大于起始时间!", "提示");
                return;
            }

            this.lblTop.Text = "统计时间:" + this.myBeginDate.ToString() + " - " + this.myEndDate.ToString();
            this.lblTop.Text = "统计科室:" + this.cmbDept.Text + "               统计日期:"
                               //+ this.myBeginDate.ToString() + " - " + this.myEndDate.ToString();
                               + System.DateTime.Now.ToString("yyyy-MM-dd");

            Neusoft.HISFC.BizLogic.Manager.Report report = new Neusoft.HISFC.BizLogic.Manager.Report();
            //检索数据,返回dataset
            //this.myDataSet = report.Query(reportParm, this.myBeginDate, this.myEndDate);
            Neusoft.HISFC.BizLogic.Manager.Person ps  = new Neusoft.HISFC.BizLogic.Manager.Person();
            Neusoft.HISFC.Models.Base.Employee    var = new Neusoft.HISFC.Models.Base.Employee();// Neusoft.FrameWork.WinForms.BaseVar();
            var            = ps.GetPersonByID(ps.Operator.ID);
            this.myDataSet = new DataSet();

            try
            {
                if (this.cmbItem.Tag == null || this.cmbItem.Tag.ToString() == "" || this.cmbItem.SelectedIndex < 0)
                {
                    this.cmbItem.Tag = "ALL";
                }

                if (this.cmbDept.Tag == null || this.cmbItem.Tag == null)
                {
                    MessageBox.Show("请先选择好申请科室!");
                    return;
                }

                int parm = report.ExecQuery("Material.Report.GetApplyInfoHistory", ref this.myDataSet,
                                            this.cmbDept.Tag.ToString(), this.cmbItem.Tag.ToString(),
                                            this.dtpBeginDate.Value.ToString("yyyy-MM-dd HH:mm:ss"),
                                            this.dtpEndDate.Value.ToString("yyyy-MM-dd HH:mm:ss"));
                if (parm == -1)
                {
                    MessageBox.Show(report.Err);
                    return;
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
            //格式配置文件地址

            //对farpoint绑定数据源
            this.myDataView = new DataView(myDataSet.Tables[0]);
            this.neuSpread1_Sheet1.DataSource = this.myDataView;
            this.neuSpread1_Sheet1.ColumnHeader.DefaultStyle.BackColor = System.Drawing.Color.White;
            this.neuSpread1_Sheet1.RowHeader.DefaultStyle.BackColor    = System.Drawing.Color.White;
            this.neuSpread1_Sheet1.SheetCornerStyle.BackColor          = System.Drawing.Color.White;
            this.neuSpread1_Sheet1.GrayAreaBackColor = System.Drawing.Color.White;
            this.SetFormat();

            if (this.iIndex != null)
            {
                this.SetSum(this.iTextIndex, this.iIndex);
            }
        }
Esempio n. 21
0
        public void LoadInfo()
        {
            try
            {
                ArrayList alZG      = new ArrayList();
                ArrayList alDepts   = null; //在院科室
                ArrayList alDoctors = null; //在院医生
                Neusoft.HISFC.BizLogic.Manager.Constant   Constant    = new Neusoft.HISFC.BizLogic.Manager.Constant();
                Neusoft.HISFC.BizLogic.Manager.Person     p           = new Neusoft.HISFC.BizLogic.Manager.Person();
                Neusoft.HISFC.BizLogic.Manager.Department managerDept = new Neusoft.HISFC.BizLogic.Manager.Department();
                //初始化结算方式
                this.payKindCbx.ShowCustomerList = false;
                this.payKindCbx.AddItems(Constant.GetList(Neusoft.HISFC.Models.Base.EnumConstant.PAYKIND));
                //初始化性别:
                this.sexComboBox.ShowCustomerList = false;
                this.sexComboBox.AddItems(Neusoft.HISFC.Models.Base.SexEnumService.List());
                //初始化婚姻信息:
                this.marryComboBox.ShowCustomerList = false;
                this.marryComboBox.AddItems(Neusoft.HISFC.Models.RADT.MaritalStatusEnumService.List());
                //初始化工作信息:
                this.workComboBox.ShowCustomerList = false;
                this.workComboBox.AddItems(Constant.GetList(Neusoft.HISFC.Models.Base.EnumConstant.PROFESSION));
                //初始化出生地信息:
                this.birthInComboBox.ShowCustomerList = false;
                this.birthInComboBox.AddItems(Constant.GetList(Neusoft.HISFC.Models.Base.EnumConstant.AREA));
                //初始化民族信息
                this.nationComboBox.ShowCustomerList = false;
                this.nationComboBox.AddItems(Constant.GetList(Neusoft.HISFC.Models.Base.EnumConstant.NATION));
                //初始化籍贯信息
                this.districtComboBox.ShowCustomerList = false;
                this.districtComboBox.AddItems(Constant.GetList(Neusoft.HISFC.Models.Base.EnumConstant.DIST));
                //初始化与患者关系信息
                this.relationComboBox.ShowCustomerList = false;
                this.relationComboBox.AddItems(Constant.GetList(Neusoft.HISFC.Models.Base.EnumConstant.RELATIVE));
                //初始化入院情况信息
                this.inCircsComboBox.ShowCustomerList = false;
                this.inCircsComboBox.AddItems(Constant.GetList(Neusoft.HISFC.Models.Base.EnumConstant.INCIRCS));


                alDoctors = p.GetEmployee(Neusoft.HISFC.Models.Base.EnumEmployeeType.D);
                //质控医生
                this.QcDocComboBox.AddItems(alDoctors);
                //主任医生
                this.chiefDocComboBox.AddItems(alDoctors);
                //主治医生
                this.chargeDocComboBox.AddItems(alDoctors);
                //住院医生
                this.houseDocComboBox.AddItems(alDoctors);
                //实习医生
                this.refDocComboBox.AddItems(alDoctors);
                //实习
                this.praDocComboBox.AddItems(alDoctors);
                //研究生
                this.graDocComboBox.AddItems(alDoctors);
                //护士
                this.QcNurComboBox.AddItems(p.GetEmployee(Neusoft.HISFC.Models.Base.EnumEmployeeType.N));
                //操作员
                this.operComboBox.AddItems(p.GetEmployeeAll());

                //转归
                alZG = Constant.GetList(Neusoft.HISFC.Models.Base.EnumConstant.ZG);

                try
                {
                    alDepts = managerDept.GetInHosDepartment();
                }
                catch { MessageBox.Show("获得在院科室出错!"); }

                //转往科室
                inDeptComboBox.AddItems(alDepts);
                this.changeDeptFirstComboBox.AddItems(alDepts);
                this.changeDeptSecondComboBox.AddItems(alDepts);
                this.changeDeptThirdComboBox.AddItems(alDepts);
                this.outDeptComboBox.AddItems(alDepts);
            }
            catch (Exception ex) { MessageBox.Show(ex.Message); }
        }
        /// <summary>
        /// 打印控件赋值
        /// </summary>
        /// <param name="patientInfo">患者实体</param>
        /// <param name="balanceHead">发票</param>
        /// <param name="alBalanceList">发票明细</param>
        /// <param name="IsPreview">是否预览</param>
        /// <returns></returns>
        protected int SetZYYBFPPrintValue(
            Neusoft.HISFC.Models.RADT.PatientInfo patientInfo,
            Neusoft.HISFC.Models.Fee.Inpatient.Balance balanceHead,
            ArrayList alBalanceList,
            bool IsPreview)
        {
            #region 设置自费发票打印内容
            ucZYYBFP ucReceipt = (ucZYYBFP)c;

            #region 医疗机构
            //医院名称从数据库获取 {8A045104-A387-48e7-91A5-6E362E44B765} wbo 2010-08-20
            Neusoft.HISFC.BizProcess.Integrate.Manager mgr = new Neusoft.HISFC.BizProcess.Integrate.Manager();
            ucReceipt.lblHospitalName.Text = mgr.GetHospitalName();
            //ucReceipt.lblHospitalName.Text = "中国北车集团长春客车厂职工医院";
            #endregion
            //电脑编号
            ucReceipt.lblSSN.Text = patientInfo.SSN;
            //病房
            ucReceipt.lblNurseCellName.Text = patientInfo.PVisit.PatientLocation.NurseCell.Name;
            //基本信息
            //病案号
            ucReceipt.lblCaseNO.Text = patientInfo.PID.CaseNO;
            //结算日期
            ucReceipt.lblDate.Text = balanceHead.BalanceOper.OperTime.ToString("yyyy    MM    dd");
            //姓名
            ucReceipt.lblName.Text = patientInfo.Name;
            //住院日期
            ucReceipt.lblInTime.Text = balanceHead.BeginTime.ToString("yyyy    MM    dd     HH     mm");
            //住院日期
            ucReceipt.lblInTime.Text = balanceHead.BeginTime.ToString("yyyy    MM    dd     HH     mm");

            #region //出院日期如果没有,那么打现在的日期 {02F13455-1B64-48bb-9C69-1D2C9038E3B0} wbo 2010-08-20

            Neusoft.HISFC.BizLogic.Manager.Constant consMgr = new Neusoft.HISFC.BizLogic.Manager.Constant();
            DateTime dt = consMgr.GetDateTimeFromSysDateTime();
            if (MidBalanceFlag == Neusoft.HISFC.Models.Base.EBlanceType.Mid)
            {
                if (balanceHead.EndTime < new DateTime(1900, 1, 1))
                {
                    ucReceipt.lblOutTime.Text = dt.ToShortDateString();
                    ucReceipt.lblInDay.Text   = new TimeSpan(dt.Ticks - balanceHead.BeginTime.Ticks).Days.ToString();
                }
                else
                {
                    ucReceipt.lblOutTime.Text = balanceHead.EndTime.ToShortDateString();
                    ucReceipt.lblInDay.Text   = new TimeSpan(balanceHead.EndTime.Ticks - balanceHead.BeginTime.Ticks).Days.ToString();
                }
            }
            else
            {
                if (patientInfo.PVisit.OutTime < new DateTime(1900, 1, 1))
                {
                    ucReceipt.lblOutTime.Text = dt.ToShortDateString();
                    ucReceipt.lblInDay.Text   = new TimeSpan(dt.Ticks - balanceHead.BeginTime.Ticks).Days.ToString();
                }
                else
                {
                    ucReceipt.lblOutTime.Text = patientInfo.PVisit.OutTime.ToShortDateString();
                    ucReceipt.lblInDay.Text   = new TimeSpan(patientInfo.PVisit.OutTime.Ticks - balanceHead.BeginTime.Ticks).Days.ToString();
                }
            }
            //if (MidBalanceFlag == Neusoft.HISFC.Models.Base.EBlanceType.Mid)
            //{
            //    ucReceipt.lblOutTime.Text = balanceHead.EndTime.ToShortDateString();
            //    ucReceipt.lblInDay.Text = new TimeSpan(balanceHead.EndTime.Ticks - balanceHead.BeginTime.Ticks).Days.ToString();
            //}
            //else
            //{
            //    ucReceipt.lblOutTime.Text = patientInfo.PVisit.OutTime.ToShortDateString();
            //    ucReceipt.lblInDay.Text = new TimeSpan(patientInfo.PVisit.OutTime.Ticks - balanceHead.BeginTime.Ticks).Days.ToString();
            //}
            #endregion
            ////科室
            //ucReceipt.lblDeptName.Text = patientInfo.PVisit.PatientLocation.Dept.Name;

            //结算员

            Neusoft.HISFC.BizLogic.Manager.Person person = new Neusoft.HISFC.BizLogic.Manager.Person();
            string operUserCode = string.Empty;
            operUserCode = person.GetPersonByID(balanceHead.BalanceOper.ID).Name;

            ucReceipt.lblOperName.Text = operUserCode;

            ////操作员



            //ucReceipt.lblBalanceName.Text = balanceHead.Oper.ID;

            #region 医保信息
            ucReceipt.lblSSNTitle.Visible     = false;
            ucReceipt.lblPayCostTitle.Visible = false;
            ucReceipt.lblPubCostTitle.Visible = false;
            ucReceipt.lblOwnCost.Visible      = false;
            ucReceipt.lblPubCost.Visible      = false;
            ucReceipt.lblPayCost.Visible      = false;
            ucReceipt.lblOverCost.Visible     = false;
            ucReceipt.lblSSN.Visible          = false;
            ucReceipt.lblOwnCostTitle.Visible = false;

            if (balanceHead.Patient.Pact.PayKind.ID == "02")
            {
                ucReceipt.lblSSNTitle.Visible     = true;
                ucReceipt.lblPayCostTitle.Visible = true;
                ucReceipt.lblPubCostTitle.Visible = true;
                ucReceipt.lblOwnCost.Visible      = true;
                ucReceipt.lblPubCost.Visible      = true;
                ucReceipt.lblPayCost.Visible      = true;
                ucReceipt.lblOverCost.Visible     = true;
                ucReceipt.lblSSN.Visible          = true;
                ucReceipt.lblOwnCostTitle.Visible = true;
                ucReceipt.lblSSN.Text             = patientInfo.SSN;
                decimal GeRenCost      = decimal.Zero;
                decimal TongChouCost   = decimal.Zero;
                decimal XianJinCost    = decimal.Zero;
                decimal GongWuYuanCost = decimal.Zero;
                decimal DaECost        = decimal.Zero;
                //个人账户支付
                GeRenCost = patientInfo.SIMainInfo.PayCost;
                if (GeRenCost != 0)
                {
                    ucReceipt.lblPayCost.Text = Neusoft.FrameWork.Public.String.FormatNumberReturnString(GeRenCost, 2);
                }
                //统筹基金支付
                TongChouCost = patientInfo.SIMainInfo.PubCost;
                if (TongChouCost != 0)
                {
                    ucReceipt.lblPubCost.Text = Neusoft.FrameWork.Public.String.FormatNumberReturnString(TongChouCost, 2);
                }
                //现金支付
                XianJinCost = patientInfo.SIMainInfo.OwnCost;
                if (XianJinCost != 0)
                {
                    ucReceipt.lblOwnCost.Text   = Neusoft.FrameWork.Public.String.FormatNumberReturnString(XianJinCost, 2);
                    ucReceipt.lblUpOwnCost.Text = Neusoft.FrameWork.Public.String.LowerMoneyToUpper(Neusoft.FrameWork.Public.String.FormatNumber(XianJinCost, 2));
                }
                //公务员补助

                //GongWuYuanCost = patientInfo.SIMainInfo.OfficalCost;
                //if (GongWuYuanCost > 0)
                //{
                //    ucReceipt.lblGongWuYuanCost.Text = Neusoft.FrameWork.Public.String.FormatNumberReturnString(GongWuYuanCost, 2);
                //}
                //大额补助
                DaECost = patientInfo.SIMainInfo.OverCost;
                if (DaECost != 0)
                {
                    ucReceipt.lblOverCost.Text = Neusoft.FrameWork.Public.String.FormatNumberReturnString(DaECost, 2);
                } //-----1---------------------------2----------------3-----------------------4-----------------------5-----------------6----------------
                //|医疗费总额TotCost|个人帐户支付金额PayCost|统筹支付金额PubCost|个人现金支付OwnCost|救助金支出金额OverCost|公务员补助支出金额OfficalCost
                //-----------------7------------------8-----------------------9-----------
                //|保健对象补贴支出BaseCost|离休人员统筹支出PubOwnCost|医院付担金额HosCost
                //-------------10-------------11----------------------12------------13------------------
                //|上次进入统筹医疗费用累计|本次进入统筹医疗费用金额|上次个人帐户余额|个人自费金额
                //----14---------------15-------------16--------------------------------17----------
                //|乙类药品个人自理|起付标准自付金额|分段自理金额|超过封顶线个人自付金额|住院封顶线以上公务员补助支出金额
                //----18---------------------------19------20--------------21--------------------
                //|住院自付部分公务员补助支出金额|住院人次|工伤基金支付金额|生育基金支付金额|
                string[] temp = patientInfo.SIMainInfo.Memo.Split('|');
                ucReceipt.lblTemp18.Text = temp[18];
                ucReceipt.lblTemp6.Text  = temp[6];
                ucReceipt.lblTemp7.Text  = temp[7];
                ucReceipt.lblTemp8.Text  = temp[8];
                ucReceipt.lblTemp20.Text = temp[20];
                ucReceipt.lblTemp21.Text = temp[21];
                ucReceipt.lblTemp15.Text = temp[15];
                ucReceipt.lblTemp13.Text = temp[13];
            }
            #endregion
            //票面信息
            decimal[] FeeInfo =
                //---------------------1-----------2------------3------------4-------------5-----------------
                new decimal[18] {
                decimal.Zero, decimal.Zero, decimal.Zero, decimal.Zero, decimal.Zero,
                decimal.Zero, decimal.Zero, decimal.Zero, decimal.Zero, decimal.Zero,
                //decimal.Zero,decimal.Zero,decimal.Zero,decimal.Zero,decimal.Zero,
                decimal.Zero, decimal.Zero, decimal.Zero,              //decimal.Zero,
                decimal.Zero, decimal.Zero, decimal.Zero, decimal.Zero, decimal.Zero
            };
            //票面信息
            string[] FeeInfoName =
                //---------------------1-----------2------------3------------4-------------5-----------------
                new string[18] {
                string.Empty, string.Empty, string.Empty, string.Empty, string.Empty,
                string.Empty, string.Empty, string.Empty, string.Empty, string.Empty,
                //string.Empty,string.Empty,string.Empty,string.Empty,string.Empty,
                string.Empty, string.Empty, string.Empty,               //string.Empty,
                string.Empty, string.Empty, string.Empty, string.Empty, string.Empty
            };

            for (int i = 0; i < alBalanceList.Count; i++)
            {
                Neusoft.HISFC.Models.Fee.Inpatient.BalanceList detail = new Neusoft.HISFC.Models.Fee.Inpatient.BalanceList();
                detail = (Neusoft.HISFC.Models.Fee.Inpatient.BalanceList)alBalanceList[i];
                if (detail.FeeCodeStat.SortID <= FeeInfo.Length)
                {
                    FeeInfo[detail.FeeCodeStat.SortID - 1] += detail.BalanceBase.FT.TotCost;
                    if (detail.FeeCodeStat.StatCate.Name.Length > 5)
                    {
                        FeeInfoName[detail.FeeCodeStat.SortID - 1] += detail.FeeCodeStat.StatCate.Name.Substring(0, 5);
                    }
                    else
                    {
                        FeeInfoName[detail.FeeCodeStat.SortID - 1] += detail.FeeCodeStat.StatCate.Name;
                    }
                }
            }
            int feeInfoNameIdx = 0;
            int FeeInfoIndex   = 0;
            foreach (decimal d in FeeInfo)
            {
                //测试用
                //FeeInfo[FeeInfoIndex] = 999999.99m;
                //名称
                Label lName  = GetFeeNameLable("lblFeeName" + feeInfoNameIdx.ToString(), lblPrint);
                Label lValue = GetFeeNameLable("lblFeeInfo" + feeInfoNameIdx.ToString(), lblPrint);
                if (lName != null)
                {
                    if (FeeInfo[FeeInfoIndex] > 0)
                    {
                        //lName.Text = FeeInfoName[feeInfoNameIdx] + "普通人工器官材料费";
                        // lName.Text = FeeInfoName[FeeInfoIndex] + "";
                        lValue.Text = Neusoft.FrameWork.Public.String.FormatNumberReturnString(FeeInfo[FeeInfoIndex], 2).PadLeft(9, ' ');
                    }
                }
                FeeInfoIndex++;
                feeInfoNameIdx++;
            }
            //预收
            if (balanceHead.FT.PrepayCost - balanceHead.FT.BalancedPrepayCost != 0)
            {
                ucReceipt.lblPriPrepay.Text = Neusoft.FrameWork.Public.String.FormatNumberReturnString(balanceHead.FT.PrepayCost - balanceHead.FT.BalancedPrepayCost, 2);
            }
            //补收
            if (balanceHead.FT.SupplyCost != 0)
            {
                ucReceipt.lblPriReturn.Text = Neusoft.FrameWork.Public.String.FormatNumberReturnString(balanceHead.FT.SupplyCost, 2);
            }
            //退款
            if (balanceHead.FT.ReturnCost != 0)
            {
                ucReceipt.lblPriReturn.Text = Neusoft.FrameWork.Public.String.FormatNumberReturnString(0 - balanceHead.FT.ReturnCost, 2);
            }
            //发票号
            ucReceipt.lblInvoiceNO.Text = balanceHead.Invoice.ID;
            //总金额
            if (balanceHead.FT.TotCost != 0)
            {
                ucReceipt.lblTotCost.Text = Neusoft.FrameWork.Public.String.FormatNumberReturnString(balanceHead.FT.TotCost, 2);
            }
            #region 大写总金额
            if (balanceHead.FT.TotCost != 0)
            {
                ucReceipt.lblUpTotCost.Text = Neusoft.FrameWork.Public.String.LowerMoneyToUpper(Neusoft.FrameWork.Public.String.FormatNumber(balanceHead.FT.TotCost, 2));
            }
            #endregion
            #endregion

            return(0);
        }
Esempio n. 23
0
        /// <summary>
        /// 设置数据初始化
        /// </summary>
        /// <param name="itemIndex">需设置Item索引 取值范围 0 1 2</param>
        /// <param name="customItemType">数据类型</param>
        /// <param name="customTitle">Item标题</param>
        /// <param name="alCustomData">Item数据</param>
        /// <returns>成功返回1 失败返回-1</returns>
        protected virtual int InitItemData(int itemIndex, CustomItemTypeEnum customItemType, string customTitle, ArrayList alCustomData)
        {
            ArrayList alData    = new ArrayList();
            string    itemTitle = customTitle;

            #region 加载基础数据

            if (customItemType == CustomItemTypeEnum.Drug)
            {
                Neusoft.HISFC.BizLogic.Pharmacy.Item      itemManager = new Neusoft.HISFC.BizLogic.Pharmacy.Item();
                List <Neusoft.HISFC.Models.Pharmacy.Item> drugList    = itemManager.QueryItemList(false);
                if (drugList == null)
                {
                    MessageBox.Show(Neusoft.FrameWork.Management.Language.Msg("加载药品信息发生错误" + itemManager.Err));
                    return(-1);
                }
                alData    = new ArrayList(drugList.ToArray());
                itemTitle = "查询药品";
            }
            else if (customItemType == CustomItemTypeEnum.Dept)
            {
                Neusoft.HISFC.BizLogic.Manager.Department deptManager = new Neusoft.HISFC.BizLogic.Manager.Department();
                alData = deptManager.GetDeptmentAll();
                if (alData == null)
                {
                    MessageBox.Show(Neusoft.FrameWork.Management.Language.Msg("加载科室信息发生错误" + deptManager.Err));
                    return(-1);
                }
                itemTitle = "查询科室";
            }
            else if (customItemType == CustomItemTypeEnum.Employee)
            {
                Neusoft.HISFC.BizLogic.Manager.Person personManager = new Neusoft.HISFC.BizLogic.Manager.Person();
                alData = personManager.GetEmployeeAll();
                if (alData == null)
                {
                    MessageBox.Show(Neusoft.FrameWork.Management.Language.Msg("加载人员信息发生错误" + personManager.Err));
                    return(-1);
                }
                itemTitle = "查询人员";
            }
            else
            {
                alData = alCustomData;
            }

            #endregion

            switch (itemIndex)
            {
            case 0:
                this.lbItem1.Text = itemTitle;
                this.cmbItem1.AddItems(alData);

                this.lbItem1.Visible  = true;
                this.cmbItem1.Visible = true;
                break;

            case 1:
                this.lbItem2.Text = itemTitle;
                this.cmbItem2.AddItems(alData);

                this.lbItem2.Visible  = true;
                this.cmbItem2.Visible = true;
                break;

            case 2:
                this.lbItem3.Text = itemTitle;
                this.cmbItem3.AddItems(alData);

                this.lbItem3.Visible  = true;
                this.cmbItem3.Visible = true;
                break;
            }

            return(1);
        }
        /// <summary>
        /// 查询
        /// </summary>
        protected void Query()
        {
            if (this.cmbDept.Tag == null || this.cmbDept.Tag.ToString() == "")
            {
                MessageBox.Show(Language.Msg("请选择查询库房"));
                return;
            }
            if (!this.ckIgnoreDoc.Checked)
            {
                if (this.cmbDoc.Tag == null || this.cmbDoc.Tag.ToString() == "")
                {
                    MessageBox.Show(Language.Msg("请选择医生"));
                    return;
                }
            }

            Neusoft.HISFC.BizLogic.Pharmacy.Item        itemManager  = new Neusoft.HISFC.BizLogic.Pharmacy.Item();
            Neusoft.HISFC.BizProcess.Integrate.Pharmacy integratePha = new Neusoft.HISFC.BizProcess.Integrate.Pharmacy();

            string deptCode = this.cmbDept.Tag.ToString();
            string docCode  = "";
            string docGrade = "";

            if (!this.ckIgnoreDoc.Checked && this.cmbDoc.Tag != null)
            {
                docCode = this.cmbDoc.Tag.ToString();

                Neusoft.HISFC.BizLogic.Manager.Person personManager = new Neusoft.HISFC.BizLogic.Manager.Person();
                Neusoft.HISFC.Models.Base.Employee    person        = personManager.GetPersonByID(docCode);

                docGrade = person.Level.ID;
            }

            this.dt.Rows.Clear();

            List <Neusoft.HISFC.Models.Pharmacy.Item> alList = new List <Neusoft.HISFC.Models.Pharmacy.Item>();
            ArrayList alArrList = new ArrayList();

            if (!this.ckIgnoreDoc.Checked)
            {
                alList = integratePha.QueryItemAvailableList(deptCode, docCode, docGrade);

                if (alList == null)
                {
                    MessageBox.Show(integratePha.Err);
                    return;
                }

                this.AddDataToTable(alList);

                MessageBox.Show(Language.Msg("查询完成"));
            }
            else
            {
                alArrList = itemManager.QueryItemAvailableList(deptCode);

                if (alArrList == null)
                {
                    MessageBox.Show(itemManager.Err);
                    return;
                }

                this.AddDataToTable(alArrList);

                MessageBox.Show(Language.Msg("查询完成"));
            }
        }
        /// <summary>
        /// 数据初始化
        /// </summary>
        protected void DataInit()
        {
            Neusoft.FrameWork.WinForms.Classes.Function.ShowWaitForm(Language.Msg("正在加载基础查询数据,请稍候...."));
            Application.DoEvents();

            this.dtEnd.Value   = this.itemManager.GetDateTimeFromSysDateTime();
            this.dtBegin.Value = this.dtEnd.Value.AddDays(-1);

            #region 加载查询类别

            ArrayList al = new ArrayList();
            Neusoft.FrameWork.Models.NeuObject info1 = new Neusoft.FrameWork.Models.NeuObject();
            info1.ID   = "A";
            info1.Name = "全部";
            al.Add(info1);
            Neusoft.FrameWork.Models.NeuObject info2 = new Neusoft.FrameWork.Models.NeuObject();
            info2.ID   = "0";
            info2.Name = "病历卡号";
            al.Add(info2);
            Neusoft.FrameWork.Models.NeuObject info3 = new Neusoft.FrameWork.Models.NeuObject();
            info3.ID   = "1";
            info3.Name = "发票号";
            al.Add(info3);
            Neusoft.FrameWork.Models.NeuObject info4 = new Neusoft.FrameWork.Models.NeuObject();
            info4.ID   = "2";
            info4.Name = "姓名";
            al.Add(info4);
            Neusoft.FrameWork.Models.NeuObject info5 = new Neusoft.FrameWork.Models.NeuObject();
            info5.ID   = "3";
            info5.Name = "处方号";
            al.Add(info5);
            Neusoft.FrameWork.Models.NeuObject info6 = new Neusoft.FrameWork.Models.NeuObject();
            info6.ID   = "D";
            info6.Name = "药品";
            al.Add(info6);
            this.cmbQueryType.DataSource    = al;
            this.cmbQueryType.DisplayMember = "Name";
            this.cmbQueryType.ValueMember   = "ID";

            #endregion

            #region 加载人员

            Neusoft.HISFC.BizLogic.Manager.Person personManager = new Neusoft.HISFC.BizLogic.Manager.Person();
            ArrayList personAl = personManager.GetEmployeeAll();
            if (personAl == null)
            {
                Function.ShowMsg("获取人员列表失败" + personManager.Err);
                return;
            }
            if (this.personHelper == null)
            {
                this.personHelper = new Neusoft.FrameWork.Public.ObjectHelper(personAl);
            }
            #endregion

            #region 加载药品
            List <Neusoft.HISFC.Models.Pharmacy.Item> itemList = this.itemManager.QueryItemList(true);
            if (itemList == null)
            {
                Function.ShowMsg("获取药品列表失败" + this.itemManager.Err);
                return;
            }

            foreach (Neusoft.HISFC.Models.Pharmacy.Item item in itemList)
            {
                item.Memo = item.Specs;
            }

            this.drugCollectioon = new ArrayList(itemList.ToArray());

            #endregion

            #region 加载门诊终端列表
            ArrayList alDrugTerminal = this.drugStoreManager.QueryDrugTerminalByDeptCode(this.operDept.ID, "1");
            if (alDrugTerminal != null)
            {
                this.drugTerminalHelper = new Neusoft.FrameWork.Public.ObjectHelper(alDrugTerminal);
            }
            ArrayList alSendTerminal = this.drugStoreManager.QueryDrugTerminalByDeptCode(this.operDept.ID, "0");
            if (alSendTerminal != null)
            {
                this.sendTerminalHelper = new Neusoft.FrameWork.Public.ObjectHelper(alSendTerminal);
            }
            #endregion

            Neusoft.FrameWork.WinForms.Classes.Function.HideWaitForm();
        }
Esempio n. 26
0
        /// <summary>
        ///显示盘点单列表
        /// </summary>
        public void ShowCheckList(Neusoft.FrameWork.Models.NeuObject checkDept, string checkState, Neusoft.FrameWork.Models.NeuObject checkOper)
        {
            //清空列表
            this.Nodes.Clear();

            this.privDept = checkDept;

            Neusoft.HISFC.BizLogic.Pharmacy.Item itemManager = new Neusoft.HISFC.BizLogic.Pharmacy.Item();

            //增加对盘点单状态为“取消”,“结存”的盘点单的显示处理{DCE7937E-C36F-4d9a-B706-4E80F93BFC8B}sel
            string strCheckState = "封帐";

            switch (checkState)
            {
            case "0": strCheckState = "封帐"; break;

            case "1": strCheckState = "结存"; break;

            case "2": strCheckState = "取消"; break;

            default: strCheckState = "封帐";  break;
            }

            //当前忽略对封帐人的判断,检索显示全部封帐盘点单
            try
            {
                List <Neusoft.HISFC.Models.Pharmacy.Check> checkList = new List <Neusoft.HISFC.Models.Pharmacy.Check>();
                checkList = itemManager.QueryCheckList(checkDept.ID, checkState, checkOper.ID);
                if (checkList == null)
                {
                    System.Windows.Forms.MessageBox.Show(Language.Msg(itemManager.Err));
                    return;
                }
                if (checkList.Count == 0)
                {
                    this.Nodes.Add(new System.Windows.Forms.TreeNode("没有" + strCheckState + "盘点单", 0, 0));//{DCE7937E-C36F-4d9a-B706-4E80F93BFC8B}
                }
                else
                {
                    this.Nodes.Add(new System.Windows.Forms.TreeNode(strCheckState + "盘点单列表", 0, 0));//{DCE7937E-C36F-4d9a-B706-4E80F93BFC8B}
                    //显示盘点单列表
                    System.Windows.Forms.TreeNode newNode;
                    foreach (Neusoft.HISFC.Models.Pharmacy.Check check in checkList)
                    {
                        newNode = new System.Windows.Forms.TreeNode();

                        //获得封帐人员姓名
                        Neusoft.HISFC.BizLogic.Manager.Person personManager = new Neusoft.HISFC.BizLogic.Manager.Person();
                        Neusoft.HISFC.Models.Base.Employee    employee      = personManager.GetPersonByID(check.FOper.ID);
                        if (employee == null)
                        {
                            System.Windows.Forms.MessageBox.Show(Language.Msg("获得" + strCheckState + "人员信息时出错!人员编码为" + check.FOper.ID + "的人员不存在"));//{DCE7937E-C36F-4d9a-B706-4E80F93BFC8B}
                            return;
                        }
                        check.FOper.Name = employee.Name;

                        if (check.CheckName == "")
                        {
                            newNode.Text = check.CheckNO + "-" + check.FOper.Name;                  //盘点单号+封帐人
                        }
                        else
                        {
                            newNode.Text = check.CheckName;
                        }

                        newNode.ImageIndex         = 4;
                        newNode.SelectedImageIndex = 5;

                        newNode.Tag = check;

                        this.Nodes[0].Nodes.Add(newNode);
                    }
                    this.Nodes[0].ExpandAll();

                    this.SelectedNode = this.Nodes[0];
                }
            }
            catch (Exception ex)
            {
                System.Windows.Forms.MessageBox.Show(Language.Msg(ex.Message));
            }
        }
Esempio n. 27
0
        private void Init(User user)
        {
            this.nTreeView1.NodeMouseDoubleClick += new TreeNodeMouseClickEventHandler(nTreeView1_NodeMouseDoubleClick);

            foreach (Role _role in _roles)
            {
                TreeNode _node = new TreeNode(_role.Name);
                _node.ImageIndex = 0;
                _node.Tag = _role;
                this.nTreeView1.Nodes.Add(_node);
            }
            this.nTreeView1.ExpandAll();

            //初始化科室信息,只通过人员信息判断其能登录的科室。
            Neusoft.HISFC.BizLogic.Manager.DepartmentStatManager manager = new Neusoft.HISFC.BizLogic.Manager.DepartmentStatManager();





            //System.Collections.ArrayList alDepts = manager.GetMultiDeptNew(currentUser.PersonId);

            System.Collections.ArrayList alDepts = null;

            //{36DEFA19-3650-443f-A173-E2A355FA00C2}
            Neusoft.HISFC.BizLogic.Manager.Person p = new Neusoft.HISFC.BizLogic.Manager.Person();
            Neusoft.HISFC.Models.Base.Employee empl = p.GetPersonByID(user.PersonId);
            ////{A4ED7668-8B4C-441f-9A0D-7029EA040B14}
            //if (empl.EmployeeType.ID.ToString() == "N")
            //{
            //    alDepts = manager.GetMultiDeptNewForNurser(currentUser.PersonId);
            //}
            //else
            //{
            //    alDepts = manager.GetMultiDeptNew(currentUser.PersonId);
            //}
            
                alDepts = manager.GetMultiDeptNew(currentUser.PersonId);
            

            //如果是管理员,默认科室信息。
            if (currentUser.Id == "admin")
            {
                Neusoft.FrameWork.Models.NeuObject obj = new Neusoft.FrameWork.Models.NeuObject();
                obj.ID = "admin";
                obj.Name = "admin";
                ArrayList list = new ArrayList();
                list.Add(obj);
                this.cmbDept.AddItems(list);
            }
            else
            {
                this.cmbDept.AddItems(alDepts);
            }
            if (alDepts != null)
            {
                this.cmbDept.SelectedIndex = 0;
            }

            //#region 默认上次登录信息
            ////{9DF35C63-1468-4fa5-BBEA-5D00197C0994} yangw 20100831
            //Neusoft.HISFC.BizLogic.Manager.UserManager userMgr = new Neusoft.HISFC.BizLogic.Manager.UserManager();
            //Neusoft.FrameWork.Models.NeuObject lastLoginInfo = userMgr.GetLastLoginInfo(currentUser.operId, 10);
            //if (lastLoginInfo != null)
            //{
            //    //登录科室
            //    foreach (Neusoft.FrameWork.Models.NeuObject o in cmbDept.alItems)
            //    {
            //        if (o.ID == lastLoginInfo.ID)
            //        {
            //            cmbDept.Tag = lastLoginInfo.ID;
            //            break;
            //        }
            //    }

            //    //登录模块
            //    foreach (TreeNode n in nTreeView1.Nodes)
            //    {
            //        if (n.Text == lastLoginInfo.Name)
            //        {
            //            nTreeView1.SelectedNode = n;
            //            break;
            //        }
            //    }
            //}
            //#endregion
        }
Esempio n. 28
0
        /// <summary>
        ///显示盘点单列表
        /// </summary>
        public void ShowCheckList(Neusoft.FrameWork.Models.NeuObject checkDept, string checkState, Neusoft.FrameWork.Models.NeuObject checkOper)
        {
            //清空列表
            this.Nodes.Clear();

            this.privDept = checkDept;

            Neusoft.HISFC.BizLogic.Material.MetItem itemManager = new Neusoft.HISFC.BizLogic.Material.MetItem();

            //当前忽略对封帐人的判断,检索显示全部封帐盘点单
            try
            {
                ArrayList checkList = new ArrayList();
                checkList = itemManager.QueryCheckStatic(checkDept.ID, checkState);
                if (checkList == null)
                {
                    System.Windows.Forms.MessageBox.Show(Language.Msg(itemManager.Err));
                    return;
                }
                if (checkList.Count == 0)
                {
                    this.Nodes.Add(new System.Windows.Forms.TreeNode("没有封帐盘点单", 0, 0));
                }
                else
                {
                    this.Nodes.Add(new System.Windows.Forms.TreeNode("封帐盘点单列表", 0, 0));
                    //显示盘点单列表
                    System.Windows.Forms.TreeNode newNode;
                    foreach (Neusoft.HISFC.Models.Material.Check check in checkList)
                    {
                        newNode = new System.Windows.Forms.TreeNode();

                        //获得封帐人员姓名
                        Neusoft.HISFC.BizLogic.Manager.Person personManager = new Neusoft.HISFC.BizLogic.Manager.Person();
                        Neusoft.HISFC.Models.Base.Employee    employee      = personManager.GetPersonByID(check.FOper.ID);
                        if (employee == null)
                        {
                            System.Windows.Forms.MessageBox.Show(Language.Msg("获得封帐人员信息时出错!人员编码为" + check.FOper.ID + "的人员不存在"));
                            return;
                        }
                        check.FOper.Name = employee.Name;

                        if (check.CheckName == "")
                        {
                            newNode.Text = check.CheckCode + "-" + check.FOper.Name;                //盘点单号+封帐人
                        }
                        else
                        {
                            newNode.Text = check.CheckName;
                        }

                        newNode.ImageIndex         = 4;
                        newNode.SelectedImageIndex = 5;

                        newNode.Tag = check;

                        this.Nodes[0].Nodes.Add(newNode);
                    }
                    this.Nodes[0].ExpandAll();

                    this.SelectedNode = this.Nodes[0];
                }
            }
            catch (Exception ex)
            {
                System.Windows.Forms.MessageBox.Show(Language.Msg(ex.Message));
            }
        }
Esempio n. 29
0
        /// <summary>
        /// 保存方法
        /// </summary>
        /// <returns></returns>
        public int Save()
        {
            //验证控件内容符合要求
            if (ValueValidated())
            {
                Neusoft.HISFC.Models.Base.Employee empl = ConvertUcContextToObject();
                if (empl == null)
                {
                    return(-1);
                }
                //生成拼音码和五笔码
                CreateSpell();
                try
                {
                    Neusoft.FrameWork.Management.PublicTrans.BeginTransaction();

                    Neusoft.HISFC.BizLogic.Manager.Person perMgr = new Neusoft.HISFC.BizLogic.Manager.Person();
                    //Neusoft.FrameWork.Management.Transaction trans = new Neusoft.FrameWork.Management.Transaction(perMgr.Connection);
                    ////事务开始
                    //trans.BeginTransaction();
                    ////设置事务
                    //perMgr.SetTrans(trans.Trans);
                    if (perMgr.Insert(empl) == -1)
                    {
                        if (perMgr.DBErrCode == 1)
                        {
                            if (perMgr.Update(empl) == -1 || perMgr.Update(empl) == 0)
                            {
                                Neusoft.FrameWork.Management.PublicTrans.RollBack();
                                MessageBox.Show("更新人员失败!");
                                return(-1);
                            }
                        }
                        else
                        {
                            Neusoft.FrameWork.Management.PublicTrans.RollBack();
                            MessageBox.Show("插入人员失败!");
                            return(-1);
                        }
                    }

                    if (empl.EmployeeExt.DigitalSign != null)
                    {
                        if (perMgr.InsertEmpExinfo(empl) == 1)
                        {
                            int val = perMgr.UpdateEmplDigitalSignByID(empl.ID, empl.EmployeeExt.DigitalSign);
                            if (val == -1 || val == 0)
                            {
                                Neusoft.FrameWork.Management.PublicTrans.RollBack();
                                MessageBox.Show("更新人员扩展信息失败!");
                                return(-1);
                            }
                        }
                        else if (perMgr.DBErrCode == 1)
                        {
                            int val = perMgr.UpdateEmplDigitalSignByID(empl.ID, empl.EmployeeExt.DigitalSign);
                            if (val == -1 || val == 0)
                            {
                                Neusoft.FrameWork.Management.PublicTrans.RollBack();
                                MessageBox.Show("更新人员扩展信息失败!");
                                return(-1);
                            }
                        }
                        else
                        {
                            Neusoft.FrameWork.Management.PublicTrans.RollBack();
                            MessageBox.Show("插入人员扩展信息失败!");
                            return(-1);
                        }
                    }


                    Neusoft.FrameWork.Management.PublicTrans.Commit();
                    MessageBox.Show("保存成功!");
                    tr = true;
                    this.txtEmployeeCode.Focus();
                    return(0);
                }
                catch (Exception a)
                {
                    MessageBox.Show(a.Message);
                    return(-1);
                }
            }
            else
            {
                return(-1);
            }
        }
Esempio n. 30
0
        /// <summary>
        /// 设置现金发票打印内容
        /// </summary>
        /// <param name="regInfo">挂号信息</param>
        /// <param name="invoice">发票主表信息</param>
        /// <param name="alInvoiceDetail">发票明细信息</param>
        /// <param name="alFeeItemList">费用明细信息</param>
        /// <param name="isPreview">是否预览模式</param>
        /// <returns></returns>
        private int SetMZFPPrintValue(
            Neusoft.HISFC.Models.Registration.Register regInfo,
            Neusoft.HISFC.Models.Fee.Outpatient.Balance invoice,
            ArrayList alInvoiceDetail,
            ArrayList alFeeItemList,
            bool isPreview)
        {
            try
            {
                #region 设置发票打印内容
                ucMZFP ucReceipt = (ucMZFP)c;

                #region 医疗机构
                //ucReceipt.lblYiLiaoJiGou.Text = "阜新市新邱区第二人民医院";
                #endregion

                #region 门诊号
                ucReceipt.lblCardNO.Text  = regInfo.PID.CardNO;
                ucReceipt.lblCardNO1.Text = regInfo.PID.CardNO;
                #endregion

                #region 打印时间
                ucReceipt.lblDate.Text     = invoice.PrintTime.ToString("yyyy  MM  dd");
                ucReceipt.lblDateTime.Text = invoice.PrintTime.ToShortTimeString();
                ucReceipt.lblDate1.Text    = invoice.PrintTime.ToString("yyyy  MM  dd");
                //ucReceipt.lblDateTime1.Text = invoice.PrintTime.ToShortTimeString();
                #endregion

                #region 发票号
                ucReceipt.lblInvoiceNO.Text  = invoice.Invoice.ID;
                ucReceipt.lblInvoiceNO1.Text = invoice.Invoice.ID;
                #endregion

                #region 收费员
                Neusoft.HISFC.BizLogic.Manager.Person person = new Neusoft.HISFC.BizLogic.Manager.Person();
                string operUserCode = string.Empty;
                operUserCode = person.GetPersonByID(invoice.BalanceOper.ID).Name;
                ucReceipt.lblOperName.Text  = operUserCode;
                ucReceipt.lblOperName1.Text = operUserCode;
                #endregion

                #region 合同单位
                //if (invoice.Patient.Pact.PayKind.ID == "01" || invoice.Patient.Pact.PayKind.ID == "02")
                //{
                ucReceipt.lblPactName.Text  = regInfo.Pact.Name;
                ucReceipt.lblPactName1.Text = regInfo.Pact.Name;
                //}
                #endregion


                #region 姓名
                ucReceipt.lblName.Text  = regInfo.Name;
                ucReceipt.lblName1.Text = regInfo.Name;
                #endregion

                #region 科别
                //Neusoft.HISFC.Models.Fee.Outpatient.FeeItemList detFeeItemList = alFeeItemList[0] as Neusoft.HISFC.Models.Fee.Outpatient.FeeItemList;
                //ucReceipt.lblExeDept.Text =  detFeeItemList.ExecOper.Dept.Name;
                #endregion
                #region 处方医师
                //ucReceipt.lblRecipeOperName.Text = regInfo.DoctorInfo.Templet.Dept .Name ;
                #endregion
                #region 费用大类
                //票面信息
                decimal[] FeeInfo =
                    //---------------------1-----------2------------3------------4-------------5-----------------
                    new decimal[15] {
                    decimal.Zero, decimal.Zero, decimal.Zero, decimal.Zero, decimal.Zero,
                    decimal.Zero, decimal.Zero, decimal.Zero, decimal.Zero, decimal.Zero,
                    //decimal.Zero,decimal.Zero,decimal.Zero,decimal.Zero,decimal.Zero,
                    //decimal.Zero,decimal.Zero,decimal.Zero,decimal.Zero,
                    decimal.Zero, decimal.Zero, decimal.Zero, decimal.Zero, decimal.Zero
                };
                //票面信息
                string[] FeeInfoName =
                    //---------------------1-----------2------------3------------4-------------5-----------------
                    new string[15] {
                    string.Empty, string.Empty, string.Empty, string.Empty, string.Empty,
                    string.Empty, string.Empty, string.Empty, string.Empty, string.Empty,
                    //string.Empty,string.Empty,string.Empty,string.Empty,string.Empty,
                    //string.Empty,string.Empty,string.Empty,string.Empty,
                    string.Empty, string.Empty, string.Empty, string.Empty, string.Empty
                };

                //统计大类项目可以直接取
                for (int i = 0; i < alInvoiceDetail.Count; i++)
                {
                    Neusoft.HISFC.Models.Fee.Outpatient.BalanceList detail = null;
                    detail = (Neusoft.HISFC.Models.Fee.Outpatient.BalanceList)alInvoiceDetail[i];
                    if (detail.FeeCodeStat.SortID <= FeeInfo.Length)
                    {
                        FeeInfo[detail.FeeCodeStat.SortID - 1] += detail.BalanceBase.FT.TotCost;
                        if (detail.FeeCodeStat.Name.Length > 5)
                        {
                            FeeInfoName[detail.FeeCodeStat.SortID - 1] += detail.FeeCodeStat.Name.Substring(0, 5);
                        }
                        else
                        {
                            FeeInfoName[detail.FeeCodeStat.SortID - 1] += detail.FeeCodeStat.Name;
                        }
                        //  FeeInfoName[detail.FeeCodeStat.SortID - 1] += detail.FeeCodeStat.Name.Substring(0,5);
                    }
                }
                int feeInfoNameIdx = 0;
                int FeeInfoIndex   = 0;
                foreach (decimal d in FeeInfo)
                {//测试用
                    //FeeInfo[FeeInfoIndex] = 999999.99m;
                    //名称
                    Label lName = GetFeeNameLable("lblFeeName" + feeInfoNameIdx.ToString(), lblPrint);
                    //值
                    Label lValue = GetFeeNameLable("lblFeeInfo" + feeInfoNameIdx.ToString(), lblPrint);
                    if (lName != null)
                    {
                        if (FeeInfo[FeeInfoIndex] > 0)
                        {
                            //lName.Text = FeeInfoName[FeeInfoIndex] + "普通人工器官材料费";
                            //lName.Text = FeeInfoName[FeeInfoIndex] + "";
                            lValue.Text = Neusoft.FrameWork.Public.String.FormatNumberReturnString(FeeInfo[FeeInfoIndex], 2).PadLeft(9, ' ');
                            //操作下一组控件

                            if (FeeInfoIndex > 2)
                            {
                                alName.Add(FeeInfoName[FeeInfoIndex]);
                                alValue.Add(Neusoft.FrameWork.Public.String.FormatNumberReturnString(FeeInfo[FeeInfoIndex], 2));
                            }
                            else
                            {
                                drugTotCost += FeeInfo[FeeInfoIndex];
                            }
                        }
                    }
                    //名称
                    lName = GetFeeNameLable("lbl1FeeName" + feeInfoNameIdx.ToString(), lblPrint);
                    //值
                    lValue = GetFeeNameLable("lbl1FeeInfo" + feeInfoNameIdx.ToString(), lblPrint);
                    if (lName != null)
                    {
                        if (FeeInfo[FeeInfoIndex] > 0)
                        {
                            //lName.Text = FeeInfoName[FeeInfoIndex] + "普通人工器官材料费";
                            //lName.Text = FeeInfoName[FeeInfoIndex] + "";
                            lValue.Text = Neusoft.FrameWork.Public.String.FormatNumberReturnString(FeeInfo[FeeInfoIndex], 2).PadLeft(9, ' ');
                        }
                    }
                    feeInfoNameIdx++;
                    FeeInfoIndex++;
                }


                #endregion
                int otherIdx = 0;
                if (drugTotCost > 0)
                {
                    ucReceipt.lblOtherInvoiceNO0.Text = invoice.Invoice.ID;
                    ucReceipt.lblOtherName0.Text      = regInfo.Name;
                    ucReceipt.lblOtherDate0.Text      = invoice.PrintTime.ToShortDateString();
                    ucReceipt.lblOtherDoctorInfoTempletDeptName0.Text = regInfo.DoctorInfo.Templet.Dept.Name;
                    ucReceipt.lblOtherFeeName0.Text = "药费";
                    ucReceipt.lblOtherFeeInfo0.Text = Neusoft.FrameWork.Public.String.FormatNumberReturnString(drugTotCost, 2).PadLeft(9, ' ');
                    otherIdx++;
                }

                while (alName.Count > 0)
                {
                    if (otherIdx < 3)
                    {
                        Label lName = GetFeeNameLable("lblOtherInvoiceNO" + otherIdx.ToString(), lblPrint);
                        lName.Text = invoice.Invoice.ID;
                        lName      = GetFeeNameLable("lblOtherName" + otherIdx.ToString(), lblPrint);
                        lName.Text = regInfo.Name;
                        lName      = GetFeeNameLable("lblOtherDate" + otherIdx.ToString(), lblPrint);
                        lName.Text = invoice.PrintTime.ToShortDateString();
                        lName      = GetFeeNameLable("lblOtherDoctorInfoTempletDeptName" + otherIdx.ToString(), lblPrint);
                        lName.Text = regInfo.DoctorInfo.Templet.Dept.Name;
                        lName      = GetFeeNameLable("lblOtherFeeName" + otherIdx.ToString(), lblPrint);
                        lName.Text = alName[0].ToString();
                        lName      = GetFeeNameLable("lblOtherFeeInfo" + otherIdx.ToString(), lblPrint);
                        lName.Text = Neusoft.FrameWork.Public.String.FormatNumberReturnString(System.Convert.ToDecimal(alValue[0]), 2).PadLeft(9, ' ');
                        otherIdx++;
                        alName.RemoveAt(0);
                        alValue.RemoveAt(0);
                    }
                    else
                    {
                        break;
                    }
                }

                #region 医保信息



                if (invoice.Patient.Pact.PayKind.ID == "02")
                {
                    ucReceipt.lblSSN.Text               = regInfo.SSN;
                    ucReceipt.lblOwnCost.Text           = Neusoft.FrameWork.Public.String.FormatNumberReturnString(regInfo.SIMainInfo.OwnCost, 2);
                    ucReceipt.lblPayCost.Text           = Neusoft.FrameWork.Public.String.FormatNumberReturnString(regInfo.SIMainInfo.PayCost, 2);
                    ucReceipt.lblPubCost.Text           = Neusoft.FrameWork.Public.String.FormatNumberReturnString(regInfo.SIMainInfo.PubCost, 2);
                    ucReceipt.lblOverCost.Text          = Neusoft.FrameWork.Public.String.FormatNumberReturnString(regInfo.SIMainInfo.OverCost, 2);
                    ucReceipt.lblIndividualBalance.Text = Neusoft.FrameWork.Public.String.FormatNumberReturnString(regInfo.SIMainInfo.IndividualBalance, 2);


                    ucReceipt.lblSSN1.Text     = regInfo.SSN;
                    ucReceipt.lblOwnCost1.Text = Neusoft.FrameWork.Public.String.FormatNumberReturnString(regInfo.SIMainInfo.OwnCost, 2);
                    ucReceipt.lblPayCost1.Text = Neusoft.FrameWork.Public.String.FormatNumberReturnString(regInfo.SIMainInfo.PayCost, 2);
                    ucReceipt.lblPubCost1.Text = Neusoft.FrameWork.Public.String.FormatNumberReturnString(regInfo.SIMainInfo.PubCost, 2);
                    //ucReceipt.lblOverCost1.Text = Neusoft.FrameWork.Public.String.FormatNumberReturnString(regInfo.SIMainInfo.OverCost, 2);
                    ucReceipt.lblIndividualBalance1.Text = Neusoft.FrameWork.Public.String.FormatNumberReturnString(regInfo.SIMainInfo.IndividualBalance, 2);

                    //-----1---------------------------2----------------3-----------------------4-----------------------5-----------------6----------------
                    //|医疗费总额TotCost|个人帐户支付金额PayCost|统筹支付金额PubCost|个人现金支付OwnCost|救助金支出金额OverCost|公务员补助支出金额OfficalCost
                    //-----------------7------------------8-----------------------9-----------
                    //|保健对象补贴支出BaseCost|离休人员统筹支出PubOwnCost|医院付担金额HosCost
                    //-------------10-------------11----------------------12------------13------------------
                    //|上次进入统筹医疗费用累计|本次进入统筹医疗费用金额|上次个人帐户余额|个人自费金额
                    //----14---------------15-------------16--------------------------------17----------
                    //|乙类药品个人自理|起付标准自付金额|分段自理金额|超过封顶线个人自付金额|住院封顶线以上公务员补助支出金额
                    //----18---------------------------19------20--------------21--------------------
                    //|住院自付部分公务员补助支出金额|住院人次|工伤基金支付金额|生育基金支付金额|
                    string[] temp = regInfo.SIMainInfo.Memo.Split('|');
                    ucReceipt.lblTemp20.Text  = temp[20];
                    ucReceipt.lblTemp21.Text  = temp[21];
                    ucReceipt.lbl1Temp20.Text = temp[20];
                    ucReceipt.lbl1Temp21.Text = temp[21];
                    ucReceipt.lblIndividualBalanceNew.Text  = Neusoft.FrameWork.Public.String.FormatNumberReturnString(regInfo.SIMainInfo.IndividualBalance - regInfo.SIMainInfo.PayCost, 2);
                    ucReceipt.lblIndividualBalanceNew1.Text = Neusoft.FrameWork.Public.String.FormatNumberReturnString(regInfo.SIMainInfo.IndividualBalance - regInfo.SIMainInfo.PayCost, 2);
                }


                #endregion

                #region 小写总金额
                ucReceipt.lblDownTotCost.Text  = Neusoft.FrameWork.Public.String.FormatNumberReturnString(invoice.FT.TotCost, 2);
                ucReceipt.lblDownTotCost1.Text = Neusoft.FrameWork.Public.String.FormatNumberReturnString(invoice.FT.TotCost, 2);
                #endregion

                #region 大写总金额
                ucReceipt.lblUpTotCost.Text  = Neusoft.FrameWork.Public.String.LowerMoneyToUpper(invoice.FT.TotCost).PadLeft(10, ' ');
                ucReceipt.lblUpTotCost1.Text = Neusoft.FrameWork.Public.String.LowerMoneyToUpper(invoice.FT.TotCost).PadLeft(10, ' ');
                #endregion
                #endregion
            }
            catch (Exception ex)
            {
                return(-1);
            }
            return(0);
        }