Esempio n. 1
0
        /// <summary>
        /// 取消安排
        /// </summary>
        /// <param name="apply"></param>
        /// <returns></returns>
        public bool CancelArrange(HIS.Model.SS_APPLY apply)
        {
            try
            {
                oleDb.BeginTransaction();
                //手术申请表安排标记
                string strWhere = Tables.ss_apply.APPLY_ID + oleDb.EuqalTo() + apply.APPLY_ID + oleDb.And() + Tables.ss_apply.ARRANGE_FLAG + oleDb.EuqalTo() + 1;
                string strSet   = Tables.ss_apply.ARRANGE_FLAG + oleDb.EuqalTo() + 0;
                BindEntity <HIS.Model.SS_APPLY> .CreateInstanceDAL(oleDb).Update(strWhere, strSet);

                // 台次表占用标记
                HIS.Model.SS_ARRANGE arrange = BindEntity <HIS.Model.SS_ARRANGE> .CreateInstanceDAL(oleDb).GetModel(Tables.ss_apply.APPLY_ID + oleDb.EuqalTo() + apply.APPLY_ID);

                string strWherebed = Tables.ss_roombed.NAME + oleDb.EuqalTo() + "'" + arrange.OPERA_ROOMBED + "'" + oleDb.And() + Tables.ss_roombed.USE_FLAG + oleDb.EuqalTo() + 1;
                string strSetbed   = Tables.ss_roombed.USE_FLAG + oleDb.EuqalTo() + 0;
                BindEntity <HIS.Model.SS_ROOMBED> .CreateInstanceDAL(oleDb).Update(strWherebed, strSetbed);

                //手术安排表置删除标志
                string strWhereArrange = Tables.ss_arrange.APPLY_ID + oleDb.EuqalTo() + apply.APPLY_ID + oleDb.And() + Tables.ss_arrange.DELETE_FLAG + oleDb.EuqalTo() + 0;
                string strSetArrange   = Tables.ss_arrange.DELETE_FLAG + oleDb.EuqalTo() + 1;
                BindEntity <HIS.Model.SS_ARRANGE> .CreateInstanceDAL(oleDb).Update(strWhereArrange, strSetArrange);

                oleDb.CommitTransaction();
                return(true);
            }
            catch (System.Exception e)
            {
                oleDb.RollbackTransaction();
                throw new Exception(e.Message);
            }
        }
Esempio n. 2
0
 public bool SaveApply(HIS.Model.ZY_PatList patlist, HIS.Model.SS_APPLY ssapply)
 {
     try
     {
         ssapply.CURENO     = patlist.CureNo;
         ssapply.PATLISTID  = patlist.PatListID;
         ssapply.PAT_DEPT   = Convert.ToInt32(patlist.CurrDeptCode);
         ssapply.APPLY_DATE = XcDate.ServerDateTime;
         if (BindEntity <HIS.Model.SS_APPLY> .CreateInstanceDAL(oleDb).Exists(ssapply.APPLY_ID))
         {
             BindEntity <HIS.Model.SS_APPLY> .CreateInstanceDAL(oleDb).Update(ssapply);
         }
         else
         {
             BindEntity <HIS.Model.SS_APPLY> .CreateInstanceDAL(oleDb).Add(ssapply);
         }
         return(true);
     }
     catch (System.Exception err)
     {
         throw err;
     }
 }
Esempio n. 3
0
        /// <summary>
        /// 术后补录
        /// </summary>
        /// <param name="apply"></param>
        /// <param name="arrange"></param>
        /// <returns></returns>
        public bool AfterSsInfo(HIS.Model.SS_APPLY apply, HIS.Model.SS_ARRANGE arrange)
        {
            try
            {
                oleDb.BeginTransaction();
                BindEntity <HIS.Model.SS_APPLY> .CreateInstanceDAL(oleDb).Update(apply);

                BindEntity <HIS.Model.SS_ARRANGE> .CreateInstanceDAL(oleDb).Update(arrange);

                string strWhere = Tables.ss_roombed.NAME + oleDb.EuqalTo() + "'" + arrange.OPERA_ROOMBED + "'" + oleDb.And() +
                                  Tables.ss_roombed.USE_FLAG + oleDb.EuqalTo() + 1;
                string strSet = Tables.ss_roombed.USE_FLAG + oleDb.EuqalTo() + 0;
                BindEntity <HIS.Model.SS_ROOMBED> .CreateInstanceDAL(oleDb).Update(strWhere, strSet);

                oleDb.CommitTransaction();
                return(true);
            }
            catch (System.Exception e)
            {
                oleDb.RollbackTransaction();
                throw new Exception(e.Message);
            }
        }