public ActionResult Excluir(Models.Integrantes objIntegrante)
        {
            BD.IGERENCEEntities objBD = new BD.IGERENCEEntities();

            BD.AGCF_FONTES objIntegranteBD = (from BD.AGCF_FONTES i in objBD.AGCF_FONTES where i.IDFONTES == objIntegrante.Identificador select i).FirstOrDefault();

            if (objIntegranteBD != null)
            {
                objBD.AGCF_FONTES.Remove(objIntegranteBD);
            }

            objBD.SaveChanges();

            string IdentificadorUsuario        = GetLogOnSessionModel().Identificador;
            string CodigoTipoFonteDebito       = Enumeradores.TipoFonte.DEBITO.RecuperarValor();
            string CodigoTipoFonteCredito      = Enumeradores.TipoFonte.CREDITO.RecuperarValor();
            string CodigoTipoFonteInvestimento = Enumeradores.TipoFonte.INVESTIMENTO.RecuperarValor();

            List <Models.Fonte> objFonte = (from BD.AGCF_FONTES i in objBD.AGCF_FONTES
                                            where i.IDUSUARIO == IdentificadorUsuario
                                            select new Models.Fonte()
            {
                Identificador = i.IDFONTES,
                Nome = i.DESNOME,
                DiaFechamento = i.NELDIAFECHAMENTO,
                TipoValor = i.CODTIPOFONTE,
                CartaoCredito = i.BOLCARTAOCREDITO != null && i.BOLCARTAOCREDITO == true ? true : false
            }).ToList();

            return(View("Listar", objFonte));
        }
Example #2
0
        public ActionResult Editar(Models.Integrantes objIntegrante)
        {
            BD.IGERENCEEntities objBD = new BD.IGERENCEEntities();

            BD.AGCF_INTEGRANTES objIntegranteBD = (from BD.AGCF_INTEGRANTES i in objBD.AGCF_INTEGRANTES where i.IDINTEGRANTE == objIntegrante.Identificador select i).FirstOrDefault();

            if (objIntegranteBD != null)
            {
                objIntegranteBD.DESNOME    = objIntegrante.Nome;
                objIntegranteBD.BOLEXTERNO = objIntegrante.PessoaExterna;
            }

            objBD.SaveChanges();

            string IdentificadorUsuario = GetLogOnSessionModel().Identificador;

            List <Models.Integrantes> objIntegrantes = (from BD.AGCF_INTEGRANTES i in objBD.AGCF_INTEGRANTES
                                                        where i.IDUSUARIO == IdentificadorUsuario
                                                        select new Models.Integrantes()
            {
                Identificador = i.IDINTEGRANTE,
                Nome = i.DESNOME,
                PessoaExterna = i.BOLEXTERNO != null && i.BOLEXTERNO == true ? true : false
            }).ToList();

            return(View("Listar", objIntegrantes));
        }
Example #3
0
        public ActionResult Excluir(Models.Integrantes objIntegrante)
        {
            BD.IGERENCEEntities objBD = new BD.IGERENCEEntities();

            BD.AGCF_INTEGRANTES objIntegranteBD = (from BD.AGCF_INTEGRANTES i in objBD.AGCF_INTEGRANTES where i.IDINTEGRANTE == objIntegrante.Identificador select i).FirstOrDefault();

            if (objIntegranteBD != null)
            {
                objBD.AGCF_INTEGRANTES.Remove(objIntegranteBD);
            }

            objBD.SaveChanges();

            string IdentificadorUsuario = GetLogOnSessionModel().Identificador;

            List <Models.Integrantes> objIntegrantes = (from BD.AGCF_INTEGRANTES i in objBD.AGCF_INTEGRANTES
                                                        where i.IDUSUARIO == IdentificadorUsuario
                                                        select new Models.Integrantes()
            {
                Identificador = i.IDINTEGRANTE,
                Nome = i.DESNOME
            }).ToList();

            return(View("Listar", objIntegrantes));
        }
Example #4
0
        public ActionResult Criar(Models.Integrantes objIntegrante)
        {
            BD.IGERENCEEntities objBD   = new BD.IGERENCEEntities();
            string IdentificadorUsuario = GetLogOnSessionModel().Identificador;

            BD.AGCF_INTEGRANTES objIntegranteBD = new BD.AGCF_INTEGRANTES()
            {
                DESNOME      = objIntegrante.Nome,
                IDUSUARIO    = IdentificadorUsuario,
                BOLEXTERNO   = objIntegrante.PessoaExterna,
                IDINTEGRANTE = Guid.NewGuid().ToString()
            };

            objBD.AGCF_INTEGRANTES.Add(objIntegranteBD);
            objBD.SaveChanges();

            List <Models.Integrantes> objIntegrantes = (from BD.AGCF_INTEGRANTES i in objBD.AGCF_INTEGRANTES
                                                        where i.IDUSUARIO == IdentificadorUsuario
                                                        select new Models.Integrantes()
            {
                Identificador = i.IDINTEGRANTE,
                Nome = i.DESNOME,
                PessoaExterna = i.BOLEXTERNO != null && i.BOLEXTERNO == true ? true : false
            }).ToList();

            return(View("Listar", objIntegrantes));
        }
Example #5
0
        public ActionResult Excluir(string id)
        {
            BD.IGERENCEEntities objBD         = new BD.IGERENCEEntities();
            Models.Integrantes  objIntegrante = (from BD.AGCF_INTEGRANTES i in objBD.AGCF_INTEGRANTES
                                                 where i.IDINTEGRANTE == id
                                                 select new Models.Integrantes()
            {
                Identificador = i.IDINTEGRANTE,
                Nome = i.DESNOME
            }).FirstOrDefault();

            return(View(objIntegrante));
        }
Example #6
0
        public ActionResult Editar(string id)
        {
            BD.IGERENCEEntities objBD         = new BD.IGERENCEEntities();
            Models.Integrantes  objIntegrante = (from BD.AGCF_INTEGRANTES i in objBD.AGCF_INTEGRANTES
                                                 where i.IDINTEGRANTE == id
                                                 select new Models.Integrantes()
            {
                Identificador = i.IDINTEGRANTE,
                Nome = i.DESNOME,
                PessoaExterna = i.BOLEXTERNO != null && i.BOLEXTERNO == true ? true : false
            }).FirstOrDefault();

            return(View(objIntegrante));
        }