private void dataGridView1_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
        {
            id = dataGridView1.Rows[e.RowIndex].Cells[0].Value.ToString();
            for (int i = 0; i < listid.Count(); i++)
            {
                if (listid[i] == id)
                {
                    index = i;
                }
            }
            this.Close();
            FormBarang g = new FormBarang();

            g.Show();
        }
        private void btnNew_Click(object sender, EventArgs e)
        {
            view = false; FormFindPenjualan.index = -1;
            activate(); loadbarang(); btnCancel.Enabled = true;
            DateTime date    = DateTime.Now;
            string   tanggal = date.Day.ToString();
            string   bulan   = date.Month.ToString();
            string   tahun   = date.Year.ToString();

            tanggal = tanggal.PadLeft(2, '0');
            bulan   = bulan.PadLeft(2, '0');
            string thn         = tahun.Substring(2, 2);
            string tanggalfull = tanggal + "-" + bulan + "-" + thn;

            tbTanggal.Text   = tanggalfull;
            tbKodeJual1.Text = thn + bulan;
            tbKodeJual.Text  = "PJ";
            FormBarang.selecttextbox(tbKodeJual);
            this.ActiveControl       = tbKodeJual;
            dataGridView1.DataSource = null; dataGridView1.Refresh();
            generatekodejual(tbKodeJual.Text, tbKodeJual1.Text);
            settingdatagrid();
        }
Beispiel #3
0
        private void tbKodeBarang_Enter(object sender, EventArgs e)
        {
            TextBox t = (TextBox)sender;

            FormBarang.selecttextbox(t);
        }
Beispiel #4
0
        private void produkToolStripMenuItem_Click(object sender, EventArgs e)
        {
            FormBarang f = new FormBarang();

            f.Show();
        }