Help Me for this coding, cann't run for store procedure
Model
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Collections;
namespace DevExpressMvcApplication1.Models {
// DXCOMMENT: Configure a data model (In this sample, we do this in file NorthwindDataProvider.cs. You would better create your custom file for a data model.)
public static class NorthwindDataProvider {
const string NorthwindDataContextKey = "DXNorthwindDataContext";
public static NorthwindDataContext DB {
get {
if (HttpContext.Current.Items[NorthwindDataContextKey] == null)
HttpContext.Current.Items[NorthwindDataContextKey] = new NorthwindDataContext();
return (NorthwindDataContext)HttpContext.Current.Items[NorthwindDataContextKey];
}
}
public static IEnumerable SpGetCustomers(string strUnitID, String strMonth, string strCustomerID) {
return from customerResult in DB.rptCustomers(strUnitID, strMonth, strCustomerID) select customerResult;
}
}
}
Controller
using System;
using System.Web.Mvc;
using DevExpress.Web.Mvc;
using System.Web.UI.WebControls;
using DevExpress.XtraPivotGrid;
using DevExpress.Utils;
using System.Collections.Generic;
using DevExpress.XtraPivotGrid.Customization;
using DevExpress.XtraPivotGrid.Data;
using System.IO;
using System.Diagnostics;
using DevExpressMvcApplication1.Models;
namespace DevExpressMvcApplication1.Controllers
{
public class rptFinancialController : Controller
{
//
// GET: /rptFinancial/
public string strUnitID { get; set; }
public string strMonth { get; set; }
public string strCustomerID { get; set; }
public ActionResult Index(string strUnitID, string strMonth, string strCustomerID)
{
//return View();
return View("Index", NorthwindDataProvider.SpGetCustomers(strUnitID, strMonth, strCustomerID));
}
public ActionResult PartialViewer()
{
return PartialView(NorthwindDataProvider.SpGetCustomers(strUnitID, strMonth, strCustomerID));
}
}
Thanks
KS