Wednesday 11 September 2013

Billing Invoice Service API - Which one do you recommend?

Billing Invoice Service API - Which one do you recommend?

I am new to the this and not sure why it's not reaching my controller. I
enter an ID and nothing happens, my breakpoint in the controller isn't
hit. Did I miss something?
CONTROLLER
[HttpPost]
public ActionResult Schedule(int id = 0)
{
if (Request.IsAjaxRequest())
{
Customer customer = _customerRepository.Find(id);
return PartialView("Schedule", customer);
}
return View();
}
VIEW ~/Views/Appointment/Schedule.cshtml
@model Customer
@{
ViewBag.Title = "Schedule";
}
<h2>Schedule</h2>
@using (Ajax.BeginForm("Schedule", "Appointment",
new AjaxOptions()
{
HttpMethod = "POST",
InsertionMode = InsertionMode.Replace,
UpdateTargetId = "Customer"
}))
{
<label>ID Search</label>
<input type="search" name="customerSearch" placeholder="ID" />
<input type="submit" value="Continue" />
}
<div id="Customer">
@Html.Partial("~/Views/Customer/_Customers.cshtml", Model)
</div>

No comments:

Post a Comment