internal void QuitarPrototipo(Prototipo prototipo) { using (SqlConnection cnn = ObtenerConexion()) { SqlCommand cmd = ObtenerComando(cnn, " sp_ABM_prototipo", CommandType.StoredProcedure); int resultado = 0; cmd.Parameters.Add("@xIdPrototipo", SqlDbType.Int); cmd.Parameters["@xIdPrototipo"].Value = prototipo.IdPrototipo; cmd.Parameters.Add("@xPrototipo", SqlDbType.VarChar); cmd.Parameters["@xPrototipo"].Value = prototipo.DescripcionPrototipo; cmd.Parameters.Add("@xAccion", SqlDbType.VarChar); cmd.Parameters["@xAccion"].Value = "B"; cmd.Parameters.Add("@xresult", SqlDbType.Int); cmd.Parameters["@xresult"].Direction = ParameterDirection.Output; cnn.Open(); cmd.ExecuteScalar(); resultado = Convert.ToInt32(cmd.Parameters["@xresult"].Value); if (resultado == 1) { throw new NegocioException("No se elimino el Prototipo. Verifique los datos."); } } }
public ActionResult DeleteConfirmed(int id) { Prototipo prototipo = db.Prototipos.Find(id); db.Prototipos.Remove(prototipo); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Create([Bind(Include = "Id,Descripcion,MetrosCuadrado,Version")] Prototipo prototipo) { if (ModelState.IsValid) { db.Prototipos.Add(prototipo); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(prototipo)); }
internal void ActualizarPrototipo(Prototipo prototipo) { if (prototipo.IdPrototipo != 0) { throw new NegocioException("El identificador del prototipo que se desea modificar no es válido. Verifique."); } if (string.IsNullOrEmpty(prototipo.DescripcionPrototipo)) { throw new NegocioException("Nombre es requerido."); } prototipoDato.ActualizarPrototipo(prototipo); }
internal void AgregarPrototipo(Prototipo prototipo) { if (prototipo.IdPrototipo != 0) { throw new NegocioException("El identificador de prototipo no es válido. Verifique."); } if (string.IsNullOrEmpty(prototipo.DescripcionPrototipo)) { throw new NegocioException("el nombre del programa debe ser ingresados."); } prototipoDato.AgregarPrototipo(prototipo); }
public void AgregarPrototipo(Prototipo prototipo) { try { prototipoLogica.AgregarPrototipo(prototipo); } catch (NegocioException ex) { throw (ex); } catch (Exception ex) { throw ex; } }
// GET: Prototipos/Delete/5 public ActionResult Delete(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } Prototipo prototipo = db.Prototipos.Find(id); if (prototipo == null) { return(HttpNotFound()); } return(View(prototipo)); }
public AnaliseTecnica(Prototipo.Projeto.Projeto projeto, ProjetoEstado estadoAnterior) : base(projeto, estadoAnterior) { EstadoID = 8; }
internal void QuitarPrototipo(int prototipoId) { Prototipo prototipo = TraerPrototipo(prototipoId); prototipoDato.QuitarPrototipo(prototipo); }
public AgDespAbertura(Prototipo.Projeto.Projeto projeto, ProjetoEstado estadoAnterior) : base(projeto, estadoAnterior) { EstadoID = 10; }
public CandidaturaEstado(Prototipo.Projeto.Projeto projeto, ProjetoEstado estadoAnterior) : base(projeto, estadoAnterior) { EstadoID = 1; }
public FechadoEstado(Prototipo.Projeto.Projeto projeto, ProjetoEstado estadoAnterior) : base(projeto, estadoAnterior) { EstadoID = 5; }
public SuspensoEstado(Prototipo.Projeto.Projeto projeto, ProjetoEstado estadoAnterior) : base(projeto, estadoAnterior) { EstadoID = 2; }
public Pagamento(Prototipo.Projeto.Projeto projeto, ProjetoEstado estadoAnterior) : base(projeto, estadoAnterior) { EstadoID = 4; }
public RejeitadoEstado(Prototipo.Projeto.Projeto projeto, ProjetoEstado estadoAnterior) : base(projeto, estadoAnterior) { EstadoID = 3; }
public AgDespFinanciamento(Prototipo.Projeto.Projeto projeto, ProjetoEstado estadoAnterior) : base(projeto, estadoAnterior) { EstadoID = 9; }
public ArquivadoEstado(Prototipo.Projeto.Projeto projeto, ProjetoEstado estadoAnterior) : base(projeto, estadoAnterior) { EstadoID = 7; }
public AtivoEstado(Prototipo.Projeto.Projeto projeto, ProjetoEstado estadoAnterior) : base(projeto, estadoAnterior) { EstadoID = 6; }