public FormularioVersao listaFormsVersao(int idForm, int Ordem, DateTime dtProjeto) { Data.DB _db = new Data.DB(); FormularioVersao _fv = _db.getFormularioVersaoFluxo(idForm, dtProjeto); _fv.Ordem = Ordem; return _fv; }
public ActionResult Index() { int idProp = Convert.ToInt32(Session["Proponente"]); Data.DB _db = new Data.DB(); List<Projeto> projetos = _db.getProjetos(idProp, null); return View(projetos); }
public List<Formulario> listaForms(int id) { Data.DB _db = new Data.DB(); Projeto _projeto = _db.getProjeto(id); Fluxo _fluxo = _db.getFluxo(_projeto.IdProponente, _projeto.IdTipoProjeto, _projeto.DtCriacao); Session["FluxoId"] = _fluxo.Id; List<Formulario> listaFormularios = _db.getFormulariosFluxo(_fluxo.Id); return listaFormularios; }
public ActionResult NovoProjeto(string TipoProjeto, string Nome) { Data.DB _db = new Data.DB(); Projeto model = new Projeto(); model.Nome = Nome; model.IdTipoProjeto = Convert.ToInt32(TipoProjeto); model.IdProponente = Convert.ToInt32(Session["Proponente"]); _db.gravarProjeto(model); return RedirectToAction("Index"); }
public ActionResult Form(int? idFormulario, int idProjeto) { Data.DB _db = new Data.DB(); FormularioVersao formRenderizado = BuscaForm(_db, idFormulario, idProjeto, false, null); return View(formRenderizado); }
public ActionResult CriaComponenteExpansao(int idComponente, int ordemForm, int ordemCompForm) { Data.DB _db = new Data.DB(); ComponenteExpansao model = new ComponenteExpansao(); model.Elementos = _db.getComponenteElementos(idComponente); model.Ordem = ordemForm; model.OrdemComponenteForm = ordemCompForm; foreach (var elemento in model.Elementos) { if (elemento.IdTipoElemento == 5 || elemento.IdTipoElemento == 7) //combo || radio elemento.Valores = _db.getFormElementoValores(elemento.Id); } return PartialView("ComponenteExpansao", model); }
public ActionResult Form(FormularioVersao _form, int idProjeto) { Data.DB _db = new Data.DB(); ValidaForm(_db, ModelState, _form); if (!ModelState.IsValid) { FormularioVersao _formRetorno = BuscaForm(_db, _form.Id, idProjeto, true, _form); return View(_formRetorno); } int idFluxo = Convert.ToInt32(Session["FluxoId"]);//Session? Salvar(_db, idFluxo, _form, idProjeto); return RedirectToAction("Index"); }