// GET: Admin/PHNC/Edit/5?provinecode=1
        public ActionResult EditDieuChinhPHNC(string provincecode, string DieuChinhKHXBDetailId)
        {
            //ViewBag.DTNBC = dbDieuChinhPHNC.getAllData(userInfo.UnitCode, DieuChinhKHXBDetailId);
            BDieuChinhPhanHuongUnitModel objPHNC = new BDieuChinhPhanHuongUnitModel();
            bindComboboxDieuChinhPHNC(1);
            ViewBag.DieuChinhKHXBDetailId = DieuChinhKHXBDetailId;
            if (!string.IsNullOrWhiteSpace(DieuChinhKHXBDetailId))
            {
                BDieuChinhKHXBDetail objDetail = dbDieuChinhPHNC.getDieuChinhDetailById(DieuChinhKHXBDetailId);
                objPHNC.DieuChinhKHXBDetailId = objDetail.Id;
            }

            //check session unitmodel
            UnitModelDieuChinh objUnitNew = new UnitModelDieuChinh();
            objUnitNew = BuildSessionDieuChinhPHNC(DieuChinhKHXBDetailId);
            List<QuanHuyen> lstHuyen = objUnitNew.getDistrictMapByProvinceCode(provincecode);

            TempData["TypeUnit"] = "2";
            TempData["DistrictComment"] = "bưu cục đã thiết lập phân hướng nhu cầu";

            ViewBag.QuanHuyen = lstHuyen;
            return View(objPHNC);
        }
        // GET: Admin/PHNC/Details/5
        public ActionResult DetailsDieuChinhPHNC(string provincecode, string districtcode, string DieuChinhKHXBDetailId)
        {
            BDieuChinhPhanHuongUnitModel objPHNC = new BDieuChinhPhanHuongUnitModel();
            if (!string.IsNullOrWhiteSpace(DieuChinhKHXBDetailId))
            {
                BDieuChinhKHXBDetail objDetail = dbDieuChinhPHNC.getDieuChinhDetailById(DieuChinhKHXBDetailId);
                objPHNC.DieuChinhKHXBDetailId = objDetail.Id;
                objPHNC.ThongTinBaoId = objDetail.BDieuChinhKHXB.ThongTinBaoId;
                ViewBag.DieuChinhKHXBDetailId = DieuChinhKHXBDetailId;
            }

            //check session unitmodel
            UnitModelDieuChinh objUnitNew = new UnitModelDieuChinh();
            objUnitNew = BuildSessionDieuChinhPHNC(DieuChinhKHXBDetailId);
            List<QuanHuyen> lstHuyen = new List<QuanHuyen>();
            if(!String.IsNullOrWhiteSpace(provincecode))
            {
                lstHuyen = objUnitNew.getDistrictMapByProvinceCode(provincecode);
                ViewBag.UnitForm = "0";
            }
            else if (!String.IsNullOrWhiteSpace(districtcode))
            {
                lstHuyen = objUnitNew.getDistrictMapByDistrictCode(districtcode);
                ViewBag.UnitForm = "1";
                ViewBag.ProvinceCodeDetail = lstHuyen.FirstOrDefault().ProvinceCode;
            }
            ViewBag.ProvinceCode = provincecode;
            return View(lstHuyen.OrderBy(t => t.DistrictName));
        }