zoukankan      html  css  js  c++  java
  • 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;
            }

  • 相关阅读:
    在js中如何将字符串类型的日期("2020-11-30T02:21:42.000+0000")进行格式化
    微信小程序:报错fail webview count limit exceed
    微信小程序:picker组件实现下拉框效果
    微信小程序:post请求参数放在请求体中还是拼接到URL中需要看后台是如何接收的
    【华为云技术分享】如何用交互式特征工程工具进行数据分析处理
    【云小课】基础服务第25课 容灾演练:平时多练兵,急时保可用!
    【华为云分享】软件工程的迷途与沉思
    WebSocket 从入门到写出开源库
    教你轻松截获 Selenium 中的 Ajax 数据
    【华为云技术分享】Scrum Master如何引导团队中的刺头
  • 原文地址:https://www.cnblogs.com/jayblog/p/14668107.html
Copyright © 2011-2022 走看看