private void importFromFileButton_Click(object sender, EventArgs e) { if (fileNameTextbox.Text != "") { //this.Cursor = Cursors.WaitCursor; //restore database from file gutil.saveSystemDebugLog(globalConstants.MENU_SINKRONISASI_INFORMASI, "SINKRONISASI INFORMASI, FILENAME [" + fileNameTextbox.Text + "]"); smallPleaseWait pleaseWait = new smallPleaseWait(); pleaseWait.Show(); // ALlow main UI thread to properly display please wait form. Application.DoEvents(); syncInformation(fileNameTextbox.Text); pleaseWait.Close(); gutil.saveUserChangeLog(globalConstants.MENU_SINKRONISASI_INFORMASI, globalConstants.CHANGE_LOG_UPDATE, "SINKRONISASI INFORMASI DENGAN SERVER VIA USB EXPORT"); } else { String errormessage = "Filename is blank." + Environment.NewLine + "Please find the appropriate file!"; gutil.showError(errormessage); } }
private void exportDataButton_Click(object sender, EventArgs e) { string localDate = ""; string fileName = ""; localDate = String.Format(culture, "{0:ddMMyyyy}", DateTime.Now); fileName = "SYNCINFO_PRODUCT_" + localDate + ".sql"; saveFileDialog1.FileName = fileName; saveFileDialog1.AddExtension = true; saveFileDialog1.DefaultExt = "sql"; saveFileDialog1.Filter = "SQL File (.sql)|*.sql"; saveFileDialog1.ShowDialog(); smallPleaseWait pleaseWait = new smallPleaseWait(); pleaseWait.Show(); // ALlow main UI thread to properly display please wait form. Application.DoEvents(); exportData(saveFileDialog1.FileName, DS); pleaseWait.Close(); gutil.saveSystemDebugLog(globalConstants.MENU_SINKRONISASI_INFORMASI, "EXPORTED FILE NAME = " + saveFileDialog1.FileName); MessageBox.Show("DONE"); }
private void dataPenerimaanBarang_KeyDown(object sender, KeyEventArgs e) { string selectedPRInvoice = ""; string selectedPOInvoice = ""; string selectedPMInvoice = ""; if (e.KeyCode == Keys.Enter) { if (dataPenerimaanBarang.Rows.Count <= 0) { return; } int rowSelectedIndex = (dataPenerimaanBarang.SelectedCells[0].RowIndex); DataGridViewRow selectedRow = dataPenerimaanBarang.Rows[rowSelectedIndex]; selectedPRInvoice = selectedRow.Cells["NO PENERIMAAN"].Value.ToString(); selectedPOInvoice = selectedRow.Cells["PURCHASE_INVOICE"].Value.ToString(); selectedPMInvoice = selectedRow.Cells["PM_INVOICE"].Value.ToString(); if (DialogResult.Yes == MessageBox.Show("PRINT RECEIPT ?", "WARNING", MessageBoxButtons.YesNo, MessageBoxIcon.Question)) { smallPleaseWait pleaseWait = new smallPleaseWait(); pleaseWait.Show(); // ALlow main UI thread to properly display please wait form. Application.DoEvents(); printReport(selectedPRInvoice, selectedPMInvoice, selectedPOInvoice); pleaseWait.Close(); } } }
private void backupButton_Click(object sender, EventArgs e) { string localDate = ""; string fileName = ""; localDate = String.Format(culture, "{0:ddMMyyyy}", DateTime.Now); fileName = "BACKUP_" + localDate + ".sql"; saveFileDialog1.FileName = fileName; saveFileDialog1.AddExtension = true; saveFileDialog1.DefaultExt = "sql"; saveFileDialog1.Filter = "SQL File (.sql)|*.sql"; if (DialogResult.OK == saveFileDialog1.ShowDialog()) { if (gUtil.allTrim(saveFileDialog1.FileName).Length > 0) { smallPleaseWait pleaseWait = new smallPleaseWait(); pleaseWait.Show(); // ALlow main UI thread to properly display please wait form. Application.DoEvents(); backupDatabase(saveFileDialog1.FileName); pleaseWait.Close(); } } }
private void messagingForm_Load(object sender, EventArgs e) { smallPleaseWait pleaseWait = new smallPleaseWait(); pleaseWait.Show(); // ALlow main UI thread to properly display please wait form. Application.DoEvents(); pullMessageData(); pleaseWait.Close(); loadMessageData(); }
private void importFromServerButton_Click(object sender, EventArgs e) { if (DialogResult.Yes == MessageBox.Show("PASTIKAN TIDAK ADA KONEKSI AKTIF KE DATABASE LOKAL, SEMUA USER DIPASTIKAN LOG OUT", "WARNING", MessageBoxButtons.YesNo, MessageBoxIcon.Warning)) { smallPleaseWait pleaseWait = new smallPleaseWait(); pleaseWait.Show(); // ALlow main UI thread to properly display please wait form. Application.DoEvents(); if (syncToCentralHQ()) { gutil.saveUserChangeLog(globalConstants.MENU_SINKRONISASI_INFORMASI, globalConstants.CHANGE_LOG_UPDATE, "SINKRONISASI INFORMASI DENGAN SERVER VIA ONLINE CONNECTION"); } pleaseWait.Close(); } }
private bool saveData() { bool result = false; if (dataValidated()) { smallPleaseWait pleaseWait = new smallPleaseWait(); pleaseWait.Show(); // ALlow main UI thread to properly display please wait form. Application.DoEvents(); result = saveDataTransaction(); pleaseWait.Close(); return(result); } return(result); }
private void restoreButton_Click(object sender, EventArgs e) { if (fileNameTextbox.Text != "") { smallPleaseWait pleaseWait = new smallPleaseWait(); pleaseWait.Show(); // ALlow main UI thread to properly display please wait form. Application.DoEvents(); //restore database from file restoreDatabase(fileNameTextbox.Text); pleaseWait.Close(); gUtil.saveUserChangeLog(globalConstants.MENU_SINKRONISASI_INFORMASI, globalConstants.CHANGE_LOG_UPDATE, "RESTORE DATABASE FROM LOCAL BACKUP"); } else { String errormessage = "Filename is blank." + Environment.NewLine + "Please find the appropriate file!"; gUtil.showError(errormessage); } }