2 buttons in view. the one is inquiry info. and another is to submit data
I have found the question that inquiry button use Jquery does not work(nothing happen when click it) when I click submit button to validate textbox firstly.
but it is works when first click inquiry button.
Please give me help. Thanks
Jquery code:
$('#mvcContainer-@Dnn.ActiveModule.ModuleID .btn-rmasearch').click(function () {
dnnModal.show('@Url.Action("Search", "Rma")?popUp=true&CustId=' + cid + "&SerialNumber=" + sn + "&KeyN=" + id, false, 350, 750, false);
});
action code:
//inquiry
public ActionResult Search(SearchCriteria criteria)
{
if (criteria.CustId == 0 || string.IsNullOrWhiteSpace(criteria.SerialNumber))
return Content("Nothing have been request.");
var invoices = InvoiceService.GetInvoices(criteria);
invoices.KeyN = Request.QueryString["KeyN"];
if (invoices.Count == 0)
return Content("Nothing have been found");
return View("RequestSearch", invoices);
}
//submit
[HttpPost]
[ActionName("Request")]
[DotNetNuke.Web.Mvc.Framework.ActionFilters.ValidateAntiForgeryToken]
public ActionResult RmaRequest(RmaSetting RmaRequest)
{ if (ModelState.IsValid)
{
string newRefID = RmaService.PostRMA(RmaRequest, Request.QueryString["code"]);
if (!string.IsNullOrEmpty(newRefID))
{
RmaRequest.RefID = newRefID;
return View("RequestProcessItems", RmaRequest);
}
}
else
{
ViewData["dropDownListRequest"] = ShowDDL1();
ViewData["dropDownListProblem"] = ShowDDL2();
ViewData["dropDownListStates"] = ShowDDL3(Country);
return View("Request",RmaRequest);
}
}