/// <summary> /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// </summary> private void InitializeComponent() { this.Detail = new DevExpress.XtraReports.UI.DetailBand(); this.PageHeader = new DevExpress.XtraReports.UI.PageHeaderBand(); this.PageFooter = new DevExpress.XtraReports.UI.PageFooterBand(); this.xrLabel1 = new DevExpress.XtraReports.UI.XRLabel(); this.xrPictureBox1 = new DevExpress.XtraReports.UI.XRPictureBox(); this.DetailReport = new DevExpress.XtraReports.UI.DetailReportBand(); this.Detail1 = new DevExpress.XtraReports.UI.DetailBand(); ((System.ComponentModel.ISupportInitialize)(this)).BeginInit(); // // Detail // this.Detail.Controls.AddRange(new DevExpress.XtraReports.UI.XRControl[] { this.xrPictureBox1, this.xrLabel1}); this.Detail.Name = "Detail"; // // PageHeader // this.PageHeader.Height = 30; this.PageHeader.Name = "PageHeader"; // // PageFooter // this.PageFooter.Height = 30; this.PageFooter.Name = "PageFooter"; // // xrLabel1 // this.xrLabel1.Location = new System.Drawing.Point(92, 8); this.xrLabel1.Name = "xrLabel1"; this.xrLabel1.Size = new System.Drawing.Size(100, 25); this.xrLabel1.Text = "xrLabel1"; // // xrPictureBox1 // this.xrPictureBox1.Location = new System.Drawing.Point(92, 42); this.xrPictureBox1.Name = "xrPictureBox1"; this.xrPictureBox1.Size = new System.Drawing.Size(100, 25); // // DetailReport // this.DetailReport.Bands.AddRange(new DevExpress.XtraReports.UI.Band[] { this.Detail1}); this.DetailReport.Name = "DetailReport"; // // Detail1 // this.Detail1.Name = "Detail1"; // // XtraReport1 // this.Bands.AddRange(new DevExpress.XtraReports.UI.Band[] { this.Detail, this.PageHeader, this.PageFooter, this.DetailReport}); ((System.ComponentModel.ISupportInitialize)(this)).EndInit(); }
private MemoryStream PrintHaulierSub(string orderNo, string jobType, string haulierCode) { XtraReport rpt = new XtraReport(); rpt.LoadLayout(Server.MapPath(@"~\PagesContTrucking\Report\repx\HaulierTruckingAdviceSub.repx")); rpt.DataSource = DocPrint.PrintHaulierSub(orderNo, jobType, haulierCode); QR q = new QR(); Wilson.ORMapper.OPathQuery query = new Wilson.ORMapper.OPathQuery(typeof(C2.CtmJob), "JobNo='" + orderNo + "'"); C2.CtmJob job = C2.Manager.ORManager.GetObject(query) as C2.CtmJob; string text = string.Format(@"JobNo:" + orderNo + ",JobDate:" + job.JobDate.ToString("dd/MM/yyyy")); Bitmap bt = q.Create_QR(text); string path = MapPath("~/files/barcode/"); if (!Directory.Exists(path)) { Directory.CreateDirectory(path); } string fileName = orderNo + ".png"; string filePath = path + fileName; if (File.Exists(filePath)) { File.Delete(filePath); } bt.Save(Server.MapPath("~/files/barcode/") + fileName); DevExpress.XtraReports.UI.XRPictureBox qr_code = rpt.Report.FindControl("barcode", true) as DevExpress.XtraReports.UI.XRPictureBox; if (qr_code != null) { qr_code.ImageUrl = "/files/barcode/" + fileName; } System.IO.MemoryStream str = new MemoryStream(); rpt.ExportToPdf(str); return(str); }
/// <summary> /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// </summary> private void InitializeComponent() { DevExpress.XtraPrinting.BarCode.Code128Generator code128Generator1 = new DevExpress.XtraPrinting.BarCode.Code128Generator(); this.Detail = new DevExpress.XtraReports.UI.DetailBand(); this.xrPictureBox2 = new DevExpress.XtraReports.UI.XRPictureBox(); this.xrBarCode2 = new DevExpress.XtraReports.UI.XRBarCode(); this.xrLabel3 = new DevExpress.XtraReports.UI.XRLabel(); this.xrLabel2 = new DevExpress.XtraReports.UI.XRLabel(); this.xrPictureBox1 = new DevExpress.XtraReports.UI.XRPictureBox(); this.xrLabel1 = new DevExpress.XtraReports.UI.XRLabel(); ((System.ComponentModel.ISupportInitialize)(this)).BeginInit(); // // Detail // this.Detail.BackColor = System.Drawing.Color.Transparent; this.Detail.Controls.AddRange(new DevExpress.XtraReports.UI.XRControl[] { this.xrPictureBox2, this.xrBarCode2, this.xrLabel3, this.xrLabel2, this.xrPictureBox1, this.xrLabel1 }); this.Detail.Height = 349; this.Detail.Name = "Detail"; this.Detail.Padding = new DevExpress.XtraPrinting.PaddingInfo(0, 0, 0, 0, 100F); this.Detail.PageBreak = DevExpress.XtraReports.UI.PageBreak.BeforeBand; this.Detail.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopLeft; // // xrPictureBox2 // this.xrPictureBox2.Location = new System.Drawing.Point(248, 27); this.xrPictureBox2.Name = "xrPictureBox2"; this.xrPictureBox2.Size = new System.Drawing.Size(90, 30); // // xrBarCode2 // this.xrBarCode2.Alignment = DevExpress.XtraPrinting.TextAlignment.TopCenter; this.xrBarCode2.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] { new DevExpress.XtraReports.UI.XRBinding("Text", null, "strMembershipID", "") }); this.xrBarCode2.Font = new System.Drawing.Font("Times New Roman", 8F); this.xrBarCode2.Location = new System.Drawing.Point(50, 227); this.xrBarCode2.Module = 1F; this.xrBarCode2.Name = "xrBarCode2"; this.xrBarCode2.Padding = new DevExpress.XtraPrinting.PaddingInfo(10, 10, 0, 0, 100F); this.xrBarCode2.Size = new System.Drawing.Size(233, 42); this.xrBarCode2.Symbology = code128Generator1; // // xrLabel3 // this.xrLabel3.Font = new System.Drawing.Font("Verdana", 8.25F); this.xrLabel3.Location = new System.Drawing.Point(0, 142); this.xrLabel3.Name = "xrLabel3"; this.xrLabel3.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F); this.xrLabel3.Size = new System.Drawing.Size(17, 17); this.xrLabel3.Text = "."; this.xrLabel3.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopLeft; // // xrLabel2 // this.xrLabel2.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] { new DevExpress.XtraReports.UI.XRBinding("Text", null, "strCardName", "") }); this.xrLabel2.Font = new System.Drawing.Font("Arial", 9F); this.xrLabel2.Location = new System.Drawing.Point(11, 177); this.xrLabel2.Name = "xrLabel2"; this.xrLabel2.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F); this.xrLabel2.Size = new System.Drawing.Size(209, 19); this.xrLabel2.Text = "xrLabel2"; this.xrLabel2.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopLeft; // // xrPictureBox1 // this.xrPictureBox1.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] { new DevExpress.XtraReports.UI.XRBinding("Image", null, "imgPhoto", "") }); this.xrPictureBox1.Location = new System.Drawing.Point(22, 19); this.xrPictureBox1.Name = "xrPictureBox1"; this.xrPictureBox1.Padding = new DevExpress.XtraPrinting.PaddingInfo(0, 0, 0, 0, 100F); this.xrPictureBox1.Size = new System.Drawing.Size(99, 119); this.xrPictureBox1.Sizing = DevExpress.XtraPrinting.ImageSizeMode.StretchImage; // // xrLabel1 // this.xrLabel1.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] { new DevExpress.XtraReports.UI.XRBinding("Text", null, "strMembershipID", "") }); this.xrLabel1.Font = new System.Drawing.Font("Verdana", 8.25F); this.xrLabel1.Location = new System.Drawing.Point(11, 162); this.xrLabel1.Name = "xrLabel1"; this.xrLabel1.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F); this.xrLabel1.Size = new System.Drawing.Size(209, 19); this.xrLabel1.Text = "xrLabel1"; this.xrLabel1.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopLeft; // // XtraReportMemberCard // this.Bands.AddRange(new DevExpress.XtraReports.UI.Band[] { this.Detail }); this.Landscape = true; this.Margins = new System.Drawing.Printing.Margins(0, 0, 1, 0); this.PageHeight = 353; this.PageWidth = 214; this.PaperKind = System.Drawing.Printing.PaperKind.Custom; this.PaperName = "CR-79"; this.Version = "8.3"; ((System.ComponentModel.ISupportInitialize)(this)).EndInit(); }
private void set_signed_barcode_byid(XtraReport rpt, string orderNo, string id, string httpPath, string filename) { QR q = new QR(); Wilson.ORMapper.OPathQuery query = new Wilson.ORMapper.OPathQuery(typeof(C2.CtmJobDet2), "Id=" + id + ""); C2.CtmJobDet2 job = C2.Manager.ORManager.GetObject(query) as C2.CtmJobDet2; //string text = string.Format(@"JobNo:" + orderNo); Bitmap bt = q.Create_QR(httpPath); string path = MapPath("~/files/barcode/"); if (!Directory.Exists(path)) { Directory.CreateDirectory(path); } string fileName = id + ".png"; string filePath = path + fileName; if (File.Exists(filePath)) { File.Delete(filePath); } bt.Save(Server.MapPath("~/files/barcode/") + fileName); DevExpress.XtraReports.UI.XRPictureBox qr_code = rpt.Report.FindControl("barcode", true) as DevExpress.XtraReports.UI.XRPictureBox; if (qr_code != null) { qr_code.ImageUrl = "/files/barcode/" + fileName; } string Signature_Consignee = ""; string Signature_Driver = ""; string signature_time = ""; string signature_time1 = ""; string sql_signature = string.Format(@"select Id,FileType,FileName,FilePath,FileNote,CreateDateTime From CTM_Attachment where FileType='Signature' and RefNo=@RefNo and charindex(@sType, FileNote,0)>0 and TripId=@tripId"); List <ConnectSql_mb.cmdParameters> list = new List <ConnectSql_mb.cmdParameters>(); list.Add(new ConnectSql_mb.cmdParameters("@RefNo", orderNo, SqlDbType.NVarChar, 100)); list.Add(new ConnectSql_mb.cmdParameters("@sType", "Consignee", SqlDbType.NVarChar, 100)); list.Add(new ConnectSql_mb.cmdParameters("@tripId", id, SqlDbType.Int)); DataTable dt = ConnectSql_mb.GetDataTable(sql_signature, list); if (dt.Rows.Count > 0) { if (job.EpodHardCopy == "HardCopy") { Signature_Consignee = dt.Rows[0]["FilePath"].ToString().Replace(@"/500", ""); } else { Signature_Consignee = dt.Rows[0]["FilePath"].ToString(); } signature_time = dt.Rows[0]["CreateDateTime"].ToString(); } list = new List <ConnectSql_mb.cmdParameters>(); list.Add(new ConnectSql_mb.cmdParameters("@RefNo", orderNo, SqlDbType.NVarChar, 100)); list.Add(new ConnectSql_mb.cmdParameters("@sType", "Driver", SqlDbType.NVarChar, 100)); list.Add(new ConnectSql_mb.cmdParameters("@tripId", id, SqlDbType.Int)); dt = ConnectSql_mb.GetDataTable(sql_signature, list); if (dt.Rows.Count > 0) { Signature_Driver = dt.Rows[0]["FilePath"].ToString(); signature_time1 = dt.Rows[0]["CreateDateTime"].ToString(); } DevExpress.XtraReports.UI.XRPictureBox signature = rpt.Report.FindControl("signature", true) as DevExpress.XtraReports.UI.XRPictureBox; if (signature != null) { signature.ImageUrl = Signature_Consignee; } DevExpress.XtraReports.UI.XRLabel time = rpt.Report.FindControl("lbl_time", true) as DevExpress.XtraReports.UI.XRLabel; if (time != null) { time.Text = signature_time; } DevExpress.XtraReports.UI.XRPictureBox signature1 = rpt.Report.FindControl("signature1", true) as DevExpress.XtraReports.UI.XRPictureBox; if (signature1 != null) { signature1.ImageUrl = Signature_Driver; } DevExpress.XtraReports.UI.XRLabel time1 = rpt.Report.FindControl("lbl_time1", true) as DevExpress.XtraReports.UI.XRLabel; if (time1 != null) { time1.Text = signature_time1; } }
private MemoryStream PrintDelivery(string orderNo, string jobType) { XtraReport rpt = new XtraReport(); rpt.LoadLayout(Server.MapPath(@"~\PagesContTrucking\Report\repx\DeliveryOrder.repx")); rpt.DataSource = DocPrint.PrintHaulier(orderNo, jobType); QR q = new QR(); Wilson.ORMapper.OPathQuery query = new Wilson.ORMapper.OPathQuery(typeof(C2.CtmJob), "JobNo='" + orderNo + "'"); C2.CtmJob job = C2.Manager.ORManager.GetObject(query) as C2.CtmJob; string text = string.Format(@"JobNo:" + orderNo + ",JobDate:" + job.JobDate.ToString("dd/MM/yyyy")); Bitmap bt = q.Create_QR(text); string path = MapPath("~/files/barcode/"); if (!Directory.Exists(path)) { Directory.CreateDirectory(path); } string fileName = orderNo + ".png"; string filePath = path + fileName; if (File.Exists(filePath)) { File.Delete(filePath); } bt.Save(Server.MapPath("~/files/barcode/") + fileName); DevExpress.XtraReports.UI.XRPictureBox qr_code = rpt.Report.FindControl("barcode", true) as DevExpress.XtraReports.UI.XRPictureBox; if (qr_code != null) { qr_code.ImageUrl = "/files/barcode/" + fileName; } string sql_trip = string.Format(@"select top 1 Id from ctm_jobdet2 where JobNo='{0}'", orderNo); string tripId = ConnectSql_mb.ExecuteScalar(sql_trip); string Signature_Consignee = ""; string Signature_Driver = ""; string sql_signature = string.Format(@"select Id,FileType,FileName,FilePath,FileNote From CTM_Attachment where FileType='Signature' and RefNo=@RefNo and charindex(@sType, FileNote,0)>0 and TripId=@tripId"); List <ConnectSql_mb.cmdParameters> list = new List <ConnectSql_mb.cmdParameters>(); list.Add(new ConnectSql_mb.cmdParameters("@RefNo", orderNo, SqlDbType.NVarChar, 100)); list.Add(new ConnectSql_mb.cmdParameters("@sType", "Consignee", SqlDbType.NVarChar, 100)); list.Add(new ConnectSql_mb.cmdParameters("@tripId", tripId, SqlDbType.Int)); DataTable dt = ConnectSql_mb.GetDataTable(sql_signature, list); if (dt.Rows.Count > 0) { Signature_Consignee = dt.Rows[0]["FilePath"].ToString(); } list = new List <ConnectSql_mb.cmdParameters>(); list.Add(new ConnectSql_mb.cmdParameters("@RefNo", orderNo, SqlDbType.NVarChar, 100)); list.Add(new ConnectSql_mb.cmdParameters("@sType", "Driver", SqlDbType.NVarChar, 100)); list.Add(new ConnectSql_mb.cmdParameters("@tripId", tripId, SqlDbType.Int)); dt = ConnectSql_mb.GetDataTable(sql_signature, list); if (dt.Rows.Count > 0) { Signature_Driver = dt.Rows[0]["FilePath"].ToString(); } DevExpress.XtraReports.UI.XRPictureBox signature = rpt.Report.FindControl("signature", true) as DevExpress.XtraReports.UI.XRPictureBox; if (signature != null) { signature.ImageUrl = Signature_Consignee; } DevExpress.XtraReports.UI.XRPictureBox signature1 = rpt.Report.FindControl("signature1", true) as DevExpress.XtraReports.UI.XRPictureBox; if (signature1 != null) { signature1.ImageUrl = Signature_Driver; } System.IO.MemoryStream str = new MemoryStream(); rpt.ExportToPdf(str); return(str); }
/// <summary> /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// </summary> private void InitializeComponent() { this.Detail = new DevExpress.XtraReports.UI.DetailBand(); this.PageHeader = new DevExpress.XtraReports.UI.PageHeaderBand(); this.PageFooter = new DevExpress.XtraReports.UI.PageFooterBand(); this.xrLabel1 = new DevExpress.XtraReports.UI.XRLabel(); this.xrPictureBox1 = new DevExpress.XtraReports.UI.XRPictureBox(); this.DetailReport = new DevExpress.XtraReports.UI.DetailReportBand(); this.Detail1 = new DevExpress.XtraReports.UI.DetailBand(); ((System.ComponentModel.ISupportInitialize)(this)).BeginInit(); // // Detail // this.Detail.Controls.AddRange(new DevExpress.XtraReports.UI.XRControl[] { this.xrPictureBox1, this.xrLabel1 }); this.Detail.Name = "Detail"; // // PageHeader // this.PageHeader.Height = 30; this.PageHeader.Name = "PageHeader"; // // PageFooter // this.PageFooter.Height = 30; this.PageFooter.Name = "PageFooter"; // // xrLabel1 // this.xrLabel1.Location = new System.Drawing.Point(92, 8); this.xrLabel1.Name = "xrLabel1"; this.xrLabel1.Size = new System.Drawing.Size(100, 25); this.xrLabel1.Text = "xrLabel1"; // // xrPictureBox1 // this.xrPictureBox1.Location = new System.Drawing.Point(92, 42); this.xrPictureBox1.Name = "xrPictureBox1"; this.xrPictureBox1.Size = new System.Drawing.Size(100, 25); // // DetailReport // this.DetailReport.Bands.AddRange(new DevExpress.XtraReports.UI.Band[] { this.Detail1 }); this.DetailReport.Name = "DetailReport"; // // Detail1 // this.Detail1.Name = "Detail1"; // // XtraReport1 // this.Bands.AddRange(new DevExpress.XtraReports.UI.Band[] { this.Detail, this.PageHeader, this.PageFooter, this.DetailReport }); ((System.ComponentModel.ISupportInitialize)(this)).EndInit(); }
private bool ePOD_SendEmail(int tripId) { bool res = false; string sql = string.Format(@"select job.JobNo,job.EmailAddress,job.JobType,det2.epodHardCopy from ctm_jobdet2 as det2 left outer join ctm_job as job on job.JobNo=det2.JobNo where det2.Id=@tripId"); List <ConnectSql_mb.cmdParameters> list = new List <ConnectSql_mb.cmdParameters>(); list.Add(new ConnectSql_mb.cmdParameters("@tripId", tripId, SqlDbType.Int)); DataTable dt = ConnectSql_mb.GetDataTable(sql, list); if (dt.Rows.Count > 0) { string JobNo = dt.Rows[0]["JobNo"].ToString(); string email = dt.Rows[0]["EmailAddress"].ToString(); string JobType = dt.Rows[0]["JobType"].ToString(); string hardCopy = dt.Rows[0]["epodHardCopy"].ToString(); if (email != "") { try { //bool action = false; string path1 = string.Format("~/files/pdf/"); string path2 = path1.Replace(' ', '_').Replace('\'', '_'); string pathx = path2.Substring(1); //string path3 = MapPath(path2); //string path3 = Path.Combine(@"C:\boox\boox_ell", path2); string path3 = HttpContext.Current.Server.MapPath(path2); if (!Directory.Exists(path3)) { Directory.CreateDirectory(path3); } string p = string.Format(@"~\files\pdf\DeliveryOrder_Crane_{0}.pdf", DateTime.Now.ToString("yyyyMMdd_HHmmss")); string e_file = HttpContext.Current.Server.MapPath(p); //if (!File.Exists(e_file)) //{ // File.Create(e_file); //} MemoryStream ms = new MemoryStream(); XtraReport rpt = new XtraReport(); if (hardCopy == "HardCopy") { rpt.LoadLayout(Server.MapPath(@"~\PagesContTrucking\Report\repx\DO_HardCopy.repx")); } else { rpt.LoadLayout(Server.MapPath(@"~\PagesContTrucking\Report\repx\DeliveryOrder_CRA.repx")); } rpt.DataSource = DocPrint.PrintJobSheet(JobNo, JobType, tripId + ""); //============ bind signatrue QR q = new QR(); Wilson.ORMapper.OPathQuery query = new Wilson.ORMapper.OPathQuery(typeof(C2.CtmJob), "JobNo='" + JobNo + "'"); C2.CtmJob job = C2.Manager.ORManager.GetObject(query) as C2.CtmJob; string text = string.Format(@"JobNo:" + JobNo + ",JobDate:" + job.JobDate.ToString("dd/MM/yyyy")); Bitmap bt = q.Create_QR(text); string path = HttpContext.Current.Server.MapPath("~/files/barcode/"); if (!Directory.Exists(path)) { Directory.CreateDirectory(path); } string fileName = JobNo + ".png"; string filePath = path + fileName; if (File.Exists(filePath)) { File.Delete(filePath); } bt.Save(Server.MapPath("~/files/barcode/") + fileName); string Signature_Consignee = ""; string Signature_Driver = ""; string sql_signature = string.Format(@"select Id,FileType,FileName,FilePath,FileNote From CTM_Attachment where FileType='Signature' and RefNo=@RefNo and charindex(@sType, FileNote,0)>0 and TripId=@tripId"); list = new List <ConnectSql_mb.cmdParameters>(); list.Add(new ConnectSql_mb.cmdParameters("@RefNo", JobNo, SqlDbType.NVarChar, 100)); list.Add(new ConnectSql_mb.cmdParameters("@sType", "Consignee", SqlDbType.NVarChar, 100)); list.Add(new ConnectSql_mb.cmdParameters("@tripId", tripId, SqlDbType.Int)); dt = ConnectSql_mb.GetDataTable(sql_signature, list); if (dt.Rows.Count > 0) { Signature_Consignee = dt.Rows[0]["FilePath"].ToString().Replace(@"/500", ""); } list = new List <ConnectSql_mb.cmdParameters>(); list.Add(new ConnectSql_mb.cmdParameters("@RefNo", JobNo, SqlDbType.NVarChar, 100)); list.Add(new ConnectSql_mb.cmdParameters("@sType", "Driver", SqlDbType.NVarChar, 100)); list.Add(new ConnectSql_mb.cmdParameters("@tripId", tripId, SqlDbType.Int)); dt = ConnectSql_mb.GetDataTable(sql_signature, list); if (dt.Rows.Count > 0) { Signature_Driver = dt.Rows[0]["FilePath"].ToString(); } DevExpress.XtraReports.UI.XRPictureBox qr_code = rpt.Report.FindControl("barcode", true) as DevExpress.XtraReports.UI.XRPictureBox; if (qr_code != null) { qr_code.ImageUrl = "/files/barcode/" + fileName; } DevExpress.XtraReports.UI.XRPictureBox signature = rpt.Report.FindControl("signature", true) as DevExpress.XtraReports.UI.XRPictureBox; if (signature != null) { signature.ImageUrl = Signature_Consignee; } signature = rpt.Report.FindControl("signature1", true) as DevExpress.XtraReports.UI.XRPictureBox; if (signature != null) { signature.ImageUrl = Signature_Driver; } System.IO.MemoryStream str = new MemoryStream(); rpt.CreateDocument(); rpt.ExportToPdf(e_file); Helper.Email.SendEmail(email, "*****@*****.**", "*****@*****.**", "Delivery Order " + JobNo, "", p); res = true; } catch { } // string company = System.Configuration.ConfigurationManager.AppSettings["CompanyName"]; // string address1 = System.Configuration.ConfigurationManager.AppSettings["CompanyAddress1"]; // string address2 = System.Configuration.ConfigurationManager.AppSettings["CompanyAddress2"]; // string address3 = System.Configuration.ConfigurationManager.AppSettings["CompanyAddress3"]; // sql = string.Format(@"select Email1,Email2,Name from xxparty where PartyId='{0}'",JobNo); // DataTable tab = ConnectSql.GetTab(sql); // string add = address1 + " " + address2 + " " + address3; // string title = "Haulier Advice"; // if (tab.Rows.Count > 0) // { // string email1 = SafeValue.SafeString(tab.Rows[0]["Email1"]); // string email2 = SafeValue.SafeString(tab.Rows[0]["Email2"]); // string name = SafeValue.SafeString(tab.Rows[0]["Name"]); // string mes = string.Format(@"<b>{0}</b><br><br> //{1}<br><br> //<b>Dear Customer, <br><br>Kindly review attached document for HAULIER ADVICE.</b> //<br><br> //<b>This is a computer generated email, please DO NOT reply. //<br><br> //Pls email to : [email protected] for any questions. //</b><br><br> //***IMPORTANT NOTICE***<br><br> // //1. Pls wait for our delivery department to call you for delivery arrangement<br><br> // //2. Delivery arrangement will be made within 3 working days from the date of unstuffing of container.<br><br> //<br><br>", company, add); // if (email1.Length > 0) // { // Helper.Email.SendEmail(email1, "[email protected],[email protected]", "*****@*****.**", title, mes, p); // //Helper.Email.SendEmail("*****@*****.**", "[email protected],[email protected]", "", title, mes, p); // action = true; // } // if (email2.Length > 0) // { // if (action) // Helper.Email.SendEmail(email2, "", "", title, mes, p); // else // Helper.Email.SendEmail(email2, "[email protected],[email protected]", "*****@*****.**", title, mes, p); // } // //"*****@*****.**", "*****@*****.**" // res = true; // } } } return(res); }
/// <summary> /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// </summary> private void InitializeComponent() { DevExpress.XtraReports.UI.BarCode.XRCode128Generator xrCode128Generator1 = new DevExpress.XtraReports.UI.BarCode.XRCode128Generator(); this.Detail = new DevExpress.XtraReports.UI.DetailBand(); this.xrBarCode2 = new DevExpress.XtraReports.UI.XRBarCode(); this.xrLabel3 = new DevExpress.XtraReports.UI.XRLabel(); this.xrLabel2 = new DevExpress.XtraReports.UI.XRLabel(); this.xrPictureBox1 = new DevExpress.XtraReports.UI.XRPictureBox(); this.xrLabel1 = new DevExpress.XtraReports.UI.XRLabel(); ((System.ComponentModel.ISupportInitialize)(this)).BeginInit(); // // Detail // this.Detail.Controls.AddRange(new DevExpress.XtraReports.UI.XRControl[] { this.xrBarCode2, this.xrLabel3, this.xrLabel2, this.xrPictureBox1, this.xrLabel1}); this.Detail.Height = 349; this.Detail.Name = "Detail"; this.Detail.PageBreak = DevExpress.XtraReports.UI.PageBreak.BeforeBand; this.Detail.ParentStyleUsing.UseBackColor = false; // // xrBarCode2 // this.xrBarCode2.Alignment = DevExpress.XtraPrinting.TextAlignment.TopCenter; this.xrBarCode2.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] { new DevExpress.XtraReports.UI.XRBinding("Text", null, "strMembershipID", "")}); this.xrBarCode2.Font = new System.Drawing.Font("Times New Roman", 8F); this.xrBarCode2.Location = new System.Drawing.Point(50, 227); this.xrBarCode2.Module = 1F; this.xrBarCode2.Name = "xrBarCode2"; this.xrBarCode2.ParentStyleUsing.UseFont = false; this.xrBarCode2.Size = new System.Drawing.Size(233, 42); this.xrBarCode2.Symbology = xrCode128Generator1; // // xrLabel3 // this.xrLabel3.Font = new System.Drawing.Font("Verdana", 8.25F); this.xrLabel3.Location = new System.Drawing.Point(0, 142); this.xrLabel3.Name = "xrLabel3"; this.xrLabel3.ParentStyleUsing.UseFont = false; this.xrLabel3.Size = new System.Drawing.Size(17, 17); this.xrLabel3.Text = "."; // // xrLabel2 // this.xrLabel2.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] { new DevExpress.XtraReports.UI.XRBinding("Text", null, "strCardName", "")}); this.xrLabel2.Font = new System.Drawing.Font("Arial", 9F); this.xrLabel2.Location = new System.Drawing.Point(11, 177); this.xrLabel2.Name = "xrLabel2"; this.xrLabel2.ParentStyleUsing.UseFont = false; this.xrLabel2.Size = new System.Drawing.Size(209, 19); this.xrLabel2.Text = "xrLabel2"; // // xrPictureBox1 // this.xrPictureBox1.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] { new DevExpress.XtraReports.UI.XRBinding("Image", null, "imgPhoto", "")}); this.xrPictureBox1.Location = new System.Drawing.Point(22, 19); this.xrPictureBox1.Name = "xrPictureBox1"; this.xrPictureBox1.Size = new System.Drawing.Size(99, 119); this.xrPictureBox1.Sizing = DevExpress.XtraPrinting.ImageSizeMode.StretchImage; // // xrLabel1 // this.xrLabel1.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] { new DevExpress.XtraReports.UI.XRBinding("Text", null, "strMembershipID", "")}); this.xrLabel1.Font = new System.Drawing.Font("Verdana", 8.25F); this.xrLabel1.Location = new System.Drawing.Point(11, 162); this.xrLabel1.Name = "xrLabel1"; this.xrLabel1.ParentStyleUsing.UseFont = false; this.xrLabel1.Size = new System.Drawing.Size(209, 19); this.xrLabel1.Text = "xrLabel1"; // // XtraReportMemberCard // this.Bands.AddRange(new DevExpress.XtraReports.UI.Band[] { this.Detail}); this.Landscape = true; this.Margins = new System.Drawing.Printing.Margins(0, 0, 1, 0); this.PageHeight = 353; this.PageWidth = 214; this.PaperKind = System.Drawing.Printing.PaperKind.Custom; this.PaperName = "CR-79"; ((System.ComponentModel.ISupportInitialize)(this)).EndInit(); }