Ejemplo n.º 1
0
        public PartialViewResult Partial_SelectFxtCity()
        {
            List <FxtApi_SYSCity>     cityList     = CityApi.GetAllCity();
            List <FxtApi_SYSProvince> provinceList = ProvinceApi.GetAllProvince();

            ViewBag.Citylist     = cityList;
            ViewBag.ProvinceList = provinceList;
            return(PartialView());
        }
Ejemplo n.º 2
0
        public ActionResult AddProject_Fancybox(string projectName, string cityName, string areaName, long?caseId)
        {
            projectName = JsonHelp.DecodeField(projectName);
            cityName    = JsonHelp.DecodeField(cityName);
            areaName    = JsonHelp.DecodeField(areaName);
            int                       nowProvinceId   = 0;
            int                       nowCityId       = 0;
            int                       nowAreaId       = 0;
            FxtApi_SYSCity            city            = CityApi.GetCityByCityName(cityName);
            List <FxtApi_SYSProvince> provinceList    = ProvinceApi.GetAllProvince();
            List <FxtApi_SYSCode>     purposeCodeList = SysCodeApi.GetAllProjectPurposeCode();
            List <FxtApi_SYSCity>     cityList        = new List <FxtApi_SYSCity>();
            List <FxtApi_SYSArea>     areaList        = new List <FxtApi_SYSArea>();

            if (city != null)
            {
                nowProvinceId = city.ProvinceId;
                nowCityId     = city.CityId;
                cityList      = CityApi.GetCityByProvinceId(nowProvinceId);
                areaList      = AreaApi.GetAreaByCityId(nowCityId);
                if (areaList != null)
                {
                    FxtApi_SYSArea area = areaList.Where(p => !string.IsNullOrEmpty(areaName) && (p.AreaName.Contains(areaName) || areaName.Contains(p.AreaName))).FirstOrDefault();
                    if (area != null)
                    {
                        nowAreaId = area.AreaId;
                    }
                }
            }
            ViewBag.Address         = "";
            ViewBag.nowProvinceId   = nowProvinceId;
            ViewBag.nowCityId       = nowCityId;
            ViewBag.nowAreaId       = nowAreaId;
            ViewBag.projectName     = projectName;
            ViewBag.provinceList    = provinceList;
            ViewBag.purposeCodeList = purposeCodeList;
            ViewBag.cityList        = cityList;
            ViewBag.areaList        = areaList;
            if (caseId != null)
            {
                案例信息 caseObj = CaseManager.GetCaseById(Convert.ToInt64(caseId));
                if (caseObj != null && caseObj.地址 != null)
                {
                    ViewBag.Address = caseObj.地址;
                }
            }

            return(View());
        }