Esempio n. 1
0
        public IList <SysUser> GetSysUsers(SysUser SysUser)
        {
            string sql     = IBatisHelper.GetRuntimeSql(base.GetSqlMapper(databaseName), "SysConfig.SysUser.GetSysUsers", SysUser);
            var    reValue = base.GetSqlMapper(databaseName).QueryForList <SysUser>("SysConfig.SysUser.GetSysUsers", SysUser);

            logger.Debug("GetSysUsers:" + (reValue == null ? 0 : reValue.Count));
            return(reValue);
        }
Esempio n. 2
0
        public IList <ScOperation> GetReturnRoom()
        {
            Hashtable hashTable = new Hashtable();
            //hashTable.Add("ID", ID);
            string sql     = IBatisHelper.GetRuntimeSql(base.GetSqlMapper(databaseName), "Operation.ScOperation.GetReturnRoom", hashTable);
            var    reValue = base.GetSqlMapper(databaseName).QueryForList <ScOperation>("Operation.ScOperation.GetReturnRoom", hashTable);

            logger.Debug("ScOperation:" + (reValue == null ? 0 : reValue.Count));
            return(reValue);
        }
Esempio n. 3
0
        public IList <SysMenu> GetMenusByRoleID(int RoleID)
        {
            Hashtable hashTable = new Hashtable();

            hashTable.Add("RoleID", RoleID);
            string sql     = IBatisHelper.GetRuntimeSql(base.GetSqlMapper(databaseName), "SysConfig.SysMenu.GetMenusByRoleID", hashTable);
            var    reValue = base.GetSqlMapper(databaseName).QueryForList <SysMenu>("SysConfig.SysMenu.GetMenusByRoleID", hashTable);

            return(reValue);
        }
Esempio n. 4
0
        public SysMenu QueryOne(int ID)
        {
            Hashtable hashTable = new Hashtable();

            hashTable.Add("ID", ID);
            string sql     = IBatisHelper.GetRuntimeSql(base.GetSqlMapper(databaseName), "SysConfig.SysMenu.QueryOne", hashTable);
            var    reValue = base.GetSqlMapper(databaseName).QueryForList <SysMenu>("SysConfig.SysMenu.QueryOne", hashTable);

            return((SysMenu)reValue.FirstOrDefault());
        }
Esempio n. 5
0
        public List <SysParameter> GetChildNodesByCode(string Code)
        {
            Hashtable hashTable = new Hashtable();

            hashTable.Add("Code", Code);
            string sql     = IBatisHelper.GetRuntimeSql(base.GetSqlMapper(databaseName), "SysConfig.SysParameter.GetChildNodesByCode", hashTable);
            var    reValue = base.GetSqlMapper(databaseName).QueryForList <SysParameter>("SysConfig.SysParameter.GetChildNodesByCode", hashTable);

            return(reValue.ToList());
        }
Esempio n. 6
0
        public SysParameter QueryOneByCode(string code)
        {
            Hashtable hashTable = new Hashtable();

            hashTable.Add("code", code);
            string sql     = IBatisHelper.GetRuntimeSql(base.GetSqlMapper(databaseName), "SysConfig.SysParameter.QueryOneByCode", hashTable);
            var    reValue = base.GetSqlMapper(databaseName).QueryForList <SysParameter>("SysConfig.SysParameter.QueryOneByCode", hashTable);

            return((SysParameter)reValue.FirstOrDefault());
        }
Esempio n. 7
0
        public List <SysRole> GetChildNodes(int ParentID)
        {
            Hashtable hashTable = new Hashtable();

            hashTable.Add("ParentID", ParentID);
            string sql     = IBatisHelper.GetRuntimeSql(base.GetSqlMapper(databaseName), "SysConfig.SysRole.GetChildNodes", hashTable);
            var    reValue = base.GetSqlMapper(databaseName).QueryForList <SysRole>("SysConfig.SysRole.GetChildNodes", hashTable);

            return(reValue.ToList());
        }
Esempio n. 8
0
        public IList <OperationName> GetOperationNames(OperationName operationName)
        {
            Hashtable hashTable = new Hashtable();

            hashTable.Add("operationName", operationName);
            string sql     = IBatisHelper.GetRuntimeSql(base.GetSqlMapper(databaseName), "Operation.OperationName.GetOperationNames", hashTable);
            var    reValue = base.GetSqlMapper(databaseName).QueryForList <OperationName>("Operation.OperationName.GetOperationNames", hashTable);

            return(reValue);
        }
Esempio n. 9
0
        public IList <ScOperation> QueryForEvaluation(string PATIENT_ID, int VISIT_ID)
        {
            Hashtable hashTable = new Hashtable();

            hashTable.Add("PATIENT_ID", PATIENT_ID);
            hashTable.Add("VISIT_ID", VISIT_ID);
            string sql     = IBatisHelper.GetRuntimeSql(base.GetSqlMapper(databaseName), "Operation.ScOperation.QueryForEvaluation", hashTable);
            var    reValue = base.GetSqlMapper(databaseName).QueryForList <ScOperation>("Operation.ScOperation.QueryForEvaluation", hashTable);

            return(reValue);
        }
Esempio n. 10
0
        public IList <OperationMaster> GetSuspectedReturns(string PATIENT_ID, string VISIT_ID)
        {
            Hashtable hashTable = new Hashtable();

            hashTable.Add("PATIENT_ID", PATIENT_ID);
            hashTable.Add("VISIT_ID", VISIT_ID);
            string sql     = IBatisHelper.GetRuntimeSql(base.GetSqlMapper(databaseName), "Operation.OperationMaster.GetSuspectedReturns", hashTable);
            var    reValue = base.GetSqlMapper(databaseName).QueryForList <OperationMaster>("Operation.OperationMaster.GetSuspectedReturns", hashTable);

            logger.Debug("OperationMaster:" + (reValue == null ? 0 : reValue.Count));
            return(reValue);
        }
Esempio n. 11
0
        public int GetTotalCount(SysRole SysRole)
        {
            int       totalCount = 0;
            Hashtable hashTable  = new Hashtable();

            hashTable.Add("sysRole", SysRole);
            string sql     = IBatisHelper.GetRuntimeSql(base.GetSqlMapper(databaseName), "SysConfig.SysRole.GetTotalCount", hashTable);
            var    reValue = base.GetSqlMapper(databaseName).QueryForObject("SysConfig.SysRole.GetTotalCount", hashTable);

            totalCount = int.Parse(reValue.ToString());
            return(totalCount);
        }
Esempio n. 12
0
        public bool Update(SysMenu SysMenu)
        {
            try
            {
                string sql = IBatisHelper.GetRuntimeSql(base.GetSqlMapper(databaseName), "SysConfig.SysMenu.Update", SysMenu);
                base.GetSqlMapper(databaseName).Update("SysConfig.SysMenu.Update", SysMenu);

                return(true);
            }
            catch (Exception ex)
            {
                logger.Error(ex.ToString());
                return(false);
            }
        }
Esempio n. 13
0
        public bool Update(SysParameter SysParameter)
        {
            try
            {
                string sql = IBatisHelper.GetRuntimeSql(base.GetSqlMapper(databaseName), "SysConfig.SysParameter.Update", SysParameter);
                base.GetSqlMapper(databaseName).Update("SysConfig.SysParameter.Update", SysParameter);

                return(true);
            }
            catch (Exception ex)
            {
                GlobalMethod.log.Error(ex);
                return(false);
            }
        }
Esempio n. 14
0
        public IList <SysRole> LoadPageList(int pageIndex, int pageSize, SysRole SysRole)
        {
            Hashtable hashTable = new Hashtable();
            int       start     = (pageIndex - 1) * pageSize + 1;
            int       end       = pageIndex * pageSize;

            hashTable.Add("start", start);
            hashTable.Add("end", end);
            hashTable.Add("sysRole", SysRole);
            string sql     = IBatisHelper.GetRuntimeSql(base.GetSqlMapper(databaseName), "SysConfig.SysRole.LoadPageList", hashTable);
            var    reValue = base.GetSqlMapper(databaseName).QueryForList <SysRole>("SysConfig.SysRole.LoadPageList", hashTable);

            logger.Debug("LoadPageList:" + (reValue == null ? 0 : reValue.Count));
            return(reValue);
        }
Esempio n. 15
0
        public bool ResetPassword(SysRole SysRole)
        {
            try
            {
                string sql = IBatisHelper.GetRuntimeSql(base.GetSqlMapper(databaseName), "SysConfig.SysRole.ResetPassword", SysRole);
                base.GetSqlMapper(databaseName).Update("SysConfig.SysRole.ResetPassword", SysRole);

                return(true);
            }
            catch (Exception ex)
            {
                logger.Error(ex.ToString());
                return(false);
            }
        }
Esempio n. 16
0
        public bool Delete(int id)
        {
            try
            {
                Hashtable hashTable = new Hashtable();
                hashTable.Add("ID", id);
                string sql = IBatisHelper.GetRuntimeSql(base.GetSqlMapper(databaseName), "SysConfig.SysMenu.Delete", hashTable);
                base.GetSqlMapper(databaseName).Update("SysConfig.SysMenu.Delete", hashTable);

                return(true);
            }
            catch (Exception ex)
            {
                logger.Error(ex.ToString());
                return(false);
            }
        }
Esempio n. 17
0
 public bool ModifyValue(string code, string value)
 {
     try
     {
         Hashtable hashTable = new Hashtable();
         hashTable.Add("code", code);
         hashTable.Add("value", value);
         string sql = IBatisHelper.GetRuntimeSql(base.GetSqlMapper(databaseName), "SysConfig.SysParameter.ModifyValue", hashTable);
         base.GetSqlMapper(databaseName).Update("SysConfig.SysParameter.ModifyValue", hashTable);
         return(true);
     }
     catch (Exception ex)
     {
         GlobalMethod.log.Error(ex);
         return(false);
     }
 }