Example #1
0
        /// <summary>
        /// 数据初始化
        /// </summary>
        /// <returns></returns>
        protected virtual int Init()
        {
            Neusoft.FrameWork.WinForms.Classes.Function.ShowWaitForm(Language.Msg("正在加载基础数据.请稍候..."));
            Application.DoEvents();

            this.tvCompound = this.tv as Neusoft.HISFC.Components.DrugStore.Compound.tvCompoundList;

            this.tvCompound.Init();

            Neusoft.FrameWork.Management.DataBaseManger dataManager = new DataBaseManger();

            this.approveOper = dataManager.Operator;

            this.approveDept = ((Neusoft.HISFC.Models.Base.Employee)dataManager.Operator).Dept;

            this.InitOrderGroup();

            this.dtMaxDate.Value = dataManager.GetDateTimeFromSysDateTime().Date.AddDays(1);

            this.tvCompound.SelectDataEvent += new tvCompoundList.SelectDataHandler(tvCompound_SelectDataEvent);

            //取医嘱类型,用于将编码转换成名称
            Neusoft.HISFC.BizLogic.Manager.OrderType orderManager = new Neusoft.HISFC.BizLogic.Manager.OrderType();
            ArrayList alOrderType = orderManager.GetList();

            foreach (Neusoft.FrameWork.Models.NeuObject infoOrderType in alOrderType)
            {
                this.hsOrderType.Add(infoOrderType.ID, infoOrderType.Name);
            }

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

            return(1);
        }
Example #2
0
        /// <summary>
        /// 有效性判断
        /// </summary>
        /// <returns>填写有效 返回True 否则返回 False</returns>
        public virtual bool Valid()
        {
            if (this.phaInManager.TargetDept.ID == "")
            {
                MessageBox.Show(Language.Msg("请选择供货公司"));
                return(false);
            }

            Neusoft.FrameWork.Management.DataBaseManger dataManager = new DataBaseManger();
            DateTime sysTime = dataManager.GetDateTimeFromSysDateTime();

            foreach (DataRow dr in this.dt.Rows)
            {
                if (NConvert.ToDecimal(dr["入库数量"]) <= 0)
                {
                    MessageBox.Show(Language.Msg(dr["商品名称"].ToString() + "  请输入入库数量 入库数量不能小于等于0"));
                    return(false);
                }
                if (dr["批号"].ToString() == "")
                {
                    MessageBox.Show(Language.Msg("请输入批号"));
                    return(false);
                }
                if (NConvert.ToDateTime(dr["有效期"]) < sysTime)
                {
                    MessageBox.Show(Language.Msg(dr["商品名称"].ToString() + "  有效期应大于当前日期"));
                    return(false);
                }
            }

            return(true);
        }
Example #3
0
        /// <summary>
        /// 初始化操作
        /// </summary>
        /// <returns></returns>
        private int Init()
        {
            #region 帮助类信息初始化

            Neusoft.HISFC.BizProcess.Integrate.Manager managerIntegrate = new Neusoft.HISFC.BizProcess.Integrate.Manager();

            ArrayList alDept = managerIntegrate.GetDepartment();
            if (alDept == null)
            {
                MessageBox.Show(Language.Msg("获取全院科室列表失败") + managerIntegrate.Err);
                return(-1);
            }
            this.deptHelper = new Neusoft.FrameWork.Public.ObjectHelper(alDept);

            ArrayList alPerson = managerIntegrate.QueryEmployeeAll();
            if (alPerson == null)
            {
                MessageBox.Show(Language.Msg("获取全院人员列表失败") + managerIntegrate.Err);
                return(-1);
            }
            this.personHelper = new Neusoft.FrameWork.Public.ObjectHelper(alPerson);

            #endregion

            Neusoft.FrameWork.Management.DataBaseManger dataManager = new DataBaseManger();

            DateTime sysTime = dataManager.GetDateTimeFromSysDateTime();

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

            this.operDept = ((Neusoft.HISFC.Models.Base.Employee)dataManager.Operator).Dept;

            this.InitDataTable();

            return(1);
        }