コード例 #1
0
        /// <summary>
        /// 获取当前用户的报送楼宇
        /// </summary>
        public DataTable GetCurrentUsersOrganizeList()
        {
            //获取当前用户所属组织有的楼盘权限,并将ID放入List中,用作后边查询楼栋的筛选条件
            ElementOrganizeBLL elementOrganizeBLL = new ElementOrganizeBLL();
            DataTable          houses             = elementOrganizeBLL.GetCurrentBuildingModify();
            List <string>      housesID           = new List <string>();

            foreach (DataRow dr in houses.Rows)
            {
                if (!housesID.Contains(dr["ElementID"].ToString()))
                {
                    housesID.Add(dr["ElementID"].ToString());
                }
            }

            if (housesID.Count == 0)
            {
                return(new DataTable());
            }

            //查询满足条件的所有楼栋
            Dictionary <KeyValuePair <string, RoadFlow.Data.Model.SQLFilterType>, object> where = new Dictionary <KeyValuePair <string, Data.Model.SQLFilterType>, object>();
            where.Add(new KeyValuePair <string, RoadFlow.Data.Model.SQLFilterType>("HouseID", RoadFlow.Data.Model.SQLFilterType.IN), housesID);
            where.Add(new KeyValuePair <string, RoadFlow.Data.Model.SQLFilterType>("Status", RoadFlow.Data.Model.SQLFilterType.EQUAL), RoadFlow.Data.Model.Status.Normal);//正常的数据。
            return(baseDb.GetAll(0, where));
        }
コード例 #2
0
        /// <summary>
        /// 当前用户组织所有能变更的楼栋(带翻页。)
        /// </summary>
        /// <returns></returns>
        public DataTable GetCurrentUsersOrganizeList(int pageIndex, int size, Dictionary <KeyValuePair <string, RoadFlow.Data.Model.SQLFilterType>, object> where, out string pager)
        {
            //获取当前用户所属组织有的楼盘权限,并将ID放入List中,用作后边查询楼栋的筛选条件
            ElementOrganizeBLL elementOrganizeBLL = new ElementOrganizeBLL();
            DataTable          houses             = elementOrganizeBLL.GetCurrentBuildingModify();
            List <string>      housesID           = new List <string>();

            foreach (DataRow dr in houses.Rows)
            {
                if (!housesID.Contains(dr["ElementID"].ToString()))
                {
                    housesID.Add(dr["ElementID"].ToString());
                }
            }

            if (housesID.Count == 0)
            {
                pager = string.Empty;
                return(new DataTable());
            }

            //查询满足条件的所有楼栋
            where.Add(new KeyValuePair <string, RoadFlow.Data.Model.SQLFilterType>("HouseID", RoadFlow.Data.Model.SQLFilterType.IN), housesID);
            return(GetPagerData(out pager, size, pageIndex, where));
        }
コード例 #3
0
        /// <summary>
        /// 当前用户组织所有能变更的楼栋
        /// </summary>
        /// <returns></returns>
        public DataTable GetCurrentUsersOrganizeList(Dictionary <KeyValuePair <string, RoadFlow.Data.Model.SQLFilterType>, object> where)
        {
            //获取当前用户所属组织有的楼盘权限,并将ID放入List中,用作后边查询楼栋的筛选条件
            ElementOrganizeBLL elementOrganizeBLL = new ElementOrganizeBLL();
            DataTable          houses             = elementOrganizeBLL.GetCurrentBuildingModify();
            List <string>      housesID           = new List <string>();

            foreach (DataRow dr in houses.Rows)
            {
                if (!housesID.Contains(dr["ElementID"].ToString()))
                {
                    housesID.Add(dr["ElementID"].ToString());
                }
            }

            //查询满足条件的所有楼栋
            where.Add(new KeyValuePair <string, RoadFlow.Data.Model.SQLFilterType>("HouseID", RoadFlow.Data.Model.SQLFilterType.IN), housesID);
            return(GetAll(where));
        }