public void ActionAdd(ModImagesTourModel model) { if (model.RecordID > 0) { entity = ModImagesTourService.Instance.GetByID(model.RecordID); // khoi tao gia tri mac dinh khi update } else { entity = new ModImagesTourEntity(); // khoi tao gia tri mac dinh khi insert entity.Activity = CPViewPage.UserPermissions.Approve; } ViewBag.Data = entity; ViewBag.Model = model; }