Skip to main content

Posts

Showing posts from 2020

Vb Net reference for JSon Extraction of String to Json .

 Public Shared Function SupplementaryUpload(ByVal ICMSIntegrationID As String, ByVal CMSActivityID As String, ByVal File As String, ByVal Flag As String, ByRef ErrorResponse As String) As Boolean         Try             'Dim client As New RestSharp.RestClient()             ' Dim BMJ_LinkUpload As String = ConfigurationManager.AppSettings("BMJ_API_Upload")             Dim BMJ_LinkUpload As String = "http://is-s2130:5000/BMJIntegration/SupplementaryUpload"             'client.BaseUrl = New Uri(BMJ_LinkUpload & "?ICMSIntegrationID=" & ICMSIntegrationID & "& CMSActivityID=" & CMSActivityID & "&File=" & File & "&Flag=" & Flag)             '''?ICMSIntegrationID=56445096&CMSActivityID=29&File=D:\admin.JPG&Flag=article_resource")         ...

Excel using OpenXml

using DevExpress.XtraEditors; using DevExpress.XtraEditors.Controls; using iTextSharp.text.pdf; using Microsoft.VisualBasic.CompilerServices; using System; using System.Collections.Generic; using System.ComponentModel; using System.Diagnostics; using System.Drawing; using System.IO; using System.Runtime.CompilerServices; using System.Windows.Forms; using iTextSharp.text.pdf.parser; //using ExportDataToExcel_DGSL; using System.Data; using ExportToExcel; using System.Data.Linq; using System.Linq; using ClosedXML.Excel; namespace PDFReport { [DesignerGenerated] public class frmPDFPageReport : XtraForm { private IContainer components; [AccessedThroughProperty("btnSelectPath")] private ButtonEdit _btnSelectPath; [AccessedThroughProperty("LabelControl1")] private LabelControl _LabelControl1; [AccessedThroughProperty("btnGenerateReport")] private SimpleButton _btnGenerateReport; [AccessedThroughProperty(...

Hosting multiple Environments

using   System ; using   System . Collections . Generic ; using   System . Linq ; using   System . Threading . Tasks ; using   Microsoft . AspNetCore . Builder ; using   Microsoft . AspNetCore . Hosting ; using   Microsoft . AspNetCore . HttpsPolicy ; using   Microsoft . AspNetCore . Mvc ; using   Microsoft . Extensions . Configuration ; using   Microsoft . Extensions . DependencyInjection ; using   Microsoft . Extensions . Hosting ; using   Microsoft . Extensions . Logging ; using   Microsoft . EntityFrameworkCore ; using   MovejobtoWms . Models ; using   Microsoft . AspNetCore . Authentication . Cookies ; using   Microsoft . AspNetCore . Authentication ; using   Newtonsoft . Json ; using   Microsoft . AspNetCore . Http ; using   System . Net . Http . Headers ; namespace   MovejobtoWms {      public   class   Star...

Upload Multipart Data File using Post method

/// Occurs when upload backup application bar button is clicked. Author : Farhan Ghumra /// </summary> private async void btnUploadBackup_Click ( object sender , EventArgs e ) { var dbFile = await ApplicationData . Current . LocalFolder . GetFileAsync ( Util . DBNAME ); var fileBytes = await GetBytesAsync ( dbFile ); var Params = new Dictionary < string , string > { { "userid" , "9" } }; UploadFilesToServer ( new Uri ( Util . UPLOAD_BACKUP ), Params , Path . GetFileName ( dbFile . Path ), "application/octet-stream" , fileBytes ); } /// <summary> /// Creates HTTP POST request & uploads database to server. Author : Farhan Ghumra /// </summary> private void UploadFilesToServer ( Uri uri , Dictionary < string , string > data , string fileName , string fileContentType , byte [] fileData ) { string boundary = "----------" + DateTime . Now ...