private void btnBARCODE_Click(object sender, EventArgs e) { BarcodeLib.Barcode barcode = new BarcodeLib.Barcode(); Image image = barcode.Encode(BarcodeLib.TYPE.CODE128, "0380003562162", Color.Black, Color.White, 300, 150); showBarcode.BackgroundImage = barcode.Encode(BarcodeLib.TYPE.CODE128, "0380003562162", Color.Black, Color.White, 300, 50); byte[] test = barcode.Encoded_Image_Stream; //string test = barcode.EncodedValue; dataPrint.Rows.Add(c.NORESI, txtSFROM.Text, txtSTO.Text, txtWEIGHT.Text, txtPCS.Text, c.NAMACUSTOMER, txtALAMATPENGIRIM.Text, txtPHONEPENGIRIM.Text, txtPENERIMA.Text, txtALAMAT.Text, txtPHONEPENERIMA.Text, lblLAYANAN.Text, txtRATEKIRIM.Text, lblJENISKIRIMAN.Text, txtCHARGEINSURANCE.Text, txtCHARGEPPN.Text, txtGRANDTOTAL.Text, txtKETERANGANISI.Text, txtINSTRUKSIKHUSUS.Text, txtPDIM.Text, txtLDIM.Text, txtTDIM.Text, txtHPPENGIRIM.Text, txtCHARGEPACKING.Text, test, barcode.EncodedValue, alamatPerusahaan, telpPerusahaan, faxPerusahaan, c.TGLTERIMA, c.TGLESTIMASI); TopMost = false; CrystalDecisions.CrystalReports.Engine.ReportDocument cryRpt = new CrystalDecisions.CrystalReports.Engine.ReportDocument(); REPORTS.EXPRESS.FormRESIEXPRESS frm = new REPORTS.EXPRESS.FormRESIEXPRESS(dataPrint); frm.WindowState = FormWindowState.Normal; frm.BringToFront(); frm.ShowDialog(); }
private void btnTAMBAH_Click(object sender, EventArgs e) { #region CEK BY RICEK if (string.IsNullOrEmpty(txtSFROM.Text)) { MessageBox.Show("ISI KOTA ASAL", "WARNING", MessageBoxButtons.OK, MessageBoxIcon.Stop); txtSFROM.Focus(); return; } if (string.IsNullOrEmpty(txtSTO.Text)) { MessageBox.Show("ISI KOTA TUJUAN", "WARNING", MessageBoxButtons.OK, MessageBoxIcon.Stop); txtSTO.Focus(); return; } if (string.IsNullOrEmpty(txtSWIGHT.Text)) { MessageBox.Show("ISI BERAT / KG", "WARNING", MessageBoxButtons.OK, MessageBoxIcon.Stop); txtSWIGHT.Focus(); return; } if (string.IsNullOrEmpty(txtNAMACUSTOMER.Text)) { MessageBox.Show("ISI NAMA CUSTOMER", "WARNING", MessageBoxButtons.OK, MessageBoxIcon.Stop); txtNAMACUSTOMER.Focus(); return; } if (string.IsNullOrEmpty(txtPENERIMA.Text)) { MessageBox.Show("ISI NAMA PENERIMA", "WARNING", MessageBoxButtons.OK, MessageBoxIcon.Stop); txtPENERIMA.Focus(); return; } if (string.IsNullOrEmpty(txtKETERANGANISI.Text)) { MessageBox.Show("ISI KETERANGAN ISI BARANG", "WARNING", MessageBoxButtons.OK, MessageBoxIcon.Stop); txtPENERIMA.Focus(); return; } if (txtSWIGHT.Text == "0") { MessageBox.Show("Mohon Lengkapi Transaksi", "WARNING", MessageBoxButtons.OK, MessageBoxIcon.Stop); txtGRANDTOTAL.Focus(); return; } if (txtBAYAR.Text == "0") { MessageBox.Show("Mohon Lakukan Pembayaran", "WARNING", MessageBoxButtons.OK, MessageBoxIcon.Stop); txtBAYAR.Focus(); return; } decimal checkGrandtotal, checkBayar = 0; checkGrandtotal = Convert.ToDecimal(txtGRANDTOTAL.Text); checkBayar = Convert.ToDecimal(txtBAYAR.Text); if (checkBayar < checkGrandtotal) { MessageBox.Show("Mohon Lakukan Pelunasan Pembayaran", "WARNING", MessageBoxButtons.OK, MessageBoxIcon.Stop); txtBAYAR.Focus(); return; } #endregion c.NORESI = txtNORESI.Text; c.TGLTERIMA = dtTGLMANIFEST.Value.ToString("yyyy-MM-dd"); c.TGLESTIMASI = dtETD.Value.ToString("yyyy-MM-dd"); c.JUMLAH = Convert.ToInt32(txtPCS.Text); c.BERAT = float.Parse(txtWEIGHT.Text); c.DIM_P = float.Parse(txtPDIM.Text); c.DIM_L = float.Parse(txtLDIM.Text); c.DIM_T = float.Parse(txtTDIM.Text); c.RATE_KIRIM = float.Parse(txtRATEKIRIM.Text); c.CHARGE_KIRIM = float.Parse(txtTOTALCHARGEKIRIM.Text); c.PPNPERCENT = float.Parse(txtPPNPercent.Text); c.PPN = float.Parse(txtCHARGEPPN.Text); c.CHARGE_PACKING = float.Parse(txtCHARGEPACKING.Text); c.OTHER_CHARGE = 0; c.DISCPERCENT = float.Parse(txtDISKONPERCENT.Text); c.DISC = float.Parse(txtDISKON.Text); c.INCURANCEPERCENT = float.Parse(cboINSURANCE.Text); c.INCURANCE = float.Parse(txtCHARGEINSURANCE.Text); c.NBARANGINSURANCE = float.Parse(txtNOMINALBARANG.Text); // TGLPENGIRIMAN,TGLPENGAMBILAN informasi ini di bongkar muat c.TOTAL = float.Parse(txtGRANDTOTAL.Text); c.BAYAR = float.Parse(txtBAYAR.Text); c.SISA = float.Parse(txtKEMBALI.Text); c.VOID = 0; // Belum disediakan untuk void c.STATUS = 1; // SAAT pengisian awal default MANIFESTED c.KETERANGANISI = txtKETERANGANISI.Text; c.INSTRUKSIKHUSUS = txtINSTRUKSIKHUSUS.Text; if (Type == 0) { // b.INSERT(c); this.frm.LOAD_DATA(); } else { b.UPDATE(c); this.frm.LOAD_DATA(); } Close(); //this.Hide(); //this.MinimumSize(); // disini isi data table printer // BarcodeLib.Barcode b = new BarcodeLib.Barcode(BarcodeLib.TYPE.UPCA, //"038000356216", Color.Black, Color.White, 300, 150); dataPrint.Rows.Add(c.NORESI, txtSFROM.Text, txtSTO.Text, txtWEIGHT.Text, txtPCS.Text, txtNAMACUSTOMER.Text, txtALAMATPENGIRIM.Text, txtPHONEPENGIRIM.Text, txtPENERIMA.Text, txtALAMAT.Text, txtPHONEPENERIMA.Text, lblLAYANAN.Text, txtRATEKIRIM.Text, lblJENISKIRIMAN.Text, txtCHARGEINSURANCE.Text, txtCHARGEPPN.Text, txtGRANDTOTAL.Text, txtKETERANGANISI.Text, txtINSTRUKSIKHUSUS.Text, txtPDIM.Text, txtLDIM.Text, txtTDIM.Text, txtHPPENGIRIM.Text, txtCHARGEPACKING.Text, 038000356216, namaPerusahaan, alamatPerusahaan, telpPerusahaan, faxPerusahaan, c.TGLTERIMA,c.TGLESTIMASI); TopMost = false; CrystalDecisions.CrystalReports.Engine.ReportDocument cryRpt = new CrystalDecisions.CrystalReports.Engine.ReportDocument(); REPORTS.EXPRESS.FormRESIEXPRESS frm = new REPORTS.EXPRESS.FormRESIEXPRESS(dataPrint); frm.WindowState = FormWindowState.Normal; frm.BringToFront(); frm.ShowDialog(); }
private void btnTAMBAH_Click(object sender, EventArgs e) { #region CEK BY RICEK if (string.IsNullOrEmpty(txtSFROM.Text)) { MessageBox.Show("ISI KOTA ASAL", "WARNING", MessageBoxButtons.OK, MessageBoxIcon.Stop); txtSFROM.Focus(); return; } if (string.IsNullOrEmpty(txtSTO.Text)) { MessageBox.Show("ISI KOTA TUJUAN", "WARNING", MessageBoxButtons.OK, MessageBoxIcon.Stop); txtSTO.Focus(); return; } if (string.IsNullOrEmpty(txtSWIGHT.Text)) { MessageBox.Show("ISI BERAT / KG", "WARNING", MessageBoxButtons.OK, MessageBoxIcon.Stop); txtSWIGHT.Focus(); return; } if (string.IsNullOrEmpty(txtNAMACUSTOMER.Text)) { MessageBox.Show("ISI NAMA CUSTOMER", "WARNING", MessageBoxButtons.OK, MessageBoxIcon.Stop); txtNAMACUSTOMER.Focus(); return; } if (string.IsNullOrEmpty(txtPENERIMA.Text)) { MessageBox.Show("ISI NAMA PENERIMA", "WARNING", MessageBoxButtons.OK, MessageBoxIcon.Stop); txtPENERIMA.Focus(); return; } if (string.IsNullOrEmpty(txtKETERANGANISI.Text)) { MessageBox.Show("ISI KETERANGAN ISI BARANG", "WARNING", MessageBoxButtons.OK, MessageBoxIcon.Stop); txtPENERIMA.Focus(); return; } if (txtSWIGHT.Text == "0") { MessageBox.Show("Mohon Lengkapi Transaksi", "WARNING", MessageBoxButtons.OK, MessageBoxIcon.Stop); txtGRANDTOTAL.Focus(); return; } if (txtBAYAR.Text == "0") { MessageBox.Show("Mohon Lakukan Pembayaran", "WARNING", MessageBoxButtons.OK, MessageBoxIcon.Stop); txtBAYAR.Focus(); return; } decimal checkGrandtotal, checkBayar = 0; checkGrandtotal = Convert.ToDecimal(txtGRANDTOTAL.Text); checkBayar = Convert.ToDecimal(txtBAYAR.Text); if (checkBayar < checkGrandtotal) { MessageBox.Show("Mohon Lakukan Pelunasan Pembayaran", "WARNING", MessageBoxButtons.OK, MessageBoxIcon.Stop); txtBAYAR.Focus(); return; } #endregion c.NORESI = txtNORESI.Text; c.TGLTERIMA = dtTGLMANIFEST.Value.ToString("yyyy-MM-dd"); c.TGLESTIMASI = dtETD.Value.ToString("yyyy-MM-dd"); c.JUMLAH = Convert.ToInt32(txtPCS.Text); c.BERAT = float.Parse(txtWEIGHT.Text); c.DIM_P = float.Parse(txtPDIM.Text); c.DIM_L = float.Parse(txtLDIM.Text); c.DIM_T = float.Parse(txtTDIM.Text); c.RATE_KIRIM = float.Parse(txtRATEKIRIM.Text); c.CHARGE_KIRIM = float.Parse(txtTOTALCHARGEKIRIM.Text); c.PPNPERCENT = float.Parse(txtPPNPercent.Text); c.PPN = float.Parse(txtCHARGEPPN.Text); c.CHARGE_PACKING = float.Parse(txtCHARGEPACKING.Text); c.OTHER_CHARGE = 0; c.DISCPERCENT = float.Parse(txtDISKONPERCENT.Text); c.DISC = float.Parse(txtDISKON.Text); c.INCURANCEPERCENT = float.Parse(cboINSURANCE.Text); c.INCURANCE = float.Parse(txtCHARGEINSURANCE.Text); c.NBARANGINSURANCE = float.Parse(txtNOMINALBARANG.Text); // TGLPENGIRIMAN,TGLPENGAMBILAN informasi ini di bongkar muat c.TOTAL = float.Parse(txtGRANDTOTAL.Text); c.BAYAR = float.Parse(txtBAYAR.Text); c.SISA = float.Parse(txtKEMBALI.Text); c.VOID = 0; // Belum disediakan untuk void c.STATUS = 1; // SAAT pengisian awal default MANIFESTED c.KETERANGANISI = txtKETERANGANISI.Text; c.INSTRUKSIKHUSUS = txtINSTRUKSIKHUSUS.Text; if (Type == 0) { // b.INSERT(c); this.frm.LOAD_DATA(); } else { b.UPDATE(c); this.frm.LOAD_DATA(); } Close(); //this.Hide(); //this.MinimumSize(); // disini isi data table printer // BarcodeLib.Barcode b = new BarcodeLib.Barcode(BarcodeLib.TYPE.UPCA, //"038000356216", Color.Black, Color.White, 300, 150); dataPrint.Rows.Add(c.NORESI, txtSFROM.Text, txtSTO.Text, txtWEIGHT.Text, txtPCS.Text, txtNAMACUSTOMER.Text, txtALAMATPENGIRIM.Text, txtPHONEPENGIRIM.Text, txtPENERIMA.Text, txtALAMAT.Text, txtPHONEPENERIMA.Text, lblLAYANAN.Text, txtRATEKIRIM.Text, lblJENISKIRIMAN.Text, txtCHARGEINSURANCE.Text, txtCHARGEPPN.Text, txtGRANDTOTAL.Text, txtKETERANGANISI.Text, txtINSTRUKSIKHUSUS.Text, txtPDIM.Text, txtLDIM.Text, txtTDIM.Text, txtHPPENGIRIM.Text, txtCHARGEPACKING.Text, 038000356216, namaPerusahaan, alamatPerusahaan, telpPerusahaan, faxPerusahaan, c.TGLTERIMA, c.TGLESTIMASI); TopMost = false; CrystalDecisions.CrystalReports.Engine.ReportDocument cryRpt = new CrystalDecisions.CrystalReports.Engine.ReportDocument(); REPORTS.EXPRESS.FormRESIEXPRESS frm = new REPORTS.EXPRESS.FormRESIEXPRESS(dataPrint); frm.WindowState = FormWindowState.Normal; frm.BringToFront(); frm.ShowDialog(); }