public ActionResult Agregar(string Nombre)
        {
            EstadoPedidoBO ObjBO = new EstadoPedidoBO();

            ObjBO.Nombre = Nombre;
            return(RedirectToAction("EstadoPlatillo", "EstadoPlatillo"));
        }
Ejemplo n.º 2
0
        public int Eliminar(EstadoPedidoBO ObjBO)
        {
            SqlCommand cmd = new SqlCommand("DELETE FROM [dbo].[ESTADOPEDIDO] WHERE IDEstado = @ID ");

            cmd.Parameters.Add("@ID", SqlDbType.Int).Value = ObjBO.IDEstado;
            cmd.CommandType = CommandType.Text;
            return(ObjConex.EjecutarComando(cmd));
        }
        public ActionResult Eliminar(string IDEstado)
        {
            EstadoPedidoBO ObjBO = new EstadoPedidoBO();

            ObjBO.IDEstado = int.Parse(IDEstado);
            ObjModel.Eliminar(ObjBO);
            return(RedirectToAction("EstadoPedido", "EstadoPedido"));
        }
Ejemplo n.º 4
0
        public int AgregarEstado(EstadoPedidoBO ObjBO)
        {
            SqlCommand cmd = new SqlCommand("insert into ESTADOPEDIDO (NOMBRE, ESTADO)output inserted.IDEstado values (@NOMBRE, @ESTADO)");

            cmd.Parameters.Add("@NOMBRE", SqlDbType.VarChar).Value = ObjBO.Nombre;
            cmd.Parameters.Add("@ESTADO", SqlDbType.Bit).Value     = ObjBO.Estado;
            cmd.CommandType = CommandType.Text;
            return(ObjConex.EjecutarComando(cmd));
        }
        public ActionResult Agregar(string Nombre)
        {
            EstadoPedidoBO ObjBO = new EstadoPedidoBO();

            ObjBO.Nombre = Nombre;
            ObjBO.Estado = true;
            ObjModel.AgregarEstado(ObjBO);
            return(RedirectToAction("EstadoPedido", "EstadoPedido"));
        }