if (PlanClass.Attributes.Contains("new_excelcolor_avg"))
                                    {
                                        ClassColorNum = ((AliasedValue)PlanClass["new_excelcolor_avg"]).Value.ToString();
                                    }
 
 
 
  private EntityCollection GetPlanClassesCollection(OrganizationServiceProxy organizationServiceProxy, string CenterGuid, DateTime RetrieveDate)
        {
            //返回值
            EntityCollection PlanClassCollection = null;
            try
            {
                string PlanClassQuery = "<fetch version='1.0' output-format='xml-platform' mapping='logical' distinct='false'>" +
                                                      "<entity name='new_planclass'>" +
                                                        "<attribute name='new_name' />" +
                                                        "<attribute name='new_planclassid' />" +
                                                        "<attribute name='new_course' />" +
                                                        "<attribute name='new_begintime' />" +
                                                        "<attribute name='new_classroom' />" +
                                                        "<attribute name='new_endtime' />" +
                                                        "<attribute name='createdon' />" +
                                                        "<attribute name='statecode' />" +
                                                        "<attribute name='new_subject' />" +
                                                        "<attribute name='new_maxnum' />" +
                                                        "<attribute name='new_coursetype' />" +
                                                        "<attribute name='new_chineseteacher' />" +
                                                        "<attribute name='ownerid' />" +
                                                        "<attribute name='new_ordernum' />" +
                                                        "<attribute name='new_ordermember' />" +
                                                        "<order attribute='new_name' descending='false' />" +
                                                        "<filter type='and'>" +
                                                          "<condition attribute='new_center' operator='eq' value='" + CenterGuid + "' />" +
                                                          "<condition attribute='new_begintime' operator='on' value='" + RetrieveDate.ToString() + "' />" +
                                                        "</filter>" +
                                                        "<link-entity name='new_kidsclassroom' from='new_kidsclassroomid' to='new_classroom' visible='false' link-type='outer'>" +
                                                          "<attribute name='new_shortname' alias='new_shortname_avg'/>" +
                                                        "</link-entity>" +
                                                        "<link-entity name='new_course' from='new_courseid' to='new_course' visible='false' link-type='outer'>" +
                                                          "<attribute name='new_excelcolor' alias='new_excelcolor_avg'/>" +
                                                          "<attribute name='new_courseshortname' alias='new_courseshortname_avg'/>" +
                                                        "</link-entity>" +
                                                      "</entity>" +
                                                    "</fetch>";
                PlanClassCollection = organizationServiceProxy.RetrieveMultiple(new FetchExpression(PlanClassQuery));
            }
            catch (Exception ex)
            {
                PlanClassCollection = null;
            }
            return PlanClassCollection;
        }

Fetch 别名查找的更多相关文章

  1. 3.linux 别名 查找 压缩与解压缩

    1.别名     alias  别名=‘定义命令内容’     alias grep=‘grep --color’       vim  ~/.bashrc     关掉终端再开一次!!!!才能生效 ...

  2. linux 查找

    linux下的查找命令有很多,常用的有which.whereis.locate.find.平时在网上搜索一些教程的时候,经常会有让使用这四条命令中的一条去查找一些东西,但是经常这次说用which,下次 ...

  3. Elasticsearch基础但非常有用的功能之一:别名

    文章转载自: https://mp.weixin.qq.com/s?__biz=MzI2NDY1MTA3OQ==&mid=2247484454&idx=1&sn=43e95a2 ...

  4. 浅析Yii2的view层设计

    Yii2.0的view层提供了若干重要的功能:assets资源管理,widgets小组件,layouts布局... 下面将通过对Yii2.0代码直接进行分析,看一下上述功能都是如何实现的,当然细枝末节 ...

  5. Python学习day3作业

    days3作业 作业需求 HAproxy配置文件操作 根据用户输入,输出对应的backend下的server信息 可添加backend 和sever信息 可修改backend 和sever信息 可删除 ...

  6. MySQL临时表

    当你创建临时表的时候,你可以使用temporary关键字.如: create temporary table tmp_table(name varchar(10) not null,passwd ch ...

  7. [转载]mysql创建临时表,将查询结果插入已有表中

    今天遇到一个很棘手的问题,想临时存起来一部分数据,然后再读取.我记得学数据库理论课老师说可以创建临时表,不知道mysql有没有这样的功能呢?临时表在内存之中,读取速度应该比视图快一些.然后还需要将查询 ...

  8. SpringMVC,MyBatis项目中兼容Oracle和MySql的解决方案及其项目环境搭建配置、web项目中的单元测试写法、HttpClient调用post请求等案例

     要搭建的项目的项目结构如下(使用的框架为:Spring.SpingMVC.MyBatis): 2.pom.xml中的配置如下(注意,本工程分为几个小的子工程,另外两个工程最终是jar包): 其中 ...

  9. 修改haproxy配置文件

    需求: 1.查 输入:www.oldboy.org 获取当前backend下的所有记录 2.新建 输入: arg = { 'bakend': 'www.oldboy.org', 'record':{ ...

  10. Python3学习之路~2.10 修改haproxy配置文件

    需求: .查 输入:www.oldboy.org 获取当前backend下的所有记录 .新建 输入: arg = { 'bakend': 'www.oldboy.org', 'record':{ 's ...

随机推荐

  1. Jetbrains fleet 配置 C++开发环境(基于CMAKE和MinGW)

    Jetbrains fleet 配置 C++开发环境 1. 安装 Jetbrains Fleet 到Fleet下载页面下载Toolbox并安装 Jetbrains-Fleet下载页 安装完成后在任务栏 ...

  2. # 个人认为windows下最好用的一批软件 #

    个人认为windows下最好用的一批软件 chrome 为什么是chrome而不是edge2? 这当然不是因为我是谷歌吹什么的.其实当得知edge2比chrome更省内存,运行更快,而且不跨越城墙就能 ...

  3. 【Java并发编程线程池】 ForkJoinPool 线程池是什么 怎么工作的 和传统的ThreadPoolExecutor比较

    Java 中的 ForkJoinPool 线程池是什么 怎么工作的 Java 中的 ForkJoinPool 线程池是什么 怎么工作的 相比较于传统的线程池,ForkJoinPool 线程池更适合处理 ...

  4. 记一次 contentInsetAdjustmentBehavior 引发的bug

    注:本文同步发布于微信公众号:stringwu的互联网杂谈记一次 contentInsetAdjustmentBehavior 引发的bug 1 背景 项目中使用到了UILable来展示相关的文本内容 ...

  5. 在 Windows 10 上实现免密码 SSH 登录

    前言 在日常开发中,SSH(Secure Shell)作为一种安全的远程登录协议,广泛用于 Linux 和 Windows 系统之间的连接.为了提高效率,我们可以通过配置免密码登录,省去每次连接时输入 ...

  6. fopen在VS中不安全的问题

    问题 fopen函数哎VS中使用,报错: error C4996: 'fopen': This function or variable may be unsafe. Consider using f ...

  7. Redis如何查看服务状态、关闭和启动

    一.查看Redis服务状态 Linux命令: 查看redis服务进程,是否已经启动 1.ps -ef | grep redis 2.ps -aux | grep redis 3.netstat -tu ...

  8. CF1896H2

    看不懂的题 首先考虑 \([a_i\neq b_i]=-2a_ib_i+a_i+b_i\),所以: \[f(a,b)=\sum a_i+\sum b_i-2\sum a_ib_i=N-2\sum a_ ...

  9. maven项目中解决 .git文件太大问题

    一.git项目上传后项目文件太大,git filter-branch手动清理 最近发现一个项目git目录已经达到200MB,严重影响了clone代码.操作之前请全量备份代码,操作失误可恢复 二.测试项 ...

  10. Luogu P5663 CSP-J2019 加工零件 题解 [ 绿 ] [ 分层图最短路 ]

    加工零件:非常好的一道图论题.CCF 普及组的题目大概也只有图论出的比较巧妙了. 题意简述:给你一张无向图,\(q\) 次询问,判断是否存在一条从 \(a\) 到 \(1\) 且长度为 \(L\) 的 ...