public void ExportToExcel(SIMREG_NEWFORMSearchViewModel model) { //BOUser boUser = new BOUser(); BOSIMREG_NEWFORM boSim = new BOSIMREG_NEWFORM(); ExcelManager ex = new ExcelManager("SimRegisterReport.csv", false); System.Data.DataSet ds = new System.Data.DataSet(); //boSim.GetSIMREG_NEWFORMs(ds); boSim.GetSIMREG_NEWFORMs(model.MSISDNTITLE, model.REQUESTEDBYID, model.REQUESTEDBYID, model.DELIVEREDBYID, model.REQUESTEDDATE.ToString(), model.DELIVEREDBYDATE.ToString(), ds); ex.ExportData(ds.Tables[0], Response); }