Ejemplo n.º 1
0
        // GET: AndroidBox/Form/:id
        public ActionResult Form(int?id)
        {
            Models.AndroidBoxVM model = null;

            if (id != null)
            {
                var box = this.boxService.Get(id);
                if (box != null)
                {
                    model = new Models.AndroidBoxVM
                    {
                        Name        = box.BoxName,
                        Description = box.Description,
                        BoxId       = box.BoxID,
                        LocationId  = box.LocationID
                    };
                }
            }
            ViewBag.locationList = LocationController.GetLocationIdByBrandId();
            return(View(model));
        }
 // GET: Screen/Form/:id
 public ActionResult Form(int?id)
 {
     Models.ScreenVM model = null;
     if (id != null)
     {
         var screen = this.screenService.Get(id);
         if (screen != null)
         {
             model = new Models.ScreenVM
             {
                 Name         = screen.ScreenName,
                 ScreenId     = screen.ScreenID, //truyen screen Id qua view de phan biet update hay addnew
                 Description  = screen.Description,
                 LocationId   = screen.LocationID,
                 isHorizontal = screen.isHorizontal,
             };
         }
     }
     ViewBag.locationList   = LocationController.GetLocationIdByBrandId();
     ViewBag.resolutionList = ResolutionController.GetResolutionListByBrandID();
     return(View(model));
 }