Hi i have 4 fields in my view FromDate,ToDate,CustomerName, Count. I want to pass the value of FromDate,ToDate,CustomerName to single Action and have to get the value in Count Textbox. Help me to solve this problem.
My second question
public JsonResult GetSalesOrderCountByCustomer(Guid customerID, DateTime fromdate,DateTime Todate)
{
var salescount = (from sc in db.SalesOrders where sc.CustomerID == customerID select sc.SalesOrderID).Count();
The above code get the total SalesOrder count of customer now what i need is i want to get the sales order count of customer(which i select in Dropdown) between FromDate(Which i select in view) and ToDate(which i select in view). how i alter this query for my requirement.
My View
@Html.Label("FromDate", new { @class = "control-label" })
@Html.TextBoxFor(model => model.FromDate, new { @class = "form-control", type = "text"})
@Html.LabelFor(model => model.ToDate)
@Html.TextBoxFor(model => model.ToDate, new { @class = "form-control", type = "text" })
Sneha KRank #2,496 · 563 reputationPosted Mar 5, 2016, 12:21 AM EST
0
Hai Saineshwar Bageri i did the same thing as per you said by keeping one button and get the count details see this below link and tell me the solution for this problem..
Saineshwar BageriRank #115 · 19.6K reputationPosted Mar 5, 2016, 12:06 AM EST
{
var salescount = 10;
return Json(salescount, JsonRequestBehavior.AllowGet);
}