private void initComboBox() { GlobalVariable.comboBoxLoadItem(ref comboBox3, "invoicesID", "Invoice"); GlobalVariable.comboBoxLoadItem(ref comboBox1, "nameCustomer", "Customer WHERE customer = 'YES'"); GlobalVariable.comboBoxLoadItem(ref comboBox2, "nameCustomer", "Customer WHERE customer = 'YES'"); GlobalVariable.comboBoxLoadItem(ref comboBox4, "orderID", "OrderStatus WHERE status = 'KELUAR'"); }
public ProductionHistoryForm() { InitializeComponent(); GlobalVariable.comboBoxLoadItem(ref comboBox1, "productionID", "Production"); startDatetime.Format = DateTimePickerFormat.Custom; startDatetime.CustomFormat = "dddd, dd MMMM yyyy, HH:MM tt"; }
private void initComboBox() { GlobalVariable.comboBoxLoadItem(ref comboBox1, "nameStock", "Stock"); GlobalVariable.comboBoxLoadItem(ref bynameitemnameComboBox, "kodeStock", "Stock"); GlobalVariable.comboBoxLoadItem(ref stockbynameitemnameComboBox, "kodeStock", "Stock"); GlobalVariable.comboBoxLoadItem(ref comboBox2, "nameStock", "Stock"); }
public ProductionInsertForm() { InitializeComponent(); startDatetime.Format = DateTimePickerFormat.Custom; startDatetime.CustomFormat = "dddd, dd MMMM yyyy, HH:MM tt"; GlobalVariable.comboBoxLoadItem(ref costumerCombo, "nameCustomer", "Customer WHERE customer = 'YES'"); initComp(); }
private void button1_Click(object sender, EventArgs e) { resetInput(); insertdateDateTime.Value = DateTime.Today; typecreditRadio.Checked = true; GlobalVariable.comboBoxLoadItem(ref comboBox1, "nameCustomer", "Customer WHERE supplier = 'YES'"); insertnumberPOText.Text = insertrangetimeText.Text = ""; insertpurchaseclearButton_Click(sender, e); }
private void resetInput() { dataGridView1.Rows.Clear(); textBox1.Text = ""; comboBox2.SelectedIndex = -1; dateTimePicker1.Value = DateTime.Today; GlobalVariable.comboBoxLoadItem(ref comboBox2, "nameCustomer", "Customer WHERE customer = 'YES'"); resetInputDataGrid(); }
private void comboBox1_TextUpdate(object sender, EventArgs e) { comboBox2.Text = ""; dataGridView1.Rows.Clear(); GlobalVariable.comboBoxLoadItem(ref comboBox2, "orderID", @"Customer[C], (SELECT orderID, buyerCustomerID FROM OrderStatus[OS],Customer[C] WHERE OS.status = 'KELUAR' AND C.customerID = OS.cmtCustomerID AND C.customer = 'YES' AND C.nameCustomer = '" + comboBox3.Text + @"') AS OS2 WHERE C.customerID = OS2.buyerCustomerID AND C.nameCustomer = '" + comboBox1.Text + "'"); }
private void loadComboOrder() { GlobalVariable.comboBoxLoadItem(ref comboBox1, "nameCustomer", "Customer WHERE customer = 'YES'"); GlobalVariable.comboBoxLoadItem(ref comboBox3, "nameCustomer", "Customer WHERE customer = 'YES'"); comboBox2.Text = ""; GlobalVariable.comboBoxLoadItem(ref comboBox2, "orderID", @"Customer[C], (SELECT orderID, buyerCustomerID FROM OrderStatus[OS],Customer[C] WHERE OS.status = 'KELUAR' AND C.customerID = OS.cmtCustomerID AND C.customer = 'YES' AND C.nameCustomer = '" + comboBox3.Text + @"') AS OS2 WHERE C.customerID = OS2.buyerCustomerID AND C.nameCustomer = '" + comboBox1.Text + "'"); }
private void resetHistory() { insertGroup.Enabled = false; insertdateDateTime.Value = DateTime.Today; typecreditRadio.Checked = true; GlobalVariable.comboBoxLoadItem(ref comboBox1, "nameCustomer", "Customer WHERE supplier = 'YES'"); insertnumberPOText.Text = insertrangetimeText.Text = ""; insertpurchaseDataGrid.Rows.Clear(); insertpurchasetotalText.Text = "Rp. 0.00"; resetInput(); }
private void initComp() { dataGridView2.Rows.Clear(); GlobalVariable.comboBoxLoadItem(ref comboBox1, "nameCustomer", "Customer WHERE customer = 'YES'"); GlobalVariable.comboBoxLoadItem(ref comboBox2, "nameCustomer", "Customer WHERE customer = 'YES'"); textBox5.Text = richTextBox1.Text = textBox4.Text = textBox3.Text = ""; radioButton3.Checked = true; dateTimePicker2.Value = DateTime.Today; numericUpDown1.Value = 1; textBox6.Text = "0"; comboBox3.SelectedIndex = 0; }
private void resetButton_Click(object sender, EventArgs e) { productionnumberText.Text = styleText.Text = textText.Text = positionText.Text = machinenumberText.Text = descriptionRich.Text = ""; GlobalVariable.comboBoxLoadItem(ref costumerCombo, "nameCustomer", "Customer WHERE customer = 'YES'"); noRadio.Checked = true; barudanRadio.Checked = true; stitchNumeric.Value = quantityNumeric.Value = 1; //reset image pictureBox1.Image = null; pictureBox1.Invalidate(); pictureBox1.InitialImage = null; dataGridView1.Rows.Clear(); }
private void button4_Click(object sender, EventArgs e) { resetHistory(); //using (SqlConnection conn = new SqlConnection(GlobalVariable.builder)) //{ // conn.Open(); // String query = "DELETE FROM PurchaseList WHERE purchaseID = @purchaseID"; // using (SqlCommand cmd = new SqlCommand(query, conn)) // { // cmd.Parameters.AddWithValue("@purchaseID", comboBox2.Text); // cmd.ExecuteNonQuery(); // } // query = "DELETE FROM Purchase WHERE purchaseID = @purchaseID"; // using (SqlCommand cmd = new SqlCommand(query, conn)) // { // cmd.Parameters.AddWithValue("@purchaseID", comboBox2.Text); // cmd.ExecuteNonQuery(); // } // conn.Close(); //} using (var conn = new SQLiteConnection(GlobalVariable.builder)) { conn.Open(); String query = "DELETE FROM PurchaseList WHERE purchaseID = @purchaseID"; using (var cmd = new SQLiteCommand(query, conn)) { cmd.Parameters.AddWithValue("@purchaseID", comboBox2.Text); cmd.ExecuteNonQuery(); } query = "DELETE FROM Purchase WHERE purchaseID = @purchaseID"; using (var cmd = new SQLiteCommand(query, conn)) { cmd.Parameters.AddWithValue("@purchaseID", comboBox2.Text); cmd.ExecuteNonQuery(); } conn.Close(); } GlobalVariable.comboBoxLoadItem(ref comboBox2, "purchaseID", "Purchase"); MessageBox.Show("Data Berhasil Dihapus"); }
private void initComboBox() { GlobalVariable.comboBoxLoadItem(ref comboBox2, "orderID", "OrderStatus"); GlobalVariable.comboBoxLoadItem(ref comboBox1, "nameCustomer", "Customer WHERE customer = 'YES'"); GlobalVariable.comboBoxLoadItem(ref comboBox3, "nameCustomer", "Customer WHERE customer = 'YES'"); }
private void initComboBox() { GlobalVariable.comboBoxLoadItem(ref updateitemCombo, "nameStock", "Stock"); GlobalVariable.comboBoxLoadItem(ref comboBox4, "nameStock", "Stock"); }
private void initComboBox() { GlobalVariable.comboBoxLoadItem(ref transactionitemnameCombo, "nameStock", "Stock"); }
private void button5_Click(object sender, EventArgs e) { resetHistory(); //using (SqlConnection conn = new SqlConnection(GlobalVariable.builder)) //{ // conn.Open(); // int customerID; // String query = "SELECT * FROM Customer WHERE nameCustomer = @nameCustomer"; // using (SqlCommand cmd = new SqlCommand(query, conn)) // { // cmd.Parameters.AddWithValue("@nameCustomer", comboBox1.Text); // if (cmd.ExecuteScalar() == null) // { // MessageBox.Show("Perusahaan tidak ditemukan"); // return; // } // customerID = (int)cmd.ExecuteScalar(); // } // query = "DELETE FROM CustomerContactPerson WHERE customerID = @customerID"; // using (SqlCommand cmd = new SqlCommand(query, conn)) // { // cmd.Parameters.AddWithValue("@customerID", customerID); // cmd.ExecuteNonQuery(); // } // query = "DELETE FROM CustomerTelephone WHERE customerID = @customerID"; // using (SqlCommand cmd = new SqlCommand(query, conn)) // { // cmd.Parameters.AddWithValue("@customerID", customerID); // cmd.ExecuteNonQuery(); // } // query = "DELETE FROM Customer WHERE customerID = @customerID"; // using (SqlCommand cmd = new SqlCommand(query, conn)) // { // cmd.Parameters.AddWithValue("@customerID", customerID); // cmd.ExecuteNonQuery(); // } // conn.Close(); //} using (var conn = new SQLiteConnection(GlobalVariable.builder)) { conn.Open(); int customerID; String query = "SELECT * FROM Customer WHERE nameCustomer = @nameCustomer"; using (var cmd = new SQLiteCommand(query, conn)) { cmd.Parameters.AddWithValue("@nameCustomer", comboBox1.Text); if (cmd.ExecuteScalar() == null) { MessageBox.Show("Perusahaan tidak ditemukan"); return; } customerID = Convert.ToInt32(cmd.ExecuteScalar()); } query = "DELETE FROM CustomerContactPerson WHERE customerID = @customerID"; using (var cmd = new SQLiteCommand(query, conn)) { cmd.Parameters.AddWithValue("@customerID", customerID); cmd.ExecuteNonQuery(); } query = "DELETE FROM CustomerTelephone WHERE customerID = @customerID"; using (var cmd = new SQLiteCommand(query, conn)) { cmd.Parameters.AddWithValue("@customerID", customerID); cmd.ExecuteNonQuery(); } query = "DELETE FROM Customer WHERE customerID = @customerID"; using (var cmd = new SQLiteCommand(query, conn)) { cmd.Parameters.AddWithValue("@customerID", customerID); cmd.ExecuteNonQuery(); } conn.Close(); } GlobalVariable.comboBoxLoadItem(ref comboBox1, "nameCustomer", "Customer"); MessageBox.Show("Data Berhasil Dihapus"); }
public CustomerChangeForm() { InitializeComponent(); GlobalVariable.comboBoxLoadItem(ref comboBox1, "nameCustomer", "Customer"); }
private void initComboBox() { GlobalVariable.comboBoxLoadItem(ref historynumberPOCombo, "purchaseID", "Purchase"); }
public PurchaseOrderHistoryForm() { InitializeComponent(); initComboBox(); GlobalVariable.comboBoxLoadItem(ref comboBox1, "nameCustomer", "Customer WHERE supplier = 'YES'"); }
public ReceiptInsertForm() { InitializeComponent(); GlobalVariable.comboBoxLoadItem(ref comboBox1, "invoicesID", "Invoice"); GlobalVariable.comboBoxLoadItem(ref comboBox2, "nameCustomer", "Customer WHERE customer = 'YES'"); }
public ReceiptPaymentForm() { InitializeComponent(); GlobalVariable.comboBoxLoadItem(ref comboBox1, "receiptID", "Receipt"); GlobalVariable.comboBoxLoadItem(ref comboBox2, "nameCustomer", "Customer"); }
private void initComboBox() { GlobalVariable.comboBoxLoadItem(ref comboBox1, "receiptID", "Receipt"); GlobalVariable.comboBoxLoadItem(ref comboBox2, "nameCustomer", "Customer WHERE customer = 'YES'"); }
private void initCombo() { GlobalVariable.comboBoxLoadItem(ref comboBox2, "purchaseID", "Purchase"); }
private void resetInputDataGrid() { comboBox1.SelectedIndex = -1; richTextBox1.Text = ""; GlobalVariable.comboBoxLoadItem(ref comboBox1, "invoicesID", "Invoice"); }