Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var id = $("#personid").val();
- $("#ajaxView").load("/PersonelEgitim/Index/" + id);
- $("#ajaxView").load("/PersonelEgitim/Index/1234);
- $("#ajaxView").load("/PersonelEgitim/Index/1234 #ajaxView");
- $("#ajaxView").load("/PersonelEgitim/Index/1234 #ajaxView >*","");
- $.ajax({
- type: "GET",
- url: "/PersonelEgitim/Index/1234",
- datatype: "html",
- success: function (data) {
- $("#ajaxView").html(data);
- }
- });
- <script type="text/javascript" language="javascript">
- function ClearForm()
- {
- }
- </script>
- @using (Ajax.BeginForm(new AjaxOptions { HttpMethod = "POST", UpdateTargetId = "mesaj", OnBegin = "ClearForm" }))
- public ActionResult Index(string id)
- {
- var personelEgitim = db.PersonelEgitim.Where(x => x.PersonID == id);
- return View(personelEgitim);
- }
- @model DenemeMetroPro.Models.EntityFramework.PersonelGenel
- @{
- ViewBag.Title = "Details";
- Layout = "~/Views/Shared/_TableMain.cshtml";
- }
- <div>
- <dl class="dl-horizontal">
- <dt>
- @Html.DisplayNameFor(model => model.TCNo)
- </dt>
- <dd>
- @Html.DisplayFor(model => model.TCNo)
- </dd>
- <dt>
- @Html.DisplayNameFor(model => model.Adi)
- </dt>
- <dd>
- @Html.DisplayFor(model => model.Adi)
- </dd>
- <dt>
- @Html.DisplayNameFor(model => model.Soyadi)
- </dt>
- <dd>
- @Html.DisplayFor(model => model.Soyadi)
- </dd>
- <dt>
- @Html.DisplayNameFor(model => model.SicilNo)
- </dt>
- <dd>
- @Html.DisplayFor(model => model.SicilNo)
- </dd>
- <dt>
- @Html.DisplayNameFor(model => model.IseGirisTarihi)
- </dt>
- <dd>
- @Html.DisplayFor(model => model.IseGirisTarihi)
- </dd>
- <dt>
- @Html.DisplayNameFor(model => model.Cinsiyet)
- </dt>
- <dd>
- @(Model.Cinsiyet == true ? "Erkek" : "Kadın")
- </dd>
- <dt>
- @Html.DisplayNameFor(model => model.EskiHukumlu)
- </dt>
- <dd>
- @(Model.EskiHukumlu == true ? "Eski Hükümlü" : "Hükümlü Değil")
- </dd>
- <dt>
- @Html.DisplayNameFor(model => model.Engelli)
- </dt>
- <dd>
- @(Model.Engelli == true ? "Engelli" : "Engelli Değil")
- </dd>
- <dt>
- @Html.DisplayNameFor(model => model.Birimler.BirimAdi)
- </dt>
- <dd>
- @Html.DisplayFor(model => model.Birimler.BirimAdi)
- </dd>
- <dt>
- @Html.DisplayNameFor(model => model.KadroTipleri.KadroTipleri1)
- </dt>
- <dd>
- @Html.DisplayFor(model => model.KadroTipleri.KadroTipleri1)
- </dd>
- <dt>
- @Html.DisplayNameFor(model => model.Kisimlar.KisimAdi)
- </dt>
- <dd>
- @Html.DisplayFor(model => model.Kisimlar.KisimAdi)
- </dd>
- <dt>
- @Html.DisplayNameFor(model => model.Pozisyonlar.Pozisyon)
- </dt>
- <dd>
- @Html.DisplayFor(model => model.Pozisyonlar.Pozisyon)
- </dd>
- <dt>
- @Html.DisplayNameFor(model => model.Siniflar.SinifAdi)
- </dt>
- <dd>
- @Html.DisplayFor(model => model.Siniflar.SinifAdi)
- </dd>
- </dl>
- </div>
- <p>
- @Html.ActionLink("Edit", "Edit", new { id = Model.TCNo }) |
- @Html.ActionLink("Back to List", "Index")
- </p>
- <p>
- @if (Model.Cinsiyet == true)
- {
- @Ajax.ActionLink("Askerlik Durumu", "Index", "PersonelAskerlik", new { id = Model.TCNo }, new AjaxOptions { HttpMethod = "GET", UpdateTargetId = "ajaxView", OnSuccess = "clearSubForm" }, new { @class = "btn btn-default" })
- }
- @Ajax.ActionLink("Eğitim Durumu", "Index", "PersonelEgitim", new { id = Model.TCNo }, new AjaxOptions { HttpMethod = "GET", UpdateTargetId = "ajaxView", OnSuccess = "clearSubForm" }, new { @class = "btn btn-default" })
- </p>
- <div id="ajaxView"></div>
- <div id="mesaj"></div>
- <div id="ajaxEdit"></div>
- <script type="text/javascript" language="javascript">
- function clearSubForm()
- {
- $("#ajaxEdit").empty();
- }
- </script>
- @model IEnumerable<DenemeMetroPro.Models.EntityFramework.PersonelEgitim>
- <h3>Eğitim Durumu</h3>
- <p>
- @Ajax.ActionLink("Yeni", "Create", "PersonelEgitim", null, new AjaxOptions { UpdateTargetId = "ajaxEdit" }, new { @class = "btn btn-success" })
- </p>
- <table id="datatable" class="table table-bordered table-striped">
- <thead>
- <tr>
- <th>
- @Html.DisplayNameFor(model => model.MezuniyetDurumu.Mezuniyet)
- </th>
- <th>
- @Html.DisplayNameFor(model => model.Okul)
- </th>
- <th>
- @Html.DisplayNameFor(model => model.Bölüm)
- </th>
- <th>
- @Html.DisplayNameFor(model => model.MezuniyetTarihi)
- </th>
- <th>
- @Html.DisplayNameFor(model => model.TezKonusu)
- </th>
- <th></th>
- </tr>
- </thead>
- <tbody>
- @foreach (var item in Model)
- {
- <tr>
- <td>
- @Html.DisplayFor(modelItem => item.MezuniyetDurumu.Mezuniyet)
- </td>
- <td>
- @Html.DisplayFor(modelItem => item.Okul)
- </td>
- <td>
- @Html.DisplayFor(modelItem => item.Bölüm)
- </td>
- <td>
- @Html.DisplayFor(modelItem => item.MezuniyetTarihi)
- </td>
- <td>
- @Html.DisplayFor(modelItem => item.TezKonusu)
- </td>
- <td>
- @Ajax.ActionLink("Düzenle", "Edit", "PersonelEgitim", new { id = item.ID }, new AjaxOptions { HttpMethod = "GET", UpdateTargetId = "ajaxEdit" }) |
- @Ajax.ActionLink("Sil", "Delete", "PersonelEgitim", new { id = item.ID }, new AjaxOptions { HttpMethod = "GET", UpdateTargetId = "ajaxEdit" })
- </td>
- </tr>
- }
- </tbody>
- </table>
- @model DenemeMetroPro.Models.EntityFramework.PersonelEgitim
- @using (Ajax.BeginForm(new AjaxOptions { HttpMethod = "POST", UpdateTargetId = "mesaj", OnBegin = "ClearForm" }))
- {
- @Html.AntiForgeryToken()
- <div class="form-horizontal">
- <h4>Eğitim Bilgisi Ekle</h4>
- <hr />
- @Html.ValidationSummary(true, "", new { @class = "text-danger" })
- <div class="form-group">
- @Html.LabelFor(model => model.PersonID, "PersonID", htmlAttributes: new { @class = "control-label col-md-2" })
- <div class="col-md-10">
- @Html.DropDownList("PersonID", null, htmlAttributes: new { @class = "form-control", id="personid" })
- @Html.ValidationMessageFor(model => model.PersonID, "", new { @class = "text-danger" })
- </div>
- </div>
- <div class="form-group">
- @Html.LabelFor(model => model.MezuniyetId, "MezuniyetId", htmlAttributes: new { @class = "control-label col-md-2" })
- <div class="col-md-10">
- @Html.DropDownList("MezuniyetId", null, "Mezuniyet Seçiniz", htmlAttributes: new { @class = "form-control" })
- @Html.ValidationMessageFor(model => model.MezuniyetId, "", new { @class = "text-danger" })
- </div>
- </div>
- <div class="form-group">
- @Html.LabelFor(model => model.MezuniyetTarihi, htmlAttributes: new { @class = "control-label col-md-2" })
- <div class="col-md-10">
- @Html.EditorFor(model => model.MezuniyetTarihi, new { htmlAttributes = new { @class = "form-control" } })
- @Html.ValidationMessageFor(model => model.MezuniyetTarihi, "", new { @class = "text-danger" })
- </div>
- </div>
- <div class="form-group">
- @Html.LabelFor(model => model.Okul, htmlAttributes: new { @class = "control-label col-md-2" })
- <div class="col-md-10">
- @Html.EditorFor(model => model.Okul, new { htmlAttributes = new { @class = "form-control" } })
- @Html.ValidationMessageFor(model => model.Okul, "", new { @class = "text-danger" })
- </div>
- </div>
- <div class="form-group">
- @Html.LabelFor(model => model.Bölüm, htmlAttributes: new { @class = "control-label col-md-2" })
- <div class="col-md-10">
- @Html.EditorFor(model => model.Bölüm, new { htmlAttributes = new { @class = "form-control" } })
- @Html.ValidationMessageFor(model => model.Bölüm, "", new { @class = "text-danger" })
- </div>
- </div>
- <div class="form-group">
- @Html.LabelFor(model => model.TezKonusu, htmlAttributes: new { @class = "control-label col-md-2" })
- <div class="col-md-10">
- @Html.EditorFor(model => model.TezKonusu, new { htmlAttributes = new { @class = "form-control" } })
- @Html.ValidationMessageFor(model => model.TezKonusu, "", new { @class = "text-danger" })
- </div>
- </div>
- <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>
- }
- <script type="text/javascript" language="javascript">
- function ClearForm()
- {
- $("#ajaxView").load("/PersonelEgitim/Index/1234);
- $("#mesaj").delay(2000).fadeOut("slow");
- $("#ajaxEdit").empty();
- }
- </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement