public IHttpActionResult PostDisco(Disco disco)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

            db.Discoes.Add(disco);

            try
            {
                db.SaveChanges();
            }
            catch (DbUpdateException)
            {
                if (DiscoExists(disco.IdDisco))
                {
                    return(Conflict());
                }
                else
                {
                    throw;
                }
            }

            return(CreatedAtRoute("DefaultApi", new { id = disco.IdDisco }, disco));
        }
        public IHttpActionResult PutDisco(int id, Disco disco)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

            if (id != disco.IdDisco)
            {
                return(BadRequest());
            }

            db.Entry(disco).State = EntityState.Modified;

            try
            {
                db.SaveChanges();
            }
            catch (DbUpdateConcurrencyException)
            {
                if (!DiscoExists(id))
                {
                    return(NotFound());
                }
                else
                {
                    throw;
                }
            }

            return(StatusCode(HttpStatusCode.NoContent));
        }
Ejemplo n.º 3
0
    //Nos delvovera una lista de objetos tipo ADisco
    //Pra mostrarlos en el formulario principal
    public List <Disco> ListarDisco()
    {
        List <Disco> listaDisco = new List <Disco>();
        //Abrimos la conexion a la base de datos
        //para poder realizar la consulta
        SqlConnection conexion = obtenerConexion();
        //Consulta que obtendra tods los elementos de la tabla
        string consulta = "SELECT* FROM TblDisco";
        //Ejecucion de la consulta en la base de datos
        SqlCommand    comando = new SqlCommand(consulta, conexion);
        SqlDataReader reader  = comando.ExecuteReader();

        //Para que lea todas las filas usamos el HasRows
        if (reader.HasRows)
        {
            while (reader.Read())
            {
                //Obtenemos los datos cada fila y lo almacenamos
                //en los atributos del artista
                Disco disco = new Disco();
                disco.idDisco        = reader.GetInt32(0);
                disco.idArtista      = reader.GetInt32(1);
                disco.nombreDisco    = reader.GetString(2);
                disco.anoPublicacion = reader.GetInt32(3);
                disco.sumatoria      = reader.GetInt32(4);
                disco.puntuacion     = reader.GetInt32(5);
                listaDisco.Add(disco);
            }
        }
        return(listaDisco);
    }
Ejemplo n.º 4
0
 public ModificarStock(string discoId)
 {
     InitializeComponent();
     discosRepositorio  = new DiscosRepositorio();
     ajustesRepositorio = new AjustesRepositorio();
     disc = discosRepositorio.ObtenerDisco(discoId);
 }
        public async Task InsertDiscs()
        {
            if (_discoRepository.Any())
            {
                return;
            }

            var token = await GetToken();

            var listGeneros = typeof(GeneroEnum).GetEnumValuesWithDescription();
            var listDisco   = Disco.ListEmpty();

            foreach (var item in listGeneros)
            {
                var list = await GetDiscsByGenre(token, item);

                listDisco.AddRange(list);
            }

            try
            {
                _discoRepository.AddList(listDisco);
            }
            catch (Exception ex)
            {
                ExceptionData.GetInfoDataException("Disco", ex);
            }
        }
        public void Consulta_disco_por_identificador()
        {
            var   id    = 1;
            Disco disco = _discoController.Get(id).Value;

            Assert.AreEqual(id, disco.Id);
        }
Ejemplo n.º 7
0
        public static void Main(string[] args)
        {
            DateTime?timeOfLastException = null;

            while (true)
            {
                try
                {
                    ITrafficLightControl control = new Disco(new TrafficLightInterface());
                    control.Activate();
                }
                catch (Exception e)
                {
                    /*
                     * Sometimes the connection to the traffic light interface is interrupted, e.g. by power cycling.
                     * By catching the exception here, we can try to recreate the TrafficLightInterface and continue,
                     * rather than having to terminate the program. However, if there's another issue which will cause
                     * exceptions to be continually thrown, then we should give up and terminate.
                     */
                    var currentDateTime = DateTime.UtcNow;

                    if (timeOfLastException.HasValue && (currentDateTime - timeOfLastException.Value).TotalMinutes < 1)
                    {
                        throw e;
                    }

                    timeOfLastException = currentDateTime;
                }
            }
        }
Ejemplo n.º 8
0
 public void EditDisco(Disco disco)
 {
     disco.DataUltimaAtualizacao = DateTime.Now;
     this._appcontext.Disco.Update(disco);
     this._appcontext.Entry(disco).State = Microsoft.EntityFrameworkCore.EntityState.Modified;
     this._appcontext.SaveChanges();
 }
Ejemplo n.º 9
0
        public void DeleteDisco(string id)
        {
            Disco disco = GetDisco(id);

            this._appcontext.Entry(disco).State = Microsoft.EntityFrameworkCore.EntityState.Deleted;
            this._appcontext.SaveChanges();
        }
Ejemplo n.º 10
0
        public void Busca_disco_pelo_identificador()
        {
            var   id    = 1;
            Disco disco = _discoRepository.Get(id);

            Assert.AreEqual(id, disco.Id);
        }
Ejemplo n.º 11
0
 void IRepositorioDisco.CreateDisco(Disco disco)
 {
     disco.DataInclusao = DateTime.Now;
     this._appcontext.Disco.Add(disco);
     this._appcontext.Entry(disco).State = Microsoft.EntityFrameworkCore.EntityState.Added;
     this._appcontext.SaveChanges();
 }
Ejemplo n.º 12
0
        public Disco GetDiscosId(string id, GeneroMusical genero)
        {
            Item item = GetDiscosSpotifyId(id, genero);

            if (item != null)
            {
                Disco disco = new Disco();

                disco.Id     = item.id;
                disco.Nome   = item.name;
                disco.Ano    = item.release_date.Substring(0, 4);
                disco.href   = item.href;
                disco.Imagem = item.images.Select(s => s.url).Last();
                //disco.Preco = CashBack.Preco(genero);
                //disco.CashBack = CashBack.ValorDia(genero);
                disco.Genero = genero;

                return(disco);
            }
            else
            {
                Disco disco = new Disco {
                    Id = "NãoDefinido"
                };
                //List<Disco> ret = new List<Disco>();
                //ret.Add(disco);
                return(disco);
            }
        }
Ejemplo n.º 13
0
        public ActionResult GuardarDisco(Disco disco)
        {
            DiscoRepositorio discoRepo = new  DiscoRepositorio();

            discoRepo.GuardarDisco(disco);
            return(View());
        }
Ejemplo n.º 14
0
 public bool AtualizarDisco(Disco novoDisco)
 {
     _local.discos.Attach(novoDisco);
     _local.Entry(novoDisco).State = EntityState.Modified;
     _local.SaveChanges();
     return(true);
 }
Ejemplo n.º 15
0
        public ActionResult <string> Get(string id)
        {
            Disco discos = _appDisco.GetById(id);

            return(Ok(discos));// new string[] { "value1", "value2" };
            //return "value";
        }
Ejemplo n.º 16
0
        private void AdicionarAlbunsSpotify(ApplicationDbContext context)
        {
            SpotifyService spotify = new SpotifyService();
            TokenSpotify   token   = spotify.ObterTokenSpotify();

            if (token != null && !string.IsNullOrWhiteSpace(token.access_token))
            {
                string[] generos = new string[] { "pop", "rock", "classical", "jazz" };

                foreach (string genero in generos)
                {
                    RetornoAlbunsSpotify.RootObject albunsSpotify = spotify.ObterListaAlbuns(token, genero);

                    if (albunsSpotify != null && albunsSpotify.playlists != null)
                    {
                        string generoBanco = string.Empty;
                        switch (genero)
                        {
                        case "pop":
                            generoBanco = "POP";
                            break;

                        case "classical":
                            generoBanco = "CLASSIC";
                            break;

                        case "rock":
                            generoBanco = "ROCK";
                            break;

                        default:
                            generoBanco = "MPB";
                            break;
                        }

                        if (albunsSpotify.playlists.items.Any())
                        {
                            foreach (var item in albunsSpotify.playlists.items)
                            {
                                Disco disco = new Disco()
                                {
                                    Genero = generoBanco,
                                    Nome   = item.name
                                };

                                Random  randNum    = new Random();
                                decimal valorVenda = randNum.Next(10, 100);
                                double  centavos   = randNum.NextDouble();
                                disco.PrecoVenda = valorVenda + decimal.Round((decimal)centavos, 2);

                                context.CatalogoDiscos.Add(disco);
                            }

                            context.SaveChanges();
                        }
                    }
                }
            }
        }
Ejemplo n.º 17
0
        public ActionResult DeleteConfirmed(int id)
        {
            Disco disco = db.Discoes.Find(id);

            db.Discoes.Remove(disco);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Ejemplo n.º 18
0
 public void PutDisco(Disco disco)
 {
     //disco.Id = id;
     if (!repositorio.Update(disco))
     {
         throw new HttpResponseException(HttpStatusCode.NotFound);
     }
 }
Ejemplo n.º 19
0
 public ActionResult CreateDisco(Disco disco)
 {
     if (ModelState.IsValid)
     {
         discosService.CreateDisco(disco);
         return(RedirectToAction("Index"));
     }
     return(View());
 }
Ejemplo n.º 20
0
        public void Post(Disco disco)
        {
            // El Specification tambien se puede usar para hacer validacionoes y no solo filtrar un IEnumerable

            if (!new EspañolSpecification().IsSatisfiedBy(disco))
            {
                throw new Exception("El disco no es de idioma español");
            }
        }
Ejemplo n.º 21
0
 public static _ComponentModel FromJobComponent(Disco.Models.Repository.JobComponent jc)
 {
     return new _ComponentModel
     {
         Id = jc.Id,
         Description = jc.Description,
         Cost = jc.Cost.ToString("C")
     };
 }
Ejemplo n.º 22
0
        static void QueryTwo()
        {
            //Affichez la liste de tous les albums sur lesquels un Artiste joue du trombone.
            Disco d = new Disco();

            d.Albums.OrderBy(album => album.Titre)
            .Where(album => album.SideMen.Any(artist => artist.Value == "trombone"))
            .ToList().ForEach(album => WriteLine(album));
        }
Ejemplo n.º 23
0
        public IActionResult EditDisco(string id, [FromServices] DiscoBusiness discoBusiness)
        {
            Disco disco = discoBusiness.GetDisco(id);

            DiscosViewModel vm = new DiscosViewModel();

            vm.disco = disco;

            return(View(vm));
        }
Ejemplo n.º 24
0
        public ModificarDisco(string discoId)
        {
            InitializeComponent();
            discosRepositorio      = new DiscosRepositorio();
            interpretesRepositorio = new InterpretesRepositorio();
            selloRepositorio       = new SelloRepositorio();
            generosRepositorio     = new GenerosRepositorio();

            disc = discosRepositorio.ObtenerDisco(discoId);
        }
Ejemplo n.º 25
0
        public HttpResponseMessage PostDisco(Disco item)
        {
            item = repositorio.Add(item);
            var response = Request.CreateResponse <Disco>(HttpStatusCode.Created, item);

            string uri = Url.Link("DefaultApi", new { id = item.Id });

            response.Headers.Location = new Uri(uri);
            return(response);
        }
Ejemplo n.º 26
0
 public ActionResult Edit([Bind(Include = "ID_Disco,Nombre_Disco")] Disco disco)
 {
     if (ModelState.IsValid)
     {
         db.Entry(disco).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(disco));
 }
Ejemplo n.º 27
0
        public Disco GetDisco(int id)
        {
            Disco item = repositorio.Get(id);

            if (item == null)
            {
                throw new HttpResponseException(HttpStatusCode.NotFound);
            }
            return(item);
        }
        public Response Comprar(PedidoDto pedidoDto, int clienteId)
        {
            try
            {
                var listItemVenda = ItemVenda.ListEmpty();
                var discos        = Disco.ListEmpty();

                #region Validation

                if (pedidoDto.IsNotValid())
                {
                    return(Response.BuildBadRequest());
                }

                var cliente = _clienteRepository.ObterPorId(clienteId);

                if (cliente == null)
                {
                    return(Response.BuildBadRequest(ExceptionMessages.ClienteNaoEncontrado));
                }

                discos = _discoRepository.ObterListaPorId(pedidoDto.GetListId());

                if (!discos.Any())
                {
                    return(Response.BuildBadRequest(ExceptionMessages.DiscoNaoEncontrado));
                }

                #endregion

                foreach (var disco in discos)
                {
                    var pedidoItem = pedidoDto.ItemPedidoDto.Where(i => i.DiscoId == disco.DiscoId).FirstOrDefault();

                    var cashback = PorcentagemCachbackFactory.
                                   CriaInstanciaPorcentagemCashback((GeneroEnum)_generoRepository.ObterPorId(disco.Genero.GeneroId).GeneroId)
                                   .CalculaValorCashbackPorGenero(DateTime.Now.DayOfWeek);

                    listItemVenda.Add(ItemVenda.Build(pedidoItem.Quantidade, cashback, disco));
                }

                var venda = _vendaRepository.Add(Venda.Build(cliente, listItemVenda));

                if (!_unitOfWork.Commit())
                {
                    Response.BuildBadRequest(ExceptionMessages.ErroAoSalvarDados);
                }

                return(Response.BuildSuccess(_mapper.Map <VendaDto>(venda)));
            }
            catch (Exception ex)
            {
                return(Response.BuildInternalServerError(ex.Message));
            }
        }
Ejemplo n.º 29
0
        public void DeleteDisco(int id)
        {
            Disco item = repositorio.Get(id);

            if (item == null)
            {
                throw new HttpResponseException(HttpStatusCode.NotFound);
            }

            repositorio.Remove(id);
        }
Ejemplo n.º 30
0
        public Disco Get(long id)
        {
            var disco = new Disco();

            _action.Open(conn =>
            {
                var query = $"select * from {_tableDisco} where id = @id";
                disco     = conn.Query <Disco>(query, new { id }).FirstOrDefault();
            });
            return(disco);
        }
Ejemplo n.º 31
0
 public static _DeviceModel FromDeviceModel(Disco.Models.Repository.DeviceModel dm)
 {
     return new _DeviceModel()
     {
         Id = dm.Id,
         Description = dm.Description,
         Manufacturer = dm.Manufacturer,
         Model = dm.Model,
         ModelType = dm.ModelType
     };
 }
Ejemplo n.º 32
0
        public ActionResult Create([Bind(Include = "ID_Disco,Nombre_Disco")] Disco disco)
        {
            if (ModelState.IsValid)
            {
                db.Discoes.Add(disco);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(disco));
        }
Ejemplo n.º 33
0
        public static _ComponentModel FromDeviceComponent(Disco.Models.Repository.DeviceComponent dc)
        {
            return new _ComponentModel
            {
                Id = dc.Id,
                Description = dc.Description,
                Cost = dc.Cost.ToString("C"),
                JobSubTypes = dc.JobSubTypes.Select(j => string.Format("{0}_{1}", j.JobTypeId, j.Id)).ToList()
            };

        }
Ejemplo n.º 34
0
 public static _CommentModel FromJobLog(Disco.Models.Repository.JobLog jl)
 {
     return new _CommentModel
     {
         Id = jl.Id,
         JobId = jl.JobId,
         AuthorId = jl.TechUserId,
         Author = jl.TechUser.ToString(),
         Timestamp = jl.Timestamp,
         Comments = jl.Comments,
         HtmlComments = jl.Comments.ToHtmlComment().ToString()
     };
 }
Ejemplo n.º 35
0
 public static _AttachmentModel FromAttachment(Disco.Models.Repository.DeviceAttachment da)
 {
     return new _AttachmentModel
     {
         ParentId = da.DeviceSerialNumber,
         Id = da.Id,
         AuthorId = da.TechUserId,
         Author = da.TechUser.ToStringFriendly(),
         Timestamp = da.Timestamp,
         Comments = da.Comments,
         DocumentTemplateId = da.DocumentTemplateId,
         DocumentTemplateDescription = da.DocumentTemplateId == null ? null : da.DocumentTemplate.Description,
         Filename = da.Filename,
         MimeType = da.MimeType
     };
 }
Ejemplo n.º 36
0
 public static _AttachmentModel FromAttachment(Disco.Models.Repository.JobAttachment ja)
 {
     return new _AttachmentModel
     {
         ParentId = ja.JobId.ToString(),
         Id = ja.Id,
         AuthorId = ja.TechUserId,
         Author = ja.TechUser.ToStringFriendly(),
         Timestamp = ja.Timestamp,
         Comments = ja.Comments,
         DocumentTemplateId = ja.DocumentTemplateId,
         DocumentTemplateDescription = ja.DocumentTemplateId == null ? null : ja.DocumentTemplate.Description,
         Filename = ja.Filename,
         MimeType = ja.MimeType
     };
 }
Ejemplo n.º 37
0
 protected void btAgregar_Click(object sender, EventArgs e)
 {
     if (validar())
     {
         int idArtista = int.Parse(cbArtista.SelectedValue);
         Disco disco = new Disco(int.Parse(txId.Text), txNombre.Text, idArtista, int.Parse(txPrecio.Text));
         if (!DAODisco.sqlInsert(disco))
         {
             lbMensaje.Text = "Error. No se pudo agregar el disco, porque ya existe";
         }
         else
         {
             lbMensaje.Text = "Disco agregado exitosamente";
         }
     }
 }
 partial void UpdateLocationModeOverride(T4MVC_System_Web_Mvc_ActionResult callInfo, Disco.Models.Services.Job.LocationModes LocationMode, bool redirect);
 partial void AddJobOverride(T4MVC_System_Web_Mvc_ActionResult callInfo, int id, int JobId, string Comment, int? SLAExpiresMinutes, Disco.Models.Repository.JobQueuePriority Priority);
 public override System.Web.Mvc.ActionResult UpdateLocationMode(Disco.Models.Services.Job.LocationModes LocationMode, bool redirect)
 {
     var callInfo = new T4MVC_System_Web_Mvc_ActionResult(Area, Name, ActionNames.UpdateLocationMode);
     ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "LocationMode", LocationMode);
     ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "redirect", redirect);
     UpdateLocationModeOverride(callInfo, LocationMode, redirect);
     return callInfo;
 }
 partial void UpdateOrganisationAddressOverride(T4MVC_System_Web_Mvc_ActionResult callInfo, Disco.Models.BI.Config.OrganisationAddress organisationAddress, bool redirect);
Ejemplo n.º 42
0
        private void UpdateJobSubTypes(Disco.Models.Repository.JobQueue jobQueue, List<string> JobSubTypes)
        {
            Database.Configuration.LazyLoadingEnabled = true;

            // Remove All Existing
            if (jobQueue.JobSubTypes != null)
            {
                foreach (var st in jobQueue.JobSubTypes.ToArray())
                    jobQueue.JobSubTypes.Remove(st);
            }

            // Add New
            if (JobSubTypes != null && JobSubTypes.Count > 0)
            {
                var subTypes = new List<Disco.Models.Repository.JobSubType>();
                foreach (var stId in JobSubTypes)
                {
                    var typeId = stId.Substring(0, stId.IndexOf("_"));
                    var subTypeId = stId.Substring(stId.IndexOf("_") + 1);
                    var subType = Database.JobSubTypes.FirstOrDefault(jst => jst.JobTypeId == typeId && jst.Id == subTypeId);
                    subTypes.Add(subType);
                }
                jobQueue.JobSubTypes = subTypes;
            }
            Database.SaveChanges();
        }
 partial void FileStoreOverride(T4MVC_System_Web_Mvc_ActionResult callInfo, Disco.Web.Models.InitialConfig.FileStoreModel m);
 partial void DatabaseOverride(T4MVC_System_Web_Mvc_ActionResult callInfo, Disco.Web.Models.InitialConfig.DatabaseModel model);
 partial void CreateOverride(T4MVC_System_Web_Mvc_ActionResult callInfo, Disco.Web.Areas.Config.Models.UserFlag.CreateModel model);
 public override System.Web.Mvc.ActionResult FileStore(Disco.Web.Models.InitialConfig.FileStoreModel m)
 {
     var callInfo = new T4MVC_System_Web_Mvc_ActionResult(Area, Name, ActionNames.FileStore);
     ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "m", m);
     FileStoreOverride(callInfo, m);
     return callInfo;
 }
 public override System.Web.Mvc.ActionResult Create(Disco.Web.Areas.Config.Models.AuthorizationRole.CreateModel model)
 {
     var callInfo = new T4MVC_System_Web_Mvc_ActionResult(Area, Name, ActionNames.Create);
     ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "model", model);
     CreateOverride(callInfo, model);
     return callInfo;
 }
Ejemplo n.º 48
0
 partial void LogRepairOverride(T4MVC_System_Web_Mvc_ActionResult callInfo, Disco.Web.Models.Job.LogRepairModel m, System.Web.Mvc.FormCollection form);
 public override System.Web.Mvc.ActionResult AddJob(int id, int JobId, string Comment, int? SLAExpiresMinutes, Disco.Models.Repository.JobQueuePriority Priority)
 {
     var callInfo = new T4MVC_System_Web_Mvc_ActionResult(Area, Name, ActionNames.AddJob);
     ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "id", id);
     ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "JobId", JobId);
     ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "Comment", Comment);
     ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "SLAExpiresMinutes", SLAExpiresMinutes);
     ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "Priority", Priority);
     AddJobOverride(callInfo, id, JobId, Comment, SLAExpiresMinutes, Priority);
     return callInfo;
 }
Ejemplo n.º 50
0
 private void UpdateDescription(Disco.Models.Repository.DeviceModel deviceModel, string Description)
 {
     if (string.IsNullOrWhiteSpace(Description))
         deviceModel.Description = null;
     else
         deviceModel.Description = Description;
     Database.SaveChanges();
 }
Ejemplo n.º 51
0
 private void UpdateDefaultRepairProvider(Disco.Models.Repository.DeviceModel deviceModel, string DefaultRepairProvider)
 {
     if (string.IsNullOrEmpty(DefaultRepairProvider))
     {
         deviceModel.DefaultRepairProvider = null;
     }
     else
     {
         // Validate
         var RepairProvider = Plugins.GetPluginFeature(DefaultRepairProvider, typeof(RepairProviderFeature));
         deviceModel.DefaultRepairProvider = RepairProvider.Id;
     }
     Database.SaveChanges();
 }
Ejemplo n.º 52
0
 private void UpdateDefaultPurchaseDate(Disco.Models.Repository.DeviceModel deviceModel, string DefaultPurchaseDate)
 {
     if (string.IsNullOrEmpty(DefaultPurchaseDate))
     {
         deviceModel.DefaultPurchaseDate = null;
     }
     else
     {
         DateTime d;
         if (DateTime.TryParse(DefaultPurchaseDate, out d))
         {
             deviceModel.DefaultPurchaseDate = d;
         }
         else
         {
             throw new Exception("Invalid Date Format");
         }
     }
     Database.SaveChanges();
 }
Ejemplo n.º 53
0
 public override System.Web.Mvc.ActionResult LogRepair(Disco.Web.Models.Job.LogRepairModel m, System.Web.Mvc.FormCollection form)
 {
     var callInfo = new T4MVC_System_Web_Mvc_ActionResult(Area, Name, ActionNames.LogRepair);
     ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "m", m);
     ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "form", form);
     LogRepairOverride(callInfo, m, form);
     return callInfo;
 }
Ejemplo n.º 54
0
 partial void AddOfflineOverride(T4MVC_System_Web_Mvc_ActionResult callInfo, Disco.Web.Models.Device.AddOfflineModel m);
Ejemplo n.º 55
0
 public override System.Web.Mvc.ActionResult AddOffline(Disco.Web.Models.Device.AddOfflineModel m)
 {
     var callInfo = new T4MVC_System_Web_Mvc_ActionResult(Area, Name, ActionNames.AddOffline);
     ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "m", m);
     AddOfflineOverride(callInfo, m);
     return callInfo;
 }
Ejemplo n.º 56
0
 partial void ExportOverride(T4MVC_System_Web_Mvc_ActionResult callInfo, string DownloadId, Disco.Models.Services.Devices.Exporting.DeviceExportTypes? ExportType, int? ExportTypeTargetId);
 partial void CreateOverride(T4MVC_System_Web_Mvc_ActionResult callInfo, Disco.Web.Areas.Config.Models.AuthorizationRole.CreateModel model);
Ejemplo n.º 58
0
 public override System.Web.Mvc.ActionResult Export(string DownloadId, Disco.Models.Services.Devices.Exporting.DeviceExportTypes? ExportType, int? ExportTypeTargetId)
 {
     var callInfo = new T4MVC_System_Web_Mvc_ActionResult(Area, Name, ActionNames.Export);
     ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "DownloadId", DownloadId);
     ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "ExportType", ExportType);
     ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "ExportTypeTargetId", ExportTypeTargetId);
     ExportOverride(callInfo, DownloadId, ExportType, ExportTypeTargetId);
     return callInfo;
 }
 public override System.Web.Mvc.ActionResult Database(Disco.Web.Models.InitialConfig.DatabaseModel model)
 {
     var callInfo = new T4MVC_System_Web_Mvc_ActionResult(Area, Name, ActionNames.Database);
     ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "model", model);
     DatabaseOverride(callInfo, model);
     return callInfo;
 }
 public override System.Web.Mvc.ActionResult UpdateOrganisationAddress(Disco.Models.BI.Config.OrganisationAddress organisationAddress, bool redirect)
 {
     var callInfo = new T4MVC_System_Web_Mvc_ActionResult(Area, Name, ActionNames.UpdateOrganisationAddress);
     ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "organisationAddress", organisationAddress);
     ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "redirect", redirect);
     UpdateOrganisationAddressOverride(callInfo, organisationAddress, redirect);
     return callInfo;
 }