Pass data from one view to another view MVC 5 Entity framework 6 sql server

0

I have a view where I load the information of what I call an initiative which is linked to a Tleads table, this is the view.

<br /><br /><br />
<div class="panel panel-primary">
    <div class="panel-heading">
        <h2 class="panel-title">Nueva Iniciativa</h2>
    </div>
    <div class="panel-body">
        <div class="col-md-12">
            <div class="col-md-6">
                <p>
                    <!--Falta Programar la  funcion para  convertir a  oportunidad.-->
                    @Html.ActionLink("Convertir en Oportunidad ", "ConvertiraOportunidad", "null", "null", new { @class = "btn btn-default btn-group-lg text-uppercase text-center", @title = "Editar" })
                </p>
            </div>
            <div class="col-md-6">
                <p class="text-right">
                    @Html.ActionLink("Asignar Actividad ", "Create", "Null", "null", new { @class = "btn btn-default btn-group-lg text-uppercase text-center", @title = "Editar" })
                </p>

            </div>
        </div>
        <div class="col-lg-12">
            <div class="jumbotron">
                @using (Html.BeginForm())
                {
                    @Html.AntiForgeryToken()
                    <div class="col-md-12">

                        <hr />
                        @Html.ValidationSummary(true, "", new { @class = "text-danger" })
                        <div class="form-group">
                            <div class="col-sm-6" style="width:100px">
                                @Html.LabelFor(model => model.IniciativaDesc, "Iniciativa", htmlAttributes: new { @class = "control-label col-md-2" })
                            </div>
                            <div class="col-md-6" style="width:100%;">
                                @Html.EditorFor(model => model.IniciativaDesc, new { htmlAttributes = new { @class = "form-control" } })
                                @Html.ValidationMessageFor(model => model.IniciativaDesc, "", new { @class = "text-danger" })
                            </div>
                        </div>
                    </div>
                    <div class="col-md-12">
                        <div class="col-md-4">
                            <div class="form-group">
                                <div class="col-md-2" style="width:100%;">
                                    @Html.LabelFor(model => model.NombreComapnia, "Empresa", htmlAttributes: new { @class = "control-label col-md-2" })
                                </div>
                                <div class="col-md-2" style="width:100%;">
                                    @Html.EditorFor(model => model.NombreComapnia, new { htmlAttributes = new { @class = "form-control" } })
                                    @Html.ValidationMessageFor(model => model.NombreComapnia, "", new { @class = "text-danger" })
                                </div>
                            </div>
                        </div>
                        <div class="col-md-4">
                            <div class="form-group">
                                <div class="col-md-2" style="width:100%;">
                                    @Html.LabelFor(model => model.Direccion, "Dirección", htmlAttributes: new { @class = "control-label col-md-2" })
                                </div>

                                <div class="col-md-2" style="width:100%;">
                                    @Html.EditorFor(model => model.Direccion, new { htmlAttributes = new { @class = "form-control" } })
                                    @Html.ValidationMessageFor(model => model.Direccion, "", new { @class = "text-danger" })
                                </div>
                            </div>
                        </div>
                        <div class="col-md-4">
                            <div class="form-group">
                                <div class="col-md-2" style="width:110%;">
                                    @Html.LabelFor(model => model.SitioWeb, "SitioWeb", htmlAttributes: new { @class = "control-label col-md-2" })
                                </div>
                                <div class="col-md-2" style="width:100%">
                                    @Html.EditorFor(model => model.SitioWeb, new { htmlAttributes = new { @class = "form-control" } })
                                    @Html.ValidationMessageFor(model => model.SitioWeb, "", new { @class = "text-danger" })
                                </div>
                            </div>
                        </div>
                    </div>
                    <hr /><br />
                    <div class="col-md-12">
                        <div class="col-md-4">
                            <div class="form-group">
                                <div class="col-md-2" style="width:100%;">
                                    @Html.LabelFor(model => model.EquipoId, "Equipo", htmlAttributes: new { @class = "control-label col-md-2" })
                                </div>
                                <div class="col-md-2" style="width:100%">
                                    @Html.DropDownList("EquipoId", null, htmlAttributes: new { @class = "form-control" })
                                    @Html.ValidationMessageFor(model => model.EquipoId, "", new { @class = "text-danger" })
                                </div>
                            </div>
                        </div>
                        <div class="col-md-4">
                            <div class="form-group">
                                <div class="col-md-2" style="width:100%">
                                    @Html.LabelFor(model => model.NombreContacto, htmlAttributes: new { @class = "control-label col-md-2" })
                                </div>

                                <div class="col-md-2" style="width:100%">
                                    @Html.EditorFor(model => model.NombreContacto, "Contacto", new { htmlAttributes = new { @class = "form-control" } })
                                    @Html.ValidationMessageFor(model => model.NombreContacto, "", new { @class = "text-danger" })
                                </div>
                            </div>
                        </div>
                        <div class="col-md-4">
                            <div class="form-group">
                                <div class="col-md-2" style="width:100%">
                                    @Html.LabelFor(model => model.TituloId, "Titulo", htmlAttributes: new { @class = "control-label col-md-2" })
                                </div>
                                <div class="col-md-2" style="width:100%">
                                    @Html.DropDownList("TituloId", null, htmlAttributes: new { @class = "form-control" })
                                    @Html.ValidationMessageFor(model => model.TituloId, "", new { @class = "text-danger" })
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="col-md-12">
                        <div class="col-md-4">
                            <div class="form-group">
                                <div class="col-md-2" style="width:100%;">
                                    @Html.LabelFor(model => model.CorreoElectronico, htmlAttributes: new { @class = "control-label col-md-2" })
                                </div>
                                <div class="col-md-2" style="width:100%;">
                                    @Html.EditorFor(model => model.CorreoElectronico, new { htmlAttributes = new { @class = "form-control" } })
                                    @Html.ValidationMessageFor(model => model.CorreoElectronico, "", new { @class = "text-danger" })
                                </div>
                            </div>
                        </div>
                        <div class="col-md-4">
                            <div class="form-group">
                                <div class="col-md-2" style="width:100%;">
                                    @Html.LabelFor(model => model.PuestoTrabajo, htmlAttributes: new { @class = "control-label col-md-2" })
                                </div>
                                <div class="col-md-2" style="width:100%;">
                                    @Html.EditorFor(model => model.PuestoTrabajo, new { htmlAttributes = new { @class = "form-control" } })
                                    @Html.ValidationMessageFor(model => model.PuestoTrabajo, "", new { @class = "text-danger" })
                                </div>
                            </div>

                        </div>
                        <div class="col-md-4">
                            <div class="form-group">
                                <div class="col-md-2" style="width:100%">
                                    @Html.LabelFor(model => model.Telefono, htmlAttributes: new { @class = "control-label col-md-2" })
                                </div>
                                <div class="col-md-2" style="width:100%">
                                    @Html.EditorFor(model => model.PuestoTrabajo, new { htmlAttributes = new { @class = "form-control" } })
                                    @Html.ValidationMessageFor(model => model.PuestoTrabajo, "", new { @class = "text-danger" })
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="col-md-12">
                        <div class="col-md-4">
                            <div class="form-group">
                                <div class="col-md-2" style="width:100%">
                                    @Html.LabelFor(model => model.Movil, htmlAttributes: new { @class = "control-label col-md-2" })
                                </div>
                                <div class="col-md-2" style="width:100%">
                                    @Html.EditorFor(model => model.Movil, new { htmlAttributes = new { @class = "form-control" } })
                                    @Html.ValidationMessageFor(model => model.Movil, "", new { @class = "text-danger" })
                                </div>
                            </div>
                        </div>
                        <div class="col-md-4">
                            <div class="form-group">
                                <div class="col-md-2" style="width:100%">
                                    @Html.LabelFor(model => model.PrioridadId, "PrioridadId", htmlAttributes: new { @class = "control-label col-md-2" })
                                </div>
                                <div class="col-md-2" style="width:100%">
                                    @Html.DropDownList("PrioridadId", null, htmlAttributes: new { @class = "form-control" })
                                    @Html.ValidationMessageFor(model => model.PrioridadId, "", new { @class = "text-danger" })
                                </div>
                            </div>
                        </div>
                        <div class="col-md-4">
                            <div class="form-group">
                                <div class="col-md-2" style="width:100%">
                                    @Html.LabelFor(model => model.EtiquetaId, "EtiquetaId", htmlAttributes: new { @class = "control-label col-md-2" })
                                </div>
                                <div class="col-md-2" style="width:100%">
                                    @Html.DropDownList("EtiquetaId", null, htmlAttributes: new { @class = "form-control" })
                                    @Html.ValidationMessageFor(model => model.EtiquetaId, "", new { @class = "text-danger" })
                                </div>
                            </div>
                        </div>
                    </div>
                    <hr />
                    <br /><br /><br />
                    <div class="form-group">
                        <div class="col-md-offset-2 col-md-10">
                            <input type="submit" value="Create" class="btn btn-default" />
                        </div>
                    </div>

                }

                <div>
                    @Html.ActionLink("Back to List", "Index")
                </div>

            </div>
        </div>
    </div>
</div>



@section Scripts {
    @Scripts.Render("~/bundles/jqueryval")
}

Clicking on the ActionLink sends me a view to be able to complement it with client fields assigned closing date, probability, Investment, to insert this information into an opportunity table, the idea is to have an initiative that can be converted into opportunity. I hope you can help me.

Greetings!

    
asked by Bernardino Hernández Hernández 26.11.2018 в 19:21
source

0 answers