コード例 #1
0
        /// <summary>
        /// 入库单据查询
        /// </summary>
        protected override void QueryIn()
        {
            Neusoft.HISFC.BizLogic.Pharmacy.Item itemManager = new Neusoft.HISFC.BizLogic.Pharmacy.Item();

            ArrayList alList = itemManager.QueryInputList(this.DeptInfo.ID, "AAAA", this.State, this.BeginDate, this.EndDate);

            if (alList == null)
            {
                MessageBox.Show(Language.Msg("查询单据列表发生错误" + itemManager.Err));
            }

            this.neuSpread1_Sheet1.Rows.Count = 0;

            foreach (Neusoft.HISFC.Models.Pharmacy.Input info in alList)
            {
                if (this.MarkPrivType != null)
                {
                    if (this.MarkPrivType.ContainsKey(info.PrivType))       //对于过滤的权限不显示
                    {
                        continue;
                    }
                }

                this.neuSpread1_Sheet1.Rows.Add(0, 1);

                this.neuSpread1_Sheet1.Cells[0, 0].Text = info.InListNO;
                this.neuSpread1_Sheet1.Cells[0, 1].Text = info.DeliveryNO;
                this.neuSpread1_Sheet1.Cells[0, 2].Text = this.inTypeHelper.GetName(info.PrivType);

                Neusoft.HISFC.Models.Pharmacy.Company company = new Neusoft.HISFC.Models.Pharmacy.Company();

                if (info.Company.ID != "None")
                {
                    Neusoft.HISFC.BizLogic.Pharmacy.Constant constant = new Neusoft.HISFC.BizLogic.Pharmacy.Constant();
                    company = constant.QueryCompanyByCompanyID(info.Company.ID);
                    if (company == null)
                    {
                        MessageBox.Show(Language.Msg(constant.Err));
                        return;
                    }
                }
                else
                {
                    company.ID   = "None";
                    company.Name = "无供货公司";
                }

                this.neuSpread1_Sheet1.Cells[0, 3].Text = company.Name;
                this.neuSpread1_Sheet1.Cells[0, (int)ColumnSet.ColTargetID].Text = company.ID;
            }
        }