Beispiel #1
0
        /// <summary>
        /// 生成排班类别列表
        /// </summary>
        private void initType()
        {
            if (this.fpSpread1_Sheet1.RowCount > 0)
            {
                this.fpSpread1_Sheet1.Rows.Remove(0, this.fpSpread1_Sheet1.RowCount);
            }

            if (tabMgr == null)
            {
                tabMgr = new Neusoft.HISFC.BizProcess.Integrate.Registration.Tabulation();
            }

            al = tabMgr.Query(Neusoft.HISFC.BizLogic.Operation.QueryState.All);
            ds.Tables["items"].Rows.Clear();

            if (al != null)
            {
                foreach (Neusoft.HISFC.Models.Registration.WorkType obj in al)
                {
                    fpSpread1_Sheet1.Rows.Add(this.fpSpread1_Sheet1.RowCount, 1);
                    int row = this.fpSpread1_Sheet1.RowCount - 1;

                    addfp1(row, obj);
                    ds.Tables["items"].Rows.Add(new object[]
                    {
                        obj.ID, obj.Name, obj.SpellCode
                    });
                }
            }
        }
        /// <summary>
        /// 查询已排班序号
        /// </summary>
        /// <param name="deptID"></param>
        private void QueryTabular(string deptID)
        {
            string order = "";

            DateTime begin = DateTime.Parse(this.dateTimePicker1.Value.Year.ToString() + "-" +
                                            this.dateTimePicker1.Value.Month.ToString() + "-1");

            al = tabMgr.Query(begin, deptID);

            this.treeView1.Nodes[0].Nodes.Clear();
            if (al != null)
            {
                for (int i = 0; i < al.Count; i++)
                {
                    order = al[i].ToString();//排班序号
                    TreeNode node = new TreeNode();
                    node.Text = order.Substring(4, 2) + "月" + order.Substring(6, 2) + "日~" + order.Substring(12, 2) + "月" + order.Substring(14, 2) + "日";
                    node.SelectedImageIndex = 21;
                    node.ImageIndex         = 20;
                    node.Tag = order;
                    this.treeView1.Nodes[0].Nodes.Add(node);
                }
            }
            this.treeView1.Nodes[0].Expand();
        }
Beispiel #3
0
        /// <summary>
        /// 查询科室排班信息
        /// </summary>
        /// <param name="begin"></param>
        /// <param name="deptID"></param>
        /// <returns></returns>
        private int Query(string deptID)
        {
            if (fpSpread1_Sheet1.RowCount > 0)
            {
                fpSpread1_Sheet1.Rows.Remove(0, fpSpread1_Sheet1.RowCount);
            }
            //安排序号
            string arrangeID = DateTime.Parse(fpSpread1_Sheet1.ColumnHeader.Cells[0, 2].Text).ToString("yyyyMMdd") +
                               DateTime.Parse(fpSpread1_Sheet1.ColumnHeader.Cells[0, 8].Text).ToString("yyyyMMdd");

            try
            {
                al = tabMgr.Query(arrangeID, deptID);
                if (al == null)
                {
                    MessageBox.Show(tabMgr.Err, "提示");
                    return(-1);
                }
                //查询本科出勤类别
                kinds = tabMgr.Query(deptID);
                if (kinds == null)
                {
                    kinds = new ArrayList();
                }
                this.lbType.AddItems(kinds);

                //没有排班信息,显示本科人员
                this.QueryPersonByDept(deptID);

                //显示排班信息,没法保持原来排班顺序和人员
                AddTabular();
            }
            catch (Exception e)
            { MessageBox.Show(e.Message); }
            //记录当前科室
            this.Tag = deptID;

            return(0);
        }