Saking bodoh nya,
ngambil nilai textbox pun bingung,,,
https://dotnethelpers.wordpress.com/tag/mvc-razor-different-way-of-getting-html-textbox-value-from-controller/
Monday, 22 December 2014
Friday, 19 December 2014
How to use SQL Server Stored Procedure in ASP.NET
Meskipun sebenar nya lebih mudah menggunakan edmx, tapi daripada bermasalah dikemudian hari, mungkin lebih baik memanggil SQL Server storeprocedure di ASP.NET tidak menggunakan edmx..
Berikut link nya ya
http://mahedee.net/retrieve-store-procedures-output-parameter-by-c-asp-net/
Berikut link nya ya
http://mahedee.net/retrieve-store-procedures-output-parameter-by-c-asp-net/
SQL Server 2008
http://blog.sqlauthority.com/2009/05/21/sql-server-fix-error-provider-named-pipes-provider-error-40-could-not-open-a-connection-to-sql-server-microsoft-sql-server-error/
==> atasi error
http://blog.sqlauthority.com/2008/06/12/sql-server-2008-step-by-step-installation-guide-with-images/
==> instalasi
==> atasi error
http://blog.sqlauthority.com/2008/06/12/sql-server-2008-step-by-step-installation-guide-with-images/
==> instalasi
Monday, 15 December 2014
How to make CHART in ASP.NET MVC 5
==> VIEW
@model IEnumerable<WebAppSatisfactionOfCustomers.Models.T_Transaksi>
@{
ViewBag.Title = "Chart";
Layout = "~/Views/Shared/_Layout.cshtml";
}
<h2>GRAFIK PENILAIAN</h2>
<ul>
@foreach (var group in Model.GroupBy(item => item.id_poli))
{
<li>
@foreach (var it in ViewBag.divisidata)
{
if (int.Parse(group.Key) == it.id_poli)
{
<h1>@Html.Encode(@it.nama_poli)</h1>
}
}
@{
var filePathNamegroup = "~/Images/" + group.Key + ".jpg";
var chartImageGroup = new Chart(600, 400);
chartImageGroup.AddTitle("GRAFIK KEPUASAN");
chartImageGroup.AddLegend("Koresponden", "5 ");
chartImageGroup.AddSeries(
name: "" + group.Count(),
axisLabel: "Name",
xValue: new[] { "Puas", "Tidak Puas" },
yValues: new[] { group.Where(kondisi => kondisi.id_kategori.Contains("1")).Count().ToString(), group.Where(kondisi => kondisi.id_kategori.Contains("2")).Count().ToString() });
chartImageGroup.Save(path: filePathNamegroup);
}
<img src="@Url.Content(filePathNamegroup)" alt="Image" />
<ul>
@foreach (var item in group.GroupBy(itempuas => itempuas.id_kategori))
{
if (item.Key == "1")
{
<h4>Grafik Kategori Puas</h4>
var filePathName = "~/Images/" + group.Key + item.Key + ".jpg";
var filename = group.Key + item.Key;
var chartImage = new Chart(600, 400);
chartImage.AddTitle("GRAFIK KATEGORI PUAS (" + item.Count() + " dari " + group.Count() + ")");
chartImage.AddSeries(
name: "Employee",
axisLabel: "Name",
xValue: new[] { "Waktu Pelayanan", "Cara Pelayanan", "Keramahan", "Komunikasi", "Waktu Tunggu" },
yValues: new[] { @item.Where(kondisi => kondisi.id_pertanyaan.Contains("1")).Count().ToString(), @item.Where(kondisi => kondisi.id_pertanyaan.Contains("2")).Count().ToString(), @item.Where(kondisi => kondisi.id_pertanyaan.Contains("3")).Count().ToString(), @item.Where(kondisi => kondisi.id_pertanyaan.Contains("4")).Count().ToString(), @item.Where(kondisi => kondisi.id_pertanyaan.Contains("5")).Count().ToString() });
chartImage.Save(path: filePathName);
<img src="@Url.Content(filePathName)" alt="Image" />
}
else
{
var filePathName = "~/Images/" + group.Key + item.Key + ".jpg";
var chartImage = new Chart(600, 400);
chartImage.AddTitle("GRAFIK KATEGORI TIDAK PUAS (" + item.Count() + " dari " + group.Count() + ")");
chartImage.AddSeries(
name: "Employee",
axisLabel: "Name",
xValue: new[] { "Waktu Pelayanan", "Cara Pelayanan", "Keramahan", "Komunikasi", "Waktu Tunggu" },
yValues: new[] { @item.Where(kondisi => kondisi.id_pertanyaan.Contains("1")).Count().ToString(), @item.Where(kondisi => kondisi.id_pertanyaan.Contains("2")).Count().ToString(), @item.Where(kondisi => kondisi.id_pertanyaan.Contains("3")).Count().ToString(), @item.Where(kondisi => kondisi.id_pertanyaan.Contains("4")).Count().ToString(), @item.Where(kondisi => kondisi.id_pertanyaan.Contains("5")).Count().ToString() });
chartImage.Save(path: filePathName);
<h4>Grafik Kategori Tidak Puas</h4>
<img src="@Url.Content(filePathName)" alt="Image" />
}
}
</ul>
</li>
}
</ul>
===> CONTROLER
@model IEnumerable<WebAppSatisfactionOfCustomers.Models.T_Transaksi>
@{
ViewBag.Title = "Chart";
Layout = "~/Views/Shared/_Layout.cshtml";
}
<h2>GRAFIK PENILAIAN</h2>
<ul>
@foreach (var group in Model.GroupBy(item => item.id_poli))
{
<li>
@foreach (var it in ViewBag.divisidata)
{
if (int.Parse(group.Key) == it.id_poli)
{
<h1>@Html.Encode(@it.nama_poli)</h1>
}
}
@{
var filePathNamegroup = "~/Images/" + group.Key + ".jpg";
var chartImageGroup = new Chart(600, 400);
chartImageGroup.AddTitle("GRAFIK KEPUASAN");
chartImageGroup.AddLegend("Koresponden", "5 ");
chartImageGroup.AddSeries(
name: "" + group.Count(),
axisLabel: "Name",
xValue: new[] { "Puas", "Tidak Puas" },
yValues: new[] { group.Where(kondisi => kondisi.id_kategori.Contains("1")).Count().ToString(), group.Where(kondisi => kondisi.id_kategori.Contains("2")).Count().ToString() });
chartImageGroup.Save(path: filePathNamegroup);
}
<img src="@Url.Content(filePathNamegroup)" alt="Image" />
<ul>
@foreach (var item in group.GroupBy(itempuas => itempuas.id_kategori))
{
if (item.Key == "1")
{
<h4>Grafik Kategori Puas</h4>
var filePathName = "~/Images/" + group.Key + item.Key + ".jpg";
var filename = group.Key + item.Key;
var chartImage = new Chart(600, 400);
chartImage.AddTitle("GRAFIK KATEGORI PUAS (" + item.Count() + " dari " + group.Count() + ")");
chartImage.AddSeries(
name: "Employee",
axisLabel: "Name",
xValue: new[] { "Waktu Pelayanan", "Cara Pelayanan", "Keramahan", "Komunikasi", "Waktu Tunggu" },
yValues: new[] { @item.Where(kondisi => kondisi.id_pertanyaan.Contains("1")).Count().ToString(), @item.Where(kondisi => kondisi.id_pertanyaan.Contains("2")).Count().ToString(), @item.Where(kondisi => kondisi.id_pertanyaan.Contains("3")).Count().ToString(), @item.Where(kondisi => kondisi.id_pertanyaan.Contains("4")).Count().ToString(), @item.Where(kondisi => kondisi.id_pertanyaan.Contains("5")).Count().ToString() });
chartImage.Save(path: filePathName);
<img src="@Url.Content(filePathName)" alt="Image" />
}
else
{
var filePathName = "~/Images/" + group.Key + item.Key + ".jpg";
var chartImage = new Chart(600, 400);
chartImage.AddTitle("GRAFIK KATEGORI TIDAK PUAS (" + item.Count() + " dari " + group.Count() + ")");
chartImage.AddSeries(
name: "Employee",
axisLabel: "Name",
xValue: new[] { "Waktu Pelayanan", "Cara Pelayanan", "Keramahan", "Komunikasi", "Waktu Tunggu" },
yValues: new[] { @item.Where(kondisi => kondisi.id_pertanyaan.Contains("1")).Count().ToString(), @item.Where(kondisi => kondisi.id_pertanyaan.Contains("2")).Count().ToString(), @item.Where(kondisi => kondisi.id_pertanyaan.Contains("3")).Count().ToString(), @item.Where(kondisi => kondisi.id_pertanyaan.Contains("4")).Count().ToString(), @item.Where(kondisi => kondisi.id_pertanyaan.Contains("5")).Count().ToString() });
chartImage.Save(path: filePathName);
<h4>Grafik Kategori Tidak Puas</h4>
<img src="@Url.Content(filePathName)" alt="Image" />
}
}
</ul>
</li>
}
</ul>
===> CONTROLER
public ActionResult Chart()
{
ViewBag.divisidata = db.divisi;
return View(db.transaksi.ToList());
}
{
ViewBag.divisidata = db.divisi;
return View(db.transaksi.ToList());
}
Sorting, Filtering, and Pagination using ASP.NET MVC 5
Berikut link untuk membuat sorting, filtering dan pagination di ASP.NET MVC 5
http://www.asp.net/mvc/overview/getting-started/getting-started-with-ef-using-mvc/sorting-filtering-and-paging-with-the-entity-framework-in-an-asp-net-mvc-application
http://www.asp.net/mvc/overview/getting-started/getting-started-with-ef-using-mvc/sorting-filtering-and-paging-with-the-entity-framework-in-an-asp-net-mvc-application
Friday, 12 December 2014
Thursday, 11 December 2014
Onload Redirect Refresh in asp.net
<body onload="timer = setTimeout(function () { window.location = 'http://localhost:6745/M_Divisi/HalamanPilihDivisi'; }, 3000)">
</body>
one line code, butt.....
</body>
one line code, butt.....
Tuesday, 9 December 2014
CheckBox Value
Thank you for who has this blog http://orientprogrammer.wordpress.com/2013/05/07/how-to-get-checkbox-selected-values-in-controller-in-mvc3/.
You help me the stupid people -_-
You help me the stupid people -_-
Tuesday, 2 December 2014
Subscribe to:
Posts (Atom)