Пример #1
0
        private void FormTambahBahanBaku_Load(object sender, EventArgs e)
        {
            frmDaftar = (FormDaftarBahanBaku)this.Owner;
            pictureBox1.BackgroundImage = null;
            textBoxID.Text                 = "";
            textBoxNama.Text               = "";
            textBoxBagian.Text             = "";
            textBoxUkuranMentah.Text       = "";
            textBoxUkuranLuasan.Text       = "";
            textBoxUkuranJadi.Text         = "";
            numericUpDownStok.Value        = 0;
            numericUpDownStok.Enabled      = false;
            numericUpDownHargaSatuan.Value = 0;
            comboBoxSupplier.SelectedIndex = -1;
            comboBoxSupplier.Items.Clear();
            string hasil = Supplier.BacaData("", "", listHasilDataSupplier);

            if (hasil == "1")
            {
                for (int i = 0; i < listHasilDataSupplier.Count; i++)
                {
                    comboBoxSupplier.Items.Add(listHasilDataSupplier[i].IdSupplier + " - " + listHasilDataSupplier[i].Nama);
                }
            }
            else
            {
                MessageBox.Show(hasil, "Error");
            }
        }
        private void bahanBakuToolStripMenuItem_Click(object sender, EventArgs e)
        {
            Form form = Application.OpenForms["FormDaftarBahanBaku"];

            if (form == null)
            {
                FormDaftarBahanBaku frm = new FormDaftarBahanBaku();
                frm.Owner = this;
                frm.Show();
            }
            else
            {
                form.Show();
                form.BringToFront();
            }
        }
Пример #3
0
        private void FormHapusBahanBaku_Load(object sender, EventArgs e)
        {
            frmDaftar = (FormDaftarBahanBaku)this.Owner;

            textBoxID.Text           = "";
            textBoxNama.Text         = "";
            textBoxBagian.Text       = "";
            textBoxUkuranMentah.Text = "";
            textBoxUkuranLuasan.Text = "";
            textBoxUkuranJadi.Text   = "";
            textBoxSupplier.Text     = "";

            textBoxNama.Enabled         = false;
            textBoxBagian.Enabled       = false;
            textBoxUkuranMentah.Enabled = false;
            textBoxUkuranLuasan.Enabled = false;
            textBoxUkuranJadi.Enabled   = false;
            textBoxSupplier.Enabled     = false;

            numericUpDownStok.Value   = 0;
            numericUpDownStok.Enabled = false;

            numericUpDownHargaSatuan.Value = 0;
        }