Esempio n. 1
0
        /// <summary>
        /// 新增地址页面
        /// </summary>
        /// <returns></returns>
        public ActionResult SiteAddIndex()
        {
            //省
            List <Sheng> sheng = new ShengManager().GetAll();
            Sheng        she   = new Sheng()
            {
                Id   = 0,
                name = "---请选择---"
            };

            sheng.Insert(0, she);
            ViewBag.type1 = new SelectList(sheng, "Id", "name");
            //市
            List <Shi> shis = new List <Shi>();
            Shi        shi  = new Shi()
            {
                Id   = 0,
                Name = "---请选择---"
            };

            shis.Insert(0, shi);
            ViewBag.type2 = new SelectList(shis, "Id", "Name");
            //区县
            List <QuXian> quxs = new List <QuXian>();
            QuXian        qu   = new QuXian()
            {
                Id   = 0,
                Name = "---请选择---"
            };

            quxs.Insert(0, qu);
            ViewBag.type3 = new SelectList(quxs, "Id", "Name");
            return(PartialView());
        }
Esempio n. 2
0
        // GET: Prople/Prople
        public ActionResult PropleIndex()
        {
            //省
            List <Sheng> sheng = new ShengManager().GetAll();
            Sheng        she   = new Sheng()
            {
                Id   = 0,
                name = "---请选择---"
            };

            sheng.Insert(0, she);
            ViewBag.type1 = new SelectList(sheng, "Id", "name");
            //市
            List <Shi> shis = new List <Shi>();
            Shi        shi  = new Shi()
            {
                Id   = 0,
                Name = "---请选择---"
            };

            shis.Insert(0, shi);
            ViewBag.type2 = new SelectList(shis, "Id", "Name");
            //区县
            List <QuXian> quxs = new List <QuXian>();
            QuXian        qu   = new QuXian()
            {
                Id   = 0,
                Name = "---请选择---"
            };

            quxs.Insert(0, qu);
            ViewBag.type3 = new SelectList(quxs, "Id", "Name");

            User us = Session["USER"] as User;

            if (us == null)
            {
                return(Redirect("/Home/Index"));
            }
            User newus = new UserManager().GetEntity(us.Id);

            return(View(newus));
        }