• Fetch 别名查找


       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;
            }

  • 相关阅读:
    atitit.组件化事件化的编程模型--服务端控件(1)---------服务端控件与标签的关系
    atitit. 浏览器插件 控件 applet 的部署,签名总结 浏览器 插件 控件 的签名安全机制o9o
    Atitit. 解压缩zip文件 的实现最佳实践 java c# .net php
    atitit. applet 浏览器插件 控件 的环境,开发,提示总结o9o
    Atitit..文件上传组件选型and最佳实践总结(3)----断点续传控件的实现
    Atitit..文件上传组件选型and最佳实践总结(2)----断点续传
    Atitit.guice3 ioc 最佳实践 o9o
    Atitit. C# java 的api 目录封装结构映射总结
    atitit. 统计功能框架的最佳实践(1)---- on hibernate criteria
    Atitit.Hibernate中Criteria 使用总结and 关联查询 and 按照子对象查询 o9o
  • 原文地址:https://www.cnblogs.com/jayblog/p/14668107.html
Copyright © 2020-2023  润新知