Click here to Skip to main content
15,891,906 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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
Posted
Comments
Christian Graus 11-Nov-13 0:45am    
This is a code dump. no wonder no-one answered it, I don't even know what you're asking for.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900