Advertisement
Guest User

Untitled

a guest
Oct 31st, 2014
134
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.66 KB | None | 0 0
  1. public ExcelFileResult ExportExcelDateWise(String from, string to)
  2. {
  3. DataTable dt = cm.getDataTable("select * from vw_mail_report where ARH_DATE between '" + from + "' and '" + to + "'");
  4. ExcelFileResult actionResult = new ExcelFileResult(dt) { FileDownloadName = "MailReport.xls" };
  5. return actionResult;
  6. }
  7.  
  8. $scope.exportToExcel = function (fromdate, todate) {
  9. if (fromdate == "" && todate == "" || fromdate == null && todate == null) {
  10. window.location.href = "/Report/ExportExcel";
  11. }
  12. else {
  13. window.location.href = "/Report/ExportExcelDateWise";
  14. }
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement