Skip to main content

Posts

Recent posts

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 ...