コード例 #1
0
        //弹出材料选择窗口数据
        public dynamic GetMaterialType()
        {
            var service = new mms_materialTypeService();
            var requst = RequestWrapper.Instance()
                .LoadSettingXmlString(@"
<settings defaultOrderBy='MaterialType'>
    <select>
        MaterialTypeName as text,MaterialType as id,ParentCode as pid
    </select>
    <from>
        mms_materialType
    </from>
    <where defaultForAll='true' defaultCp='equal' defaultIgnoreEmpty='true' >
    </where>
</settings>");

            var pQuery = requst.ToParamQuery();

            //pQuery.AndWhere("MaterialType", "", x => {
            //    var data = request.ToParamQuery().GetData();
            //    var from = data.From.IndexOf(' ')>-1 ? string.Format("({0})", data.From) : data.From;
            //    var where = data.WhereSql;
            //    where = string.IsNullOrEmpty(where)? string.Empty:("where " + where);
            //    var sql = string.Format("MaterialType in (select MaterialType from {0} {1})", from, where);
            //    return sql;
            //});

            return service.GetDynamicList(pQuery);
        }
コード例 #2
0
ファイル: HomeController.cs プロジェクト: sunpinganlaw/webgis
        //弹出材料选择窗口数据
        public dynamic GetMaterialType()
        {
            var service = new mms_materialTypeService();
            var requst  = RequestWrapper.Instance()
                          .LoadSettingXmlString(@"
<settings defaultOrderBy='MaterialType'>
    <select>
        MaterialTypeName as text,MaterialType as id,ParentCode as pid
    </select>
    <from>
        mms_materialType
    </from>
    <where defaultForAll='true' defaultCp='equal' defaultIgnoreEmpty='true' >
    </where>
</settings>");

            var pQuery = requst.ToParamQuery();

            //pQuery.AndWhere("MaterialType", "", x => {
            //    var data = request.ToParamQuery().GetData();
            //    var from = data.From.IndexOf(' ')>-1 ? string.Format("({0})", data.From) : data.From;
            //    var where = data.WhereSql;
            //    where = string.IsNullOrEmpty(where)? string.Empty:("where " + where);
            //    var sql = string.Format("MaterialType in (select MaterialType from {0} {1})", from, where);
            //    return sql;
            //});

            return(service.GetDynamicList(pQuery));
        }
コード例 #3
0
        public dynamic GetTypes(RequestWrapper request)
        {
            request.LoadSettingXmlString(@"
<settings defaultOrderBy='MaterialType'>
   <where defaultIgnoreEmpty='true'>
        <field name='MaterialType'      cp='equal'></field>
        <field name='MaterialsTypeName'  cp='like' ></field>
    </where>
</settings>
");
            var result = new mms_materialTypeService().GetDynamicList(request.ToParamQuery());
            return result;
        }
コード例 #4
0
        public dynamic GetTypes(RequestWrapper request)
        {
            request.LoadSettingXmlString(@"
<settings defaultOrderBy='MaterialType'>
   <where defaultIgnoreEmpty='true'>
        <field name='MaterialType'      cp='equal'></field>
        <field name='MaterialsTypeName'  cp='like' ></field>
    </where>
</settings>
");
            var result = new mms_materialTypeService().GetDynamicList(request.ToParamQuery());

            return(result);
        }
コード例 #5
0
        public dynamic GetTypes(RequestWrapper request)
        {
            request.SetXml(@"
<settings>
   <where>
        <c column='MaterialType'       symbol='equal' ignore='empty'></c>
        <c column='MaterialsTypeName'  symbol='like'  ignore='empty'></c>
    </where>
    <orderby>MaterialType</orderby>
</settings>
");
            var result = new mms_materialTypeService().GetDynamicList(request.ToParamQuery());
            return result;
        }
コード例 #6
0
        //弹出材料选择窗口数据
        public dynamic GetMaterialType()
        {
            var service = new mms_materialTypeService();
            var requst = RequestWrapper.InstanceRequest()
                .SetXml(@"
<settings>
    <select>MaterialTypeName as text,MaterialType as id,ParentCode as pid</select>
    <from>mms_materialType</from>
    <orderby>MaterialType</orderby>
</settings>");
 
            var pQuery = requst.ToParamQuery();
            return service.GetDynamicList(pQuery);
        }
コード例 #7
0
        //弹出材料选择窗口数据
        public dynamic GetMaterialType()
        {
            var service = new mms_materialTypeService();
            var requst  = RequestWrapper.InstanceRequest()
                          .SetXml(@"
<settings>
    <select>MaterialTypeName as text,MaterialType as id,ParentCode as pid</select>
    <from>mms_materialType</from>
    <orderby>MaterialType</orderby>
</settings>");

            var pQuery = requst.ToParamQuery();

            return(service.GetDynamicList(pQuery));
        }
コード例 #8
0
        public dynamic GetTypes(RequestWrapper request)
        {
            request.SetXml(@"
<settings>
   <where>
        <c column='MaterialType'       symbol='equal' ignore='empty'></c>
        <c column='MaterialsTypeName'  symbol='like'  ignore='empty'></c>
    </where>
    <orderby>MaterialType</orderby>
</settings>
");
            var result = new mms_materialTypeService().GetDynamicList(request.ToParamQuery());

            return(result);
        }