Ejemplo n.º 1
0
        public CallDayPlanningViewEntity_User[] GetUserCDPList(CallDayPlanningViewEntity_User entity, int pageIndex, int pageSize, out int rowCount)
        {
            PagedQueryResult <CallDayPlanningViewEntity_User> pEntity = this._currentDAO.GetUserCDPList(entity, null, pageIndex, pageSize);

            rowCount = pEntity.RowCount;
            return(pEntity.Entities);
        }
        public string GetUserCDPList(NameValueCollection rParams)
        {
            CallDayPlanningViewEntity_User entity = new CallDayPlanningViewEntity_User();

            if (!string.IsNullOrEmpty(rParams["ClientStructureID"]) &&
                rParams["ClientStructureID"] != "null")
            {
                entity.ClientStructureID = Guid.Parse(rParams["ClientStructureID"]);
            }
            if (!string.IsNullOrEmpty(rParams["ClientPositionID"]) &&
                rParams["ClientPositionID"] != "null")
            {
                entity.ClientPositionID = rParams["ClientPositionID"].ToInt();
            }
            if (!string.IsNullOrEmpty(rParams["ClientUserID"]) &&
                rParams["ClientUserID"] != "null")
            {
                entity.ClientUserID = rParams["ClientUserID"].ToInt();
            }
            if (!string.IsNullOrEmpty(rParams["CallDate"]) &&
                rParams["CallDate"] != "null")
            {
                entity.CallDate = rParams["CallDate"].ToDateTime();
            }
            int pageSize  = rParams["limit"].ToInt();
            int pageIndex = rParams["page"].ToInt();
            int rowCount  = 0;

            return(string.Format("{{\"totalCount\":{1},\"topics\":{0}}}",
                                 new CallDayPlanningBLL(CurrentUserInfo).GetUserCDPList(entity, pageIndex, pageSize, out rowCount).ToJSON(),
                                 rowCount));
        }