Merge branch 'master' of 10.0.0.83:/usr/local/git/VirtualTask
This commit is contained in:
commit
276175ce95
@ -25,21 +25,22 @@ namespace VirtualTask.Controllers
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
List<Anag> modelList = new List<Anag>();
|
//List<Anag> modelList = new List<Anag>();
|
||||||
Anag a=new Anag();
|
//Anag a=new Anag();
|
||||||
a.ancodice = "0001";
|
//a.ancodice = "0001";
|
||||||
a.andescri = "Francesco Totti";
|
//a.andescri = "Francesco Totti";
|
||||||
modelList.Add(a);
|
//modelList.Add(a);
|
||||||
|
|
||||||
Anag b = new Anag();
|
//Anag b = new Anag();
|
||||||
b.ancodice = "0002";
|
//b.ancodice = "0002";
|
||||||
b.andescri = "Alex Del Piero";
|
//b.andescri = "Alex Del Piero";
|
||||||
modelList.Add(b);
|
//modelList.Add(b);
|
||||||
|
|
||||||
|
|
||||||
SelectList customers = new SelectList(modelList,"ancodice","andescri");
|
//SelectList customers = new SelectList(modelList,"ancodice","andescri");
|
||||||
ViewBag.Token = token;
|
//ViewBag.Token = token;
|
||||||
return View(customers);
|
//return View(customers);
|
||||||
|
return View();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -14,6 +14,7 @@ namespace VirtualTask.Controllers
|
|||||||
string apiUrl = string.Empty;
|
string apiUrl = string.Empty;
|
||||||
string urlBase = string.Empty;
|
string urlBase = string.Empty;
|
||||||
string token = string.Empty;
|
string token = string.Empty;
|
||||||
|
string tenant = string.Empty;
|
||||||
|
|
||||||
HttpClient client;
|
HttpClient client;
|
||||||
public ImpiantiController()
|
public ImpiantiController()
|
||||||
@ -25,6 +26,7 @@ namespace VirtualTask.Controllers
|
|||||||
{
|
{
|
||||||
SessionHelper helper = new SessionHelper(this);
|
SessionHelper helper = new SessionHelper(this);
|
||||||
token = helper.GetStringValue("tok");
|
token = helper.GetStringValue("tok");
|
||||||
|
|
||||||
if (string.IsNullOrEmpty(token))
|
if (string.IsNullOrEmpty(token))
|
||||||
return RedirectToAction("Index", "Login");
|
return RedirectToAction("Index", "Login");
|
||||||
|
|
||||||
@ -77,9 +79,10 @@ namespace VirtualTask.Controllers
|
|||||||
{
|
{
|
||||||
SessionHelper helper = new SessionHelper(this);
|
SessionHelper helper = new SessionHelper(this);
|
||||||
token = helper.GetStringValue("tok");
|
token = helper.GetStringValue("tok");
|
||||||
|
tenant = helper.GetStringValue("tenant");
|
||||||
if (string.IsNullOrEmpty(token))
|
if (string.IsNullOrEmpty(token))
|
||||||
return RedirectToAction("Index", "Login");
|
return RedirectToAction("Index", "Login");
|
||||||
|
model.imcodazi = tenant;
|
||||||
apiUrl = helper.GetStringValue("apiUrl");
|
apiUrl = helper.GetStringValue("apiUrl");
|
||||||
urlBase = apiUrl + "impianti/add";
|
urlBase = apiUrl + "impianti/add";
|
||||||
urlBase = urlBase + "?token=" + token;
|
urlBase = urlBase + "?token=" + token;
|
||||||
|
|||||||
@ -49,6 +49,7 @@ namespace VirtualTask.Controllers
|
|||||||
//ViewBag.Token = loginOut.Tok;
|
//ViewBag.Token = loginOut.Tok;
|
||||||
helper.SetStringValue("tok", loginOut.Tok);
|
helper.SetStringValue("tok", loginOut.Tok);
|
||||||
helper.SetStringValue("apiUrl", apiUrl);
|
helper.SetStringValue("apiUrl", apiUrl);
|
||||||
|
helper.SetStringValue("tenant", model.Tenant);
|
||||||
return RedirectToAction("Index","Home");
|
return RedirectToAction("Index","Home");
|
||||||
}
|
}
|
||||||
return View();
|
return View();
|
||||||
|
|||||||
@ -18,30 +18,39 @@ namespace VirtualTask.Models
|
|||||||
public string? imdescri { get; set; }
|
public string? imdescri { get; set; }
|
||||||
|
|
||||||
/// <summary>Tipo indirizzo (Via, piazza..)</summary>
|
/// <summary>Tipo indirizzo (Via, piazza..)</summary>
|
||||||
|
[Display(Name = "Via,piazza,..")]
|
||||||
public string? imindiri1 { get; set; }
|
public string? imindiri1 { get; set; }
|
||||||
|
|
||||||
/// <summary> indirizzo </summary>
|
/// <summary> indirizzo </summary>
|
||||||
|
[Display(Name = "Indirizzo")]
|
||||||
public string? imindiri2 { get; set; }
|
public string? imindiri2 { get; set; }
|
||||||
|
|
||||||
/// <summary> numero civico </summary>
|
/// <summary> numero civico </summary>
|
||||||
|
[Display(Name = "Num civico")]
|
||||||
public int? imindiri3 { get; set; }
|
public int? imindiri3 { get; set; }
|
||||||
|
|
||||||
/// <summary> sottonumero </summary>
|
/// <summary> sottonumero </summary>
|
||||||
|
[Display(Name = "Interno")]
|
||||||
public string? imindiri4 { get; set; }
|
public string? imindiri4 { get; set; }
|
||||||
|
|
||||||
/// <summary>scala</summary>
|
/// <summary>scala</summary>
|
||||||
|
[Display(Name = "Scala")]
|
||||||
public string? imindiri5 { get; set; }
|
public string? imindiri5 { get; set; }
|
||||||
|
|
||||||
/// <summary> localita </summary>
|
/// <summary> localita </summary>
|
||||||
|
[Display(Name = "Località")]
|
||||||
public string? imlocali { get; set; }
|
public string? imlocali { get; set; }
|
||||||
|
|
||||||
/// <summary> Cap </summary>
|
/// <summary> Cap </summary>
|
||||||
|
[Display(Name = "Cap")]
|
||||||
public string? imcodcap { get; set; }
|
public string? imcodcap { get; set; }
|
||||||
|
|
||||||
/// <summary> Comune </summary>
|
/// <summary> Comune </summary>
|
||||||
|
[Display(Name = "Comune")]
|
||||||
public string? imcomune { get; set; }
|
public string? imcomune { get; set; }
|
||||||
|
|
||||||
/// <summary> Provincia </summary>
|
/// <summary> Provincia </summary>
|
||||||
|
[Display(Name = "Provincia")]
|
||||||
public string? improvin { get; set; }
|
public string? improvin { get; set; }
|
||||||
|
|
||||||
[Display(Name = "Cliente")]
|
[Display(Name = "Cliente")]
|
||||||
|
|||||||
@ -7,30 +7,5 @@
|
|||||||
<div class="text-center">
|
<div class="text-center">
|
||||||
<h1 class="display-4">Welcome</h1>
|
<h1 class="display-4">Welcome</h1>
|
||||||
</div>
|
</div>
|
||||||
<select id="ddlCustomers" name="CustomerId" asp-items="Model">
|
|
||||||
<option value="0">--Select Customer--</option>
|
|
||||||
</select>
|
|
||||||
<form method="post" asp-controller="Home" asp-action="Index">
|
|
||||||
|
|
||||||
<br />
|
|
||||||
<br />
|
|
||||||
<input type="submit" value="Submit" />
|
|
||||||
@if (ViewBag.Message != null)
|
|
||||||
{
|
|
||||||
<script type="text/javascript">
|
|
||||||
window.onload = function () {
|
|
||||||
alert("@ViewBag.Message");
|
|
||||||
};
|
|
||||||
</script>
|
|
||||||
}
|
|
||||||
|
|
||||||
</form>
|
|
||||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/select2@4.0.13/dist/css/select2.min.css" />
|
|
||||||
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
|
|
||||||
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/select2@4.0.13/dist/js/select2.min.js"></script>
|
|
||||||
<script type="text/javascript">
|
|
||||||
$(function () {
|
|
||||||
$("#ddlCustomers").select2();
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
|
|
||||||
|
|||||||
@ -17,11 +17,12 @@
|
|||||||
<input asp-for="imcodimp" class="form-control" />
|
<input asp-for="imcodimp" class="form-control" />
|
||||||
<span asp-validation-for="imcodimp" class="text-danger"></span>
|
<span asp-validation-for="imcodimp" class="text-danger"></span>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
@* <div class="form-group">
|
||||||
<label asp-for="imcodazi" class="control-label"></label>
|
<label asp-for="imcodazi" class="control-label"></label>
|
||||||
<input asp-for="imcodazi" class="form-control" />
|
<input asp-for="imcodazi" class="form-control" />
|
||||||
<span asp-validation-for="imcodazi" class="text-danger"></span>
|
<span asp-validation-for="imcodazi" class="text-danger"></span>
|
||||||
</div>
|
</div>*@
|
||||||
|
@Html.HiddenFor(m => m.imcodazi)
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label asp-for="imdescri" class="control-label"></label>
|
<label asp-for="imdescri" class="control-label"></label>
|
||||||
<input asp-for="imdescri" class="form-control" />
|
<input asp-for="imdescri" class="form-control" />
|
||||||
@ -74,19 +75,11 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label asp-for="imultcli" class="control-label"></label>
|
<label asp-for="imultcli" class="control-label"></label>
|
||||||
@Html.DropDownListFor(x =>x.imultcli,
|
@Html.DropDownListFor(x =>x.imultcli,(IEnumerable<SelectListItem>)ViewBag.AllStockList,new {@class = "form-control"})
|
||||||
(IEnumerable<SelectListItem>)ViewBag.AllStockList)
|
|
||||||
|
|
||||||
|
|
||||||
<span asp-validation-for="imultcli" class="text-danger"></span>
|
<span asp-validation-for="imultcli" class="text-danger"></span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group">
|
|
||||||
@Html.LabelFor(model => model.imultcli, htmlAttributes: new { @class = "control-label col-md-2" })
|
|
||||||
<div class="row-fluid col-md-10">
|
|
||||||
@Html.DropDownListFor(c => c.imultcli, (IEnumerable<SelectListItem>)ViewBag.AllStockList, null, new { @class = "selectpicker", data_live_search = "true" })
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<input type="submit" value="Create" class="btn btn-primary" />
|
<input type="submit" value="Create" class="btn btn-primary" />
|
||||||
|
|||||||
@ -56,6 +56,15 @@
|
|||||||
<script src="~/lib/jquery/dist/jquery.min.js"></script>
|
<script src="~/lib/jquery/dist/jquery.min.js"></script>
|
||||||
<script src="~/lib/bootstrap/dist/js/bootstrap.bundle.min.js"></script>
|
<script src="~/lib/bootstrap/dist/js/bootstrap.bundle.min.js"></script>
|
||||||
<script src="~/js/site.js" asp-append-version="true"></script>
|
<script src="~/js/site.js" asp-append-version="true"></script>
|
||||||
|
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/select2@4.0.13/dist/css/select2.min.css" />
|
||||||
|
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
|
||||||
|
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/select2@4.0.13/dist/js/select2.min.js"></script>
|
||||||
|
<script type="text/javascript">
|
||||||
|
$(function () {
|
||||||
|
$("#ddlCustomers").select2();
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
@await RenderSectionAsync("Scripts", required: false)
|
@await RenderSectionAsync("Scripts", required: false)
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user