/// <summary>
        /// 获取区域
        /// </summary>
        /// <param name="request"></param>
        /// <returns></returns>
        public List <ADCDInfo> GetAreaList(GetAreaList request)
        {
            if (string.IsNullOrEmpty(request.adcd) || null == request.tid)
            {
                throw new Exception("参数不能为空!");
            }
            try
            {
                using (var db = DbFactory.Open())
                {
                    List <ADCDInfo> list = new List <ADCDInfo>();
                    switch (request.tid)
                    {
                    case 3:
                        list = db.Select <ADCDInfo>(w => w.adcd.StartsWith(request.adcd.Substring(0, 4)) && w.adcd.EndsWith(request.adcd.Substring(6, 9)) && w.adcd != request.adcd);
                        break;

                    case 4:
                        list = db.Select <ADCDInfo>(w => w.adcd.StartsWith(request.adcd.Substring(0, 6)) && w.adcd.EndsWith(request.adcd.Substring(10, 6)) && w.adcd != request.adcd);
                        break;
                    }
                    return(list);
                }
            }
            catch (Exception ex)
            {
                throw new Exception(ex.Message);
            }
        }
Example #2
0
 public List <ADCDInfo> POST(GetAreaList request)
 {
     return(AuditManager.GetAreaList(request));
 }