Example #1
0
        /// <summary>
        /// 保存方法
        /// </summary>
        /// <returns></returns>
        private bool Save()
        {
            SResult rst = new SResult();

            if (this.DialogStatus == UBaseLib.Enums.DialogStatus.New) //新增
            {
                this.DataEntity = new ClinicarAllCheck();
                this.Fill2Entity();
                rst = clinicarAllCheckBiz.Insert(this.DataEntity);
            }
            else if (this.DialogStatus == UBaseLib.Enums.DialogStatus.Modify) //修改
            {
                this.Fill2Entity();
                rst = clinicarAllCheckBiz.Update(this.DataEntity);
            }
            if (rst.success)
            {
                UcMessageBox.Information(rst.message, "提示");
            }
            else
            {
                UcMessageBox.Error(rst.message, "提示");
            }
            return(rst.success);
        }
Example #2
0
        public SResult Update(ClinicarAllCheck ClinicarAllCheck)
        {
            SResult rst = new SResult();

            ClinicarAllCheckDao.Update(ClinicarAllCheck);
            rst.success = true;
            rst.data    = ClinicarAllCheck;
            rst.message = "修改成功!";
            return(rst);
        }
Example #3
0
        public SResult Insert(ClinicarAllCheck ClinicarAllCheck)
        {
            SResult rst = new SResult();

            ClinicarAllCheckDao.Insert(ClinicarAllCheck);
            rst.success = true;
            rst.data    = ClinicarAllCheck;
            rst.message = "新增成功!";
            return(rst);
        }
Example #4
0
        /// <summary>
        /// 按检查码查询
        /// </summary>
        /// <param name="sn"></param>
        /// <returns></returns>
        public ClinicarAllCheck FindByCheckNumber(string checkNumber)
        {
            IList <ClinicarAllCheck> list             = ClinicarAllCheckDao.FindByHql(" and check_number=?", new Object[] { checkNumber }, "id asc");
            ClinicarAllCheck         ClinicarAllCheck = null;

            if (list.Count() > 0)
            {
                ClinicarAllCheck = list[0];
            }
            return(ClinicarAllCheck);
        }