Phonegap and C# web service - c#

a while back i made a C# Windows Forms which generates PDF report by using itextsharp.
Also, I made phonegap app that communicate with SQL Server that can DELETE, UPDATE and SELECT from database and it's working fine.
Now here is my question
How can I send data from Phonegap application to C# windows form, which run on the server side, to generate A PDF report?
This is what I found out so far and i'm not sure if i am going in the right direction
1.Re-write the code of C# Windows form to asp.net form
2.make a C# webservice which can receive data from phonegap and use asp.net to generate a PDF Report.
3.webservice should be at server side running 24/7
All I want is that "something" should be at the server side waiting for data, once it receives data it should make a pdf report out of it.
Thank you and I hope that was not confusing.
I just need to be pointed at the right direction.

Finally I found the answer i was looking for.
These are the main points I mentioned on my question:
I made C# Desktop app for generating PDF report using iTextsharp
I want a Phonegap app to generate PDF report by sending data to C# desktop application.
The answer simply is to make C# web service and consume this web service from phonegap. it took me some time but it's working perfectly.

Related

Need to create a webservice to send messages between two versions of the same application

My assignment is to recreate whatsapp by creating both a desktop application and a mobile application and they must be able to send messages(text audio video etc) to one another.
I have created a wpf application in C# using visual studio and my team is currently building the mobile application. We have a firebase database setup that will hold all of our messages i know wish to create a webservice that will allow the applications to fetch the information from the database and then hand it back to the application to display on the front end.
I have researched various web services that are used with sms's but i am not sure if these will do the trick for what i am hoping to achieve. If anybody could point me in the right direction or provide any advice it would be much appreciated.

RDLC Print Directly to Printer C# MVC

I have read many post about this here on stackoverflow(most links to Microsoft are not displaying the page for help to explain this as of Jan 9 2018 ) and even did a bypassprintpreview.cs file and everything seems to work except for a few issues.
My question is what is the best practice to skip the ReportViewer and send to the default printer in a C# MVC Project.
Is this printing it to a PDF then send to the printer, Drawing it out then printing or are there NuGet packages that anyone can recommend.
I found a solution for this question in this link How to print directly without showing report viewer in rdlc report, i used this class and it work for me in Windows Forms Application and Web Application but my web application was Hosted on IIS so this did not work for me because the app was not able to access the client installed printer, so the best solution for me was in this video, I created i console application 'PrintDirect' and Registered protocol on system to access this console application and send the parameter by anchor link like this
click to print order 1906187<br />
I hope the solution is clear

Downloading SSRS report from report server using C# code

I have been working on a requirement to deploy and download SSRS reports programmatically from C# code.
I used the service exposed by SSRS (ReportingServices2010). I am able to deploy my reports from application server to report server successfully. I referred to "https://www.codeproject.com/Articles/43133/Deploying-Reports-in-Reporting-Services-Programmat" for this.
Meaning, the deployment portion is done and I am able to deploy the report using C# code. But now, I want a functionality to download reports from report server and place it to Application server somewhere. I want to achieve this in similar way, like I did for deploying (using C# code).
But I am unable to find any method exposed by service which can return content of the report deployed on report server.
As a work around I found a way to directly query on Report Server Database or Power shell script as well. But I would prefer a solution using C# code only.
Please suggest if we can download SSRS report from report server programmatically using C# code.
Thanks,
Ketan
You can look at the code for command Out-RsCatalogItem in ReportingServicesTools GitHub project to determine how to download using the SOAP Proxy. In order to create a Web Service Proxy in .NET, look at this page. If you are still not sure how to proceed, then leave a comment and I will try to hack up a quick sample.

Best method to upload and retrieve files from/to server from/to Android (client side) - Xamarin

I have a web service (WCF) that gets data from the SQL Server. Is using web service more efficient than directly interacting from Android application to the server (where the folder of the files will be uploaded and retrieved). There are parts of my app which needs to get data from SQL Server database but this one doesn't need it, just for accessing that particular folder in the server.
Is there a tutorial in Xamarin which would guide me how to do it? The file types include PNG, JPEG, EXCEL, PPT, and PDF. I found this but is in iOS platform, Download a File. This one using web service, image uploading from android application to server using c# web service and this using async, download and view a PDF file.
Am I correct that before uploading it to server, it'll need to be converted to byte array? And for viewing the files from the server to Android app, is there a way to automatically display (if there is an image) it to the app and if it's EXCEL, PPT, and PDF, will show up as a link on the app and when click will ask the user to find an app to view the following file type.
I am absolutely new to this so I'd greatly appreciate any suggestion.

Windows phone application

Just started to look on how to develop on windows phone and i found about PhoneGap and Visual WebGui and i thought about the next ideea: if i start a new silverlight for windows phone application in visual studio and i create a web browser, like i saw in PhoneGap, and to use javascript and html5 for the application. The problem is that i want to use Sockets from C# (since javascript only has websockets... ), i know i can use java script code in C# to manipulat a html5 page but is it possible if the user clicks a button to use the Socket from C# to send a message to the server(like using javascript to call a method written in C#)?
Thanks
Yes, you can create your own FFI between JS & C# to create a bridge in both directions. The PhoneGap code should provide a good example of how to call in both directions.

Categories

Resources