예제 #1
0
        public ActionResult EditarFormaPag()
        {
            FormasPagamentoBLL formaBLL = new FormasPagamentoBLL();

            MLL.FormaPagamento forma = formaBLL.ObterPorId(formaBLL.DescriptografaID(Request.QueryString["codigo"]));

            return(View(forma));
        }
예제 #2
0
        public string ExcluirFormaPagamento(int codigo)
        {
            FormasPagamentoBLL formaBLL = new FormasPagamentoBLL();

            MLL.FormaPagamento forma = formaBLL.ObterPorId(codigo);

            return(formaBLL.ExcluirFormaPag(forma).ToString());
        }
예제 #3
0
        public MLL.FormaPagamento ObterPorId(int id)
        {
            FormaPagamentoDAL formaDAL = new FormaPagamentoDAL(db);

            MLL.FormaPagamento forma = formaDAL.obtemPorId(id);

            return(forma);
        }
예제 #4
0
        public JObject EditarFormaPag(MLL.FormaPagamento forma)
        {
            JObject           obj      = new JObject();
            FormaPagamentoDAL formaDAL = new FormaPagamentoDAL(db);

            if (formaDAL.Editar(forma))
            {
                obj.Add(new JProperty("ok", "ok"));
            }
            else
            {
                obj.Add(new JProperty("erro", formaDAL.erro));
            }

            return(obj);
        }
예제 #5
0
        public string ExcluirFormaPag(MLL.FormaPagamento formaPag)
        {
            string            result   = "";
            FormaPagamentoDAL formaDAL = new FormaPagamentoDAL(db);

            if (formaDAL.Remover(formaPag))
            {
                result = "ok";
            }
            else
            {
                result = "erro - " + formaDAL.erro;
            }

            return(result);
        }
예제 #6
0
        public string EditarFormaPag(MLL.FormaPagamento formaPag)
        {
            FormasPagamentoBLL formaBLL = new FormasPagamentoBLL();

            return(formaBLL.EditarFormaPag(formaPag).ToString());
        }
예제 #7
0
        public string CadastrarFormaPagamento(MLL.FormaPagamento formaPag)
        {
            FormasPagamentoBLL formaBLL = new FormasPagamentoBLL();

            return(formaBLL.CadastrarFormaPag(formaPag).ToString());
        }