Hi.. I just want to change the language, but not the date or currency format of the entire app, how can achieve this?, thanks
Hi, was our error, declaring the controller in html and in the open method of modal, are fine now removing the controller in the html page, thank you
Hi, trying to opening a modal with a function on resolve:
vm.searchDocument = function () {
var modalDoc = $uibModal.open({
templateUrl: '~/App/tenant/views/search/index.cshtml',
controller: 'tenant.views.search.index as vm',
backdrop: 'static',
resolve: {
docType: function () {
return "01";
}
}
});
modalDoc.result.then(function () {
//return something
});
};
appModule.controller('tenant.views.search.index', [
'$rootScope', '$scope', 'abp.services.app.sales', 'uiGridConstants', 'docType',
function ($rootScope, $scope, salesService, uiGridConstants, docType) {
var vm = this;
console.log(docType);
In the console I can see : 01 but after that this error appear:
https://docs.angularjs.org/error/$injector/unpr?p0=docTypeProvider%20%3C-%20docType%20%3C-%20tenant.views.search.index
what are wrong?
thanks for you help
Yes, so many thank's
Hi, thank you, after I read that article, how can handle the user location?, where can set that?, or how aspnetzero handle that?
Hi!, how can set the currency and date formats in ui-grid?
I found the cellFilter: {currency} but are getting this default? format: 1.000,00 € how can change to: 1,000.00 $?,
thanks!
Hi, we are working with mvc 5.x + angular 1, now are using the controllers on the webapi, and mvc controllers, that it's ok?, we maybe can have any security trouble?, please advice.
thank you
Hi!, can someone help me to do this?: I want to download a pdf and xml files on the fly, we have the files stored in db as base64 encoded strings, we try with blob feature but not work in mobile, you have any recommendation?, we create a controller on the webapi project for response the files as bytes[]
here is the example code:
[HttpGet]
public async Task<HttpResponseMessage> GetPdfInvoice(int saleId)
{
var fileName = string.Concat($@"invoice.pdf");
var filePath = HttpContext.Current.Server.MapPath("~/Reporting/" + fileName);
var nameFile = await GenerateNewPdf(saleId, filePath);
var result = Request.CreateResponse(HttpStatusCode.OK);
result.Content = new StreamContent(new FileStream(filePath, FileMode.Open));
result.Content.Headers.ContentDisposition =
new ContentDispositionHeaderValue("attachment") {FileName = nameFile };
return result;
}
private Task<string> GenerateNewPdf(int saleId, string filePath)
{
return Task.Run(() =>
{
using (var stream = Assembly.GetExecutingAssembly().GetManifestResourceStream(Report))
{
var factura = _salesAppService.GetSale(saleId);
var fac = _clientAppService.GetClientbyId(factura.ClientId);
var lista = new List<SalesDto> {factura};
var client = new List<ClientDto> { fac };
var viewer = new ReportViewer();
viewer.LocalReport.EnableExternalImages = true;
viewer.LocalReport.LoadReportDefinition(stream);
Warning[] warnings;
string[] streamids;
string mimeType;
string encoding;
string filenameExtension;
viewer.LocalReport.DataSources.Add(new ReportDataSource("Factura", lista));
viewer.LocalReport.DataSources.Add(new ReportDataSource("Items", lista[0].SoldItems));
viewer.LocalReport.DataSources.Add(new ReportDataSource("Client",client));
viewer.LocalReport.Refresh();
var bytes = viewer.LocalReport.Render(
"PDF", null, out mimeType, out encoding, out filenameExtension,
out streamids, out warnings);
using (var fs = new FileStream(filePath, FileMode.Create))
{
fs.Write(bytes, 0, bytes.Length);
}
return factura.NameFile;
}
});
}
someone can help me please to avoid create the pdf starting with a filepath?,(want to create in the fly), and make this working on mobile?, so many thanks
We don't remember to do some install, maybe can be a library?, how can check?
Hi, the version is: 1.3.3