예제 #1
0
        private void Query()
        {
            ArrayList al = new ArrayList();

            string state = "1";

            switch (this.cmbState.Text)
            {
            case "申请":
                state = "0";
                break;

            case "审批":
                state = "1";
                break;

            case "核准":
                state = "2";
                break;
            }

            Neusoft.HISFC.BizLogic.Pharmacy.Item itemManager = new Neusoft.HISFC.BizLogic.Pharmacy.Item();
            if (this.noType == "0")
            {
                al = itemManager.QueryInputInfoByInvoice(this.deptInfo.ID, this.txtNO.Text, state);
                if (al == null)
                {
                    MessageBox.Show("根据发票号获取入库信息发生错误");
                    return;
                }
            }
            else
            {
                al = itemManager.QueryInputInfoByListID(this.deptInfo.ID, this.txtNO.Text, "AAAA", state);
                if (al == null)
                {
                    MessageBox.Show("根据单据号获取入库信息发生错误");
                    return;
                }
            }

            this.neuSpread1_Sheet1.Rows.Count = 0;

            foreach (Neusoft.HISFC.Models.Pharmacy.Input info in al)
            {
                this.neuSpread1_Sheet1.Rows.Add(0, 1);
                this.neuSpread1_Sheet1.Cells[0, 0].Value = true;
                this.neuSpread1_Sheet1.Cells[0, 1].Text  = info.InListNO;
                this.neuSpread1_Sheet1.Cells[0, 2].Text  = info.InvoiceNO;
                this.neuSpread1_Sheet1.Cells[0, 3].Text  = this.companyHerlper.GetName(info.Company.ID);
                this.neuSpread1_Sheet1.Cells[0, 4].Text  = info.Item.Name + "【" + info.Item.Specs + "】";
                this.neuSpread1_Sheet1.Cells[0, 5].Text  = (info.Quantity / info.Item.PackQty).ToString("N");
                this.neuSpread1_Sheet1.Cells[0, 6].Text  = info.Item.PackUnit;
                this.neuSpread1_Sheet1.Rows[0].Tag       = info;
            }
        }