// GET: Movimento public ActionResult Index() { ViewBag.COD_USUARIO = "TESTE"; MovimentoBLL mov = new MovimentoBLL(); List <MovimentoVM> listMovimentoVM = new List <MovimentoVM>(); listMovimentoVM = mov.GetMovimento(); return(View(listMovimentoVM)); }
public void Inicializa() { MovimentoBLL BLL = new MovimentoBLL(); situacao = BLL.BuscaCaixa_Situacao(Autenticacao.GetCaixa_Situacao().Id); EntityToTela(situacao); if (situacao != null) { Autenticacao.SetCaixa_Situacao(situacao); EntityToTela(situacao); } }
public ActionResult Create([Bind(Include = "DAT_MES,DAT_ANO,NUM_LANCAMENTO,COD_PRODUTO,COD_COSIF,VAL_VALOR,DES_DESCRICAO,DAT_MOVIMENTO,COD_USUARIO")] MOVIMENTO_MANUAL mOVIMENTO_MANUAL) { mOVIMENTO_MANUAL.DAT_MOVIMENTO = DateTime.Today; mOVIMENTO_MANUAL.COD_USUARIO = "TESTE"; if (true)//if (ModelState.IsValid) corrigir a validação { MovimentoBLL mov = new MovimentoBLL(); mov.CreateMovimento(mOVIMENTO_MANUAL); return(RedirectToAction("Index")); } }
private void btnFechaCaixa_Click(object sender, EventArgs e) { MovimentoBLL BLL = new MovimentoBLL(); TelaToEntity(); if (situacao != null) { if (BLL.Fecha(situacao)) { CaixaFechado(); Inicializa(); MessageBox.Show("Caixa Encerrado com Sucesso"); } } }
private void btnSalvar_Click(object sender, EventArgs e) { this.Cursor = Cursors.AppStarting; MovimentoBLL BLL = new MovimentoBLL(); if (BLL.Cadastra(TelaToEntity())) { MessageBox.Show("Saída Cadastrada com sucesso"); LimpaTela(); } else { MessageBox.Show("Verifique os campos obrigatorios"); } this.Cursor = Cursors.Default; }
private void btnAbrirCaixa_Click(object sender, EventArgs e) { TelaToEntity(); if (Autenticacao.GetCaixa_Situacao().Situacao_Id == 0) { MovimentoBLL BLL = new MovimentoBLL(); if (situacao != null) { if (BLL.Abre(situacao)) { CaixaAberto(); Inicializa(); MessageBox.Show("Caixa Aberto com Sucesso"); } } } }