Esempio n. 1
0
        private void buttonSubmit_Click(object sender, EventArgs e)
        {
            int    num;
            string str;

            for (num = 0; num < this.dataGridView1.RowCount; num++)
            {
                this.dataGridView1.Rows[num].DefaultCellStyle.BackColor = Color.White;
                str = this.dataGridView1.Rows[num].Cells[1].Value.ToString();
                if (this.dataGridView1.Rows[num].Cells[2].Value.ToString().Equals(""))
                {
                    MessageBox.Show("Give Quantity: ");
                    this.dataGridView1.Rows[num].DefaultCellStyle.BackColor = Color.Blue;
                    return;
                }
            }
            string query = "DELETE FROM firoz_center.tbl_temp_order";

            dbc.Delete(query);
            for (num = 0; num < this.dataGridView1.RowCount; num++)
            {
                str = this.dataGridView1.Rows[num].Cells[1].Value.ToString();
                string str2 = this.dataGridView1.Rows[num].Cells[2].Value.ToString();
                string str4 = "Insert into firoz_center.tbl_temp_order(`order_id`,`parts_no`,`quantity`) values ('" + this.textBoxInvoiceNo.Text + "','" + str + "', '" + str2 + "');";
                dbc.Insert(str4);
            }
            MessageBox.Show("Order Added");
            base.Dispose();
        }
Esempio n. 2
0
        private void save_transcation()
        {
            string sid = this.textBoxSID.Text;

            string query = "DELETE from firoz_center.tbl_servicing where servicing_id='" + sid + "';";

            dbc.Delete(query);

            MessageBox.Show("Data Deleted");
        }
Esempio n. 3
0
        private void save_transcation()
        {
            DBConnect connect = new DBConnect();
            string    str2    = this.comboBoxPartsNo.SelectedItem.ToString();
            string    str3    = this.comboBoxDescip.SelectedItem.ToString();
            string    str4    = this.comboBoxDate.SelectedItem.ToString();
            string    query   = "DELETE from firoz_center.tbl_parts_info where partsNo='" + this.comboBoxPartsNo.SelectedItem.ToString() + "' and date = '" + this.comboBoxDate.SelectedItem.ToString() + "' and `group` = '" + this.comboBoxParty.SelectedItem.ToString() + "';";

            connect.Delete(query);
            this.textBoxPurchasePrice.Text  = "";
            this.textBoxRetailPrice.Text    = "";
            this.textBoxWholeSalePrice.Text = "";
            this.textBoxDealerPrice.Text    = "";
            this.textBoxD.Text = "";
            this.textBoxR.Text = "";
            this.textBoxW.Text = "";
            MessageBox.Show("Parts Deleted");
        }
Esempio n. 4
0
        private void dataGridView1_RowHeaderMouseDoubleClick(object sender, DataGridViewCellMouseEventArgs e)
        {
            if (MessageBox.Show("Do you want to delete?", "Delete", MessageBoxButtons.YesNo) == DialogResult.Yes)
            {
                string sid = this.dataGridView1.Rows[e.RowIndex].Cells[1].Value.ToString();

                string query = "DELETE from firoz_center.tbl_servicing where servicing_id='" + sid + "';";
                dbc.Delete(query);

                MessageBox.Show("Data Deleted!");

                string memo_no = textBoxMemoNo.Text;
                string name    = textBoxName.Text;
                string contact = textBoxContact.Text;
                string dt      = textBoxDate.Text;

                ServicingDetails SD = new ServicingDetails(memo_no, name, contact, dt);
                SD.Show();

                this.Dispose();
            }
        }