Download as pdf or txt
Download as pdf or txt
You are on page 1of 3

ASP.NET CORE (MVC) 3.

Create Model.
Create Controller, Atomically creates the View.
Package Manager Console :
add-migration “initialsetup”
update-database
_Layout.cshtml
<li class="nav-item">
<a class="nav-link text-dark" asp-area="" asp-
controller="jokes" asp-action="ShowSearchForm">search</a>
</li>

Create ShowSearchForm() Method in JokesController


Add View for that Method – edit in that
Create a method that you specified in the input field with the same name in
Controller ShowSearchResult(with parameters)
Write logic in the controller
@using (Html.BeginForm("FactoryUserResonse1", "FactoryUserResponse", new { enctype =
"multipart/form-data" }, FormMethod.Post))
{
@Html.AntiForgeryToken()

@Html.ValidationSummary(true, "", new { @class = "text-danger" })


<div class="textbox-wrap">
<div class="input-group">
<span class="input-group-addon"><i class="glyphicon glyphicon-
user"></i></span>
<div style="background-color:#ffd9b3">
@Html.TextAreaFor(m => m.Comments, new { @class = "form-control"
})
</div>

</div>

<div>
@Html.TextBoxFor(m => m.File, new { type = "file" })
@Html.ValidationMessageFor(m => m.File)

</div>
@Html.ValidationMessageFor(m => m.Comments, "", new { @class = "text-
danger" })

<button type="submit" style="background-color: #012169" data-


linkcategory="FactoryUserResonse1" data-linkname="FactoryUserResonse1" data-
link="FactoryUserResonse1" class="btn btn-success pull-right green-btn
btnSubmit">Submit <i class="icon-chevron-right"></i></button>

</div>

----------------------------------------------------------------------------------------------

<div class="p-1 mt-3 mb-2 " style="background-color: #1c427a; border-radius: 5px">


<div class="mt-2 mb-2">
</div>

<div style="background-color: white; padding: 40px">

<div class="form-group">
<label for="comment"><b>Add Comments/Response</b></label>
<textarea name="Comments" class="form-control" rows="4" id="comment"
placeholder="Write Comments here.............." style="background-color:
#eff5f5"></textarea>
</div>

<div class="mt-3">
<b>Upload Documents</b>
<form>
<div class="file btn btn-sm ">
<input type="file" id="myFile" name="filename">
</div>
</form>
</div>
<div style="text-align:end">
<button class="btn btn-primary ">Save</button>
</div>

</div>

</div>

<div class="form-group">
<label ><b>Add Comments/Response</b></label>
@Html.TextAreaFor(m => m.Comments, new{@class = "form-control" })
@*<textarea name="Comments" class="form-control" rows="4" id="comment"
placeholder="Write Comments here.............." style="background-color:
#eff5f5"></textarea>*@
</div>

<div class="mt-3">
<b>Upload Documents</b>
<form>
<div class="file btn btn-sm ">
@Html.TextBoxFor(m => m.File, new { type = "file" })
@Html.ValidationMessageFor(m => m.File)

</div>

</form>
</div>
<div style="text-align:end">
@*<button class="btn btn-primary ">Save</button>*@
<button class="btn btn-primary " type="submit" data-
linkcategory="FactoryUserResonse1" data-linkname="FactoryUserResonse1" data-
link="FactoryUserResonse1">Submit</button>
</div>

</div>
}

Select Category, Status, InspectionDate from Inspection_Details as ID

Inner join FactoriesList as FL on ID.FactoryName = FL.NAME_OF_THE_FACTORIE

Where FL.LIC_NO = MYB02235

You might also like