Exemplo n.º 1
0
        public ActionResult Edit(RegionModelView rmv)
        {
            rmv.rm.ZipCodes = new List <ZipCodeModel>();


            rmv.rm.ZipCodes.Add(new ZipCodeModel
            {
                Start = rmv.zcp.Start,
                End   = rmv.zcp.End
            });

            _rc.Edit(rmv.rm);
            return(RedirectToAction("Index"));
        }
Exemplo n.º 2
0
        public ActionResult Create(RegionModelView rmv)
        {
            rmv.rm.ID       = Guid.NewGuid().ToString();
            rmv.rm.ZipCodes = new List <ZipCodeModel>();


            rmv.rm.ZipCodes.Add(new ZipCodeModel
            {
                Start = rmv.zcp.Start,
                End   = rmv.zcp.End
            });

            _rc.create(rmv.rm);
            return(RedirectToAction("Index"));
        }
Exemplo n.º 3
0
 public RegionController(IRegionService rc)
 {
     this._rc  = rc;
     this._rmv = new RegionModelView();
 }