/// <summary>
        /// 排序
        /// </summary>
        /// <param name="entity">排序实体</param>
        /// <param name="orderType">上移:up,下移down</param>
        /// <returns></returns>
        public Boolean Order(CD_PatientDiagnosis entity, string orderType)
        {
            string iFilter = "";

            switch (orderType)
            {
            case "up":
                iFilter = " and sortorder<" + entity.SortOrder + "  order by sortorder desc";
                break;

            case "down":
                iFilter = " and sortorder>" + entity.SortOrder + "  order by sortorder";
                break;

            default:
                return(false);
            }
            string sql = string.Format("select a.*,rownum  from (select * from CD_PatientDiagnosis where 1=1 and nvl(DEL,0) <> 1 {0}) a where rownum=1", iFilter);
            CD_PatientDiagnosis other = EntityOperate <CD_PatientDiagnosis> .GetEntityBySQL(sql);

            if (other == null)
            {
                return(false);
            }
            //互换
            int SortOrder = other.SortOrder;

            other.SortOrder  = entity.SortOrder;
            entity.SortOrder = SortOrder;
            SaveInfo(entity);
            SaveInfo(other);
            return(true);
        }
Example #2
0
 public string GetInfoById()
 {
     return(base.ExecuteActionJsonResult("获取系统模块信息", () =>
     {
         GI_SYSAPPINFO list = EntityOperate <GI_SYSAPPINFO> .GetEntityBySQL("select * from GI_SYSAPPINFO where SYSID = '" + Request["SYSID"] + "'");
         return new WebApi_Result()
         {
             data = list
         };
     }));
 }
 public string GetInfoById()
 {
     return(base.ExecuteActionJsonResult("获取系统业务参数信息", () =>
     {
         GI_SYSAPPParam list = EntityOperate <GI_SYSAPPParam> .GetEntityBySQL("select * from GI_SYSAPPPARAM where PARAMID = '" + Request["ParamID"] + "'");
         return new WebApi_Result()
         {
             data = list
         };
     }));
 }
Example #4
0
 public string GetInfoById()
 {
     return(base.ExecuteActionJsonResult("获取系统用户分组信息", () =>
     {
         GI_Role list = EntityOperate <GI_Role> .GetEntityBySQL("select * from GI_ROLE where ROLEID = '" + Request["RoleID"] + "'");
         return new WebApi_Result()
         {
             data = list
         };
     }));
 }
Example #5
0
        /// <summary>
        /// 根据病人ID和申请人ID查询病历查阅记录
        /// </summary>
        /// <param name="InpatientId">病人ID</param>
        /// <param name="ApplyUserID">申请人ID</param>
        /// <returns></returns>
        public CD_MedicalRecordAccessRecord GetInfoByInpatientIdAndApplyUserID(string InpatientId, string ApplyUserID)
        {
            CD_MedicalRecordAccessRecord info = EntityOperate <CD_MedicalRecordAccessRecord> .GetEntityBySQL("select * from CD_MedicalRecordAccessRecord where InpatientId='" + InpatientId + "' and ApplyUserID='" + ApplyUserID + "' and sysdate+numtodsinterval(-" + AccessStateHour + ",'hour')<= UpdateTime ");

            return(info);
        }
Example #6
0
        /// <summary>
        /// 根据字典编码和父类字典英文名获取实体
        /// </summary>
        /// <param name="DictCode"></param>
        /// <param name="DictEName"></param>
        /// <returns></returns>
        public GI_CodeDict GetCodeDictByDictCodeAndEName(string DictCode, string DictEName)
        {
            GI_CodeDict entity = EntityOperate <GI_CodeDict> .GetEntityBySQL("select * from GI_CodeDict where DictCode='" + DictCode + "' and ParentID in (select DictID from GI_CODEDICT where DictNameEN = '" + DictEName + "')");

            return(entity);
        }