Ejemplo n.º 1
0
        public MessageEntity GetPipeAndPointByPage(string layerequipment_type, string installation_address, string material_science, string caliber, string startCompletion_date, string endCompletion_date, string sort, string ordering, int num, int page)
        {
            MessageEntity message;

            if (!string.IsNullOrEmpty(startCompletion_date) && !string.IsNullOrEmpty(endCompletion_date))
            {
                if (!DateTime.TryParse(startCompletion_date, out DateTime sDate) || !DateTime.TryParse(endCompletion_date, out DateTime eDate))
                {
                    return(MessageEntityTool.GetMessage(ErrorType.FieldError, "", "日期格式有误"));
                }
                if (sDate > eDate)
                {
                    return(MessageEntityTool.GetMessage(ErrorType.FieldError, "", "起始日期不能大于结束日期"));
                }
                var result = _pipeDAL.GetPipeAndPointByPage(layerequipment_type, installation_address, material_science, caliber, "", sDate, eDate, sort, ordering, num, page, out string errMessge, out message);
            }
            else
            {
                var result = _pipeDAL.GetPipeAndPointByPage(layerequipment_type, installation_address, material_science, caliber, "", null, null, sort, ordering, num, page, out string errMessge, out message);
            }
            return(message);
        }