예제 #1
0
 public ActionResult ReportPrintMultipleInvoice(string itemIds)
 {
     try
     {
         var identity         = (LoginIdentity)Thread.CurrentPrincipal.Identity;
         var itemIdIdList     = new JavaScriptSerializer().Deserialize <string[]>(itemIds);
         var maIds            = string.Join(",", itemIdIdList.Select(x => "'" + x + "'").ToArray());
         var data             = _rawSqlService.GetAllForMultiplePrint(maIds);
         ReportDataSource rpt = new ReportDataSource("MultipleSalesInvoice", data);
         RdlcReportViewerWithoutDate.reportDataSource = rpt;
         string rPath = "RdlcReport/RptMultipleSalesInvoiceForMobileshop.rdlc";
         Response.Redirect("~/ReportViewer/RdlcReportViewerWithoutDate.aspx?rPath=" + rPath + "&companyId=" + identity.CompanyId + "&branchId=" + identity.BranchId);
         return(View());
     }
     catch (Exception ex)
     {
         return(JavaScript($"ShowResult('{ex.Message}','failure')"));
     }
 }