private void textBoxCari_TextChanged(object sender, EventArgs e)
        {
            if (textBoxCari.Text == "")
            {
                string hasilBaca = Penerimaan.BacaData("", "", listHasilData);

                if (hasilBaca == "1")
                {
                    dataGridViewPenerimaan.Rows.Clear();

                    for (int i = 0; i < listHasilData.Count; i++)
                    {
                        if (listHasilData[i].JenisPengiriman == "SP")
                        {
                            jenis = "Shipping Point";
                        }
                        else
                        {
                            jenis = "Destination Point";
                        }
                        string total = listHasilData[i].BiayaKirim.ToString("RP 0,###");
                        dataGridViewPenerimaan.Rows.Add(listHasilData[i].KodePenerimaan, jenis,
                                                        total, listHasilData[i].TglTerima.ToString("dddd, dd MMMM yyyy"), listHasilData[i].Nama, listHasilData[i].Keterangan,
                                                        listHasilData[i].NotaPembelian.NoNotaPembelian);
                    }
                }
            }
        }
Exemple #2
0
        private void textBoxCari_TextChanged(object sender, EventArgs e)
        {
            string kriteria = "";

            if (comboBoxCari.Text == "Nomor Dokumen")
            {
                kriteria = "PT.nomor";
            }
            else if (comboBoxCari.Text == "Nomor Dokumen Pengiriman")
            {
                kriteria = "PT.nomor_dokumen_pengiriman";
            }
            else if (comboBoxCari.Text == "Nama")
            {
                kriteria = "PT.nama";
            }
            else if (comboBoxCari.Text == "Alamat")
            {
                kriteria = "PT.Alamat";
            }

            string hasilBaca = Penerimaan.BacaData(kriteria, textBoxCari.Text, listHasilData);

            if (hasilBaca == "1")
            {
                dataGridViewPengiriman.Rows.Clear();

                for (int i = 0; i < listHasilData.Count; i++)
                {
                    dataGridViewPengiriman.Rows.Add(listHasilData[i].Nomor, listHasilData[i].NomorPengiriman.NomorDokumen, listHasilData[i].Tanggal,
                                                    listHasilData[i].Nama, listHasilData[i].Alamat, listHasilData[i].Keterangan);
                }
            }
        }
        public void FormDaftarPenerimaan_Load(object sender, EventArgs e)
        {
            comboBoxCari.Items.AddRange(new string[] { "Kode Penerimaan", "Jenis Penerimaan", "Biaya Kirim", "Tanggal Terima", "Nama", "Keterangan", "Nomor Nota Pembelian" });

            this.Location = new Point(0, 0);
            comboBoxCari.DropDownStyle = ComboBoxStyle.DropDownList;

            FormatDataGrid();

            string hasilBaca = Penerimaan.BacaData("", "", listHasilData);

            if (hasilBaca == "1")
            {
                dataGridViewPenerimaan.Rows.Clear();

                for (int i = 0; i < listHasilData.Count; i++)
                {
                    if (listHasilData[i].JenisPengiriman == "SP")
                    {
                        jenis = "Shipping Point";
                    }
                    else
                    {
                        jenis = "Destination Point";
                    }
                    string total = listHasilData[i].BiayaKirim.ToString("RP 0,###");
                    dataGridViewPenerimaan.Rows.Add(listHasilData[i].KodePenerimaan, jenis,
                                                    total, listHasilData[i].TglTerima.ToString("dddd, dd MMMM yyyy"), listHasilData[i].Nama, listHasilData[i].Keterangan,
                                                    listHasilData[i].NotaPembelian.NoNotaPembelian);
                }
            }
        }
Exemple #4
0
        public void FormDaftarPenerimaan_Load_1(object sender, EventArgs e)
        {
            comboBoxCari.DropDownStyle = ComboBoxStyle.DropDownList;

            FormatDataGrid();

            listHasilData.Clear();
            string hasilBaca = Penerimaan.BacaData("", "", listHasilData);

            if (hasilBaca == "1")
            {
                dataGridViewPengiriman.Rows.Clear();

                for (int i = 0; i < listHasilData.Count; i++)
                {
                    if (File.Exists(Application.StartupPath + "\\Images\\Penerimaan\\" + listHasilData[i].Nomor + ".jpg"))
                    {
                        Image m = GetCopyImage(Application.StartupPath + "\\Images\\Penerimaan\\" + listHasilData[i].Nomor + ".jpg");
                        dataGridViewPengiriman.Rows.Add(listHasilData[i].Nomor, listHasilData[i].NomorPengiriman.NomorDokumen, listHasilData[i].Tanggal,
                                                        listHasilData[i].Nama, listHasilData[i].Alamat, listHasilData[i].Keterangan, m);
                    }
                    else
                    {
                        dataGridViewPengiriman.Rows.Add(listHasilData[i].Nomor, listHasilData[i].NomorPengiriman.NomorDokumen, listHasilData[i].Tanggal,
                                                        listHasilData[i].Nama, listHasilData[i].Alamat, listHasilData[i].Keterangan, null);
                    }
                }
            }
        }
        private void buttonCari_Click(object sender, EventArgs e)
        {
            string nilaiKriteria = textBoxCari.Text;

            if (comboBoxCari.Text == "Kode Penerimaan")
            {
                kriteria = "kodePenerimaan";
            }
            else if (comboBoxCari.Text == "Jenis Penerimaan")
            {
                kriteria = "jenisPenerimaan";
            }
            else if (comboBoxCari.Text == "Biaya Kirim")
            {
                kriteria = "biayaKirim";
            }
            else if (comboBoxCari.Text == "Tanggal Terima")
            {
                kriteria = "tglTerima";
            }
            else if (comboBoxCari.Text == "Nama")
            {
                kriteria = "nama";
            }
            else if (comboBoxCari.Text == "Keterangan")
            {
                kriteria = "keterangan";
            }
            else if (comboBoxCari.Text == "Nomor Nota Pembelian")
            {
                kriteria = "noNotaPembelian";
            }

            string hasilBaca = Penerimaan.BacaData(kriteria, nilaiKriteria, listHasilData);

            if (hasilBaca == "1")
            {
                dataGridViewPenerimaan.Rows.Clear();

                for (int i = 0; i < listHasilData.Count; i++)
                {
                    if (listHasilData[i].JenisPengiriman == "SP")
                    {
                        jenis = "Shipping Point";
                    }
                    else
                    {
                        jenis = "Destination Point";
                    }
                    string total = listHasilData[i].BiayaKirim.ToString("RP 0,###");
                    dataGridViewPenerimaan.Rows.Add(listHasilData[i].KodePenerimaan, jenis,
                                                    total, listHasilData[i].TglTerima.ToString("dddd, dd MMMM yyyy"), listHasilData[i].Nama, listHasilData[i].Keterangan,
                                                    listHasilData[i].NotaPembelian.NoNotaPembelian);
                }
            }
        }