Beispiel #1
0
        /// <summary>
        /// 设置接口实例
        /// </summary>
        private void GetInterface()
        {
            this.Clear();

            //通过反射方式读取Factory文件 这样 可以将 Factory与其他相关的类型文件全部挪出UFC 实现自定义
            if (this.phaInFactory == null)
            {
                this.phaInFactory = Neusoft.FrameWork.WinForms.Classes.UtilInterface.CreateObject(this.GetType(), typeof(Neusoft.HISFC.Components.Pharmacy.IFactory)) as Neusoft.HISFC.Components.Pharmacy.IFactory;
            }

            if (this.phaInFactory == null)
            {
                this.phaInFactory = new PhaFactory() as IFactory;
            }

            //{9E282C1A-071F-4833-8AE3-EC64CA71FD8F} 增加对资源释放函数的调用
            if (this.IManager != null)
            {
                this.IManager.Dispose();
            }

            this.IManager = this.phaInFactory.GetInInstance(this.PrivType, this);

            if (this.IManager == null)
            {
                System.Windows.Forms.MessageBox.Show("根据入库类别获取对应接口实例失败");
                return;
            }

            this.neuSpread1_Sheet1.DataSource = null;
            //为了实现过滤 赋值DefaultView
            DataTable dtTemp = this.IManager.InitDataTable();

            if (dtTemp != null)
            {
                this.neuSpread1_Sheet1.DataSource = dtTemp.DefaultView;
            }
            else
            {
                this.neuSpread1_Sheet1.DataSource = dtTemp;
            }

            this.neuPanel1.SuspendLayout();
            this.neuPanel3.SuspendLayout();
            this.neuPanel4.SuspendLayout();
            this.panelItemSelect.SuspendLayout();
            this.SuspendLayout();

            this.AddItemInputUC(this.IManager.InputModualUC);

            this.neuPanel1.ResumeLayout();
            this.neuPanel3.ResumeLayout();
            this.neuPanel4.ResumeLayout();
            this.panelItemSelect.ResumeLayout();
            this.ResumeLayout();
        }
Beispiel #2
0
        protected override void OnEndPrivChanged(Neusoft.FrameWork.Models.NeuObject changeData, object param)
        {
            if (this.PrivType.Memo == Neusoft.HISFC.Models.Base.EnumIMAInTypeService.GetNameFromEnum(Neusoft.HISFC.Models.Base.EnumIMAInType.BorrowApply) ||
                this.PrivType.Memo == Neusoft.HISFC.Models.Base.EnumIMAInTypeService.GetNameFromEnum(Neusoft.HISFC.Models.Base.EnumIMAInType.BorrowBack) ||
                this.PrivType.Memo == Neusoft.HISFC.Models.Base.EnumIMAInTypeService.GetNameFromEnum(Neusoft.HISFC.Models.Base.EnumIMAInType.ProduceInput))
            {
                MessageBox.Show(this.PrivType.Name + " 为预留功能 目前不提供具体业务实现", "", MessageBoxButtons.OK, MessageBoxIcon.Information);
                this.PrivType = null;
                this.IManager = null;
                return;
            }

            Neusoft.FrameWork.WinForms.Classes.Function.ShowWaitForm("正在根据入库类别加载界面 请稍候..");
            Application.DoEvents();

            this.GetInterface();

            Neusoft.FrameWork.WinForms.Classes.Function.HideWaitForm();

            base.OnEndPrivChanged(changeData, param);
        }