Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public ExcelFileResult ExportExcelDateWise(String from, string to)
- {
- DataTable dt = cm.getDataTable("select * from vw_mail_report where ARH_DATE between '" + from + "' and '" + to + "'");
- ExcelFileResult actionResult = new ExcelFileResult(dt) { FileDownloadName = "MailReport.xls" };
- return actionResult;
- }
- $scope.exportToExcel = function (fromdate, todate) {
- if (fromdate == "" && todate == "" || fromdate == null && todate == null) {
- window.location.href = "/Report/ExportExcel";
- }
- else {
- window.location.href = "/Report/ExportExcelDateWise";
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement