Exemple #1
0
        private void lbiupipr_Click(object sender, EventArgs e)
        {
            FormListIup fp = new FormListIup();

            fp.TopLevel = false;
            SplitContainer1.Panel2.Controls.Add(fp);
            fp._idtahapKegiatan = "3";
            fp.LabelInfo.Text   = "Pencarian Data IUP IPR";
            fp.Show();
            fp.BringToFront();
        }
Exemple #2
0
        private void lbtnIupEp_Click(object sender, EventArgs e)
        {
            foreach (Form childForm in this.SplitContainer1.Panel2.Controls)
            {
                childForm.Close();
            }

            FormListIup fp = new FormListIup();

            fp.TopLevel = false;
            SplitContainer1.Panel2.Controls.Add(fp);
            fp.Show();
            fp.LabelInfo.Text = "Pencarian Data IUP Ekplorasi";
            // fp.Label1.Text = "1";
            // fp.tampilGrid();
            fp.BringToFront();
        }
Exemple #3
0
        private void FormIup_Load(object sender, EventArgs e)
        {
            dbConnect.CloseConnection();
            this.tampilComboPerusahaan(cbbPerusahaan, "namaPerusahaan", "idPerusahaan");
            this.tampilComboLokasi(cbbLokasi, "alamatLokasi", "idLokasi");
            this.tampilComboKomoditi(cbbKomoditi, "namaBahanGalian", "idBahanGalian");
            this.tampilComboTahap(cbbTahapKegiatan, "namaTahapKegiatan", "idTahapKegiatan");
            this.tampilComboJenis(cbbJenisPerizinan, "namaPerizinan", "idJenisPerizinan");
            try
            {
                if (btnSimpan.Text == "Edit")
                {
                    string sql = "select * from esdm_izin_perusahaan ew " +
                                 "inner join esdm_perusahaan ep on ew.idPerusahaan=ep.idPerusahaan " +
                                 "inner join esdm_lokasi el on ew.idLokasi=el.idLokasi " +
                                 "inner join esdm_bahan_galian bg on ew.idBahanGalian=bg.idBahanGalian " +
                                 "inner join esdm_tahap_kegiatan tk on ew.idTahapKegiatan=tk.idTahapKegiatan " +
                                 "where  idIzinPerusahaan='" + this.idizin + "'";
                    if (dbConnect.OpenConnection() == true)
                    {
                        MySqlCommand    cmd        = new MySqlCommand(sql, dbConnect.connection);
                        MySqlDataReader dataReader = cmd.ExecuteReader();
                        while (dataReader.Read())
                        {
                            __cbPerusahaan  = dataReader["namaPerusahaan"] + "";
                            __NoIzinTextBox = dataReader["nomorSK"] + "";
                            __tglPickertb   = dataReader["tglBerlaku"].ToString() + "";
                            __tglPickertk   = dataReader["tglKadaluwarsa"].ToString() + "";
                            __cbbLokasi     = dataReader["alamatLokasi"].ToString() + "";
                            __cnc           = dataReader["cnc"].ToString() + "";
                            string b1 = dataReader["luasWilayahTambang"].ToString() + "";
                            string b2 = dataReader["luasWilayahPenunjang"].ToString() + "";
                            var    k  = "";
                            var    l  = "";
                            if (b1.Contains(",") || b2.Contains(","))
                            {
                                k = b1.Replace(",", ".");
                                l = b2.Replace(",", ".");
                                __txtLuasTambang   = k;
                                __txtLuasPenunjang = l;
                            }
                            else
                            {
                                __txtLuasTambang   = dataReader["luasWilayahTambang"].ToString() + "";
                                __txtLuasPenunjang = dataReader["luasWilayahPenunjang"].ToString() + "";
                            }

                            __tahap           = dataReader["namaTahapKegiatan"].ToString() + "";
                            __namaBahanGalian = dataReader["namaBahanGalian"].ToString() + "";
                        }
                        dataReader.Close();
                        dbConnect.CloseConnection();
                        cbbPerusahaan.Text    = __cbPerusahaan;
                        txtNomorSK.Text       = __NoIzinTextBox;
                        tb.Value              = Convert.ToDateTime(__tglPickertb);
                        tk.Value              = Convert.ToDateTime(__tglPickertk);
                        cbbLokasi.Text        = __cbbLokasi;
                        txtLuasTambang.Text   = __txtLuasTambang;
                        txtLuasPenunjang.Text = __txtLuasPenunjang;
                        cbbKomoditi.Text      = __namaBahanGalian;
                        cbbTahapKegiatan.Text = __tahap;
                        cbbCNC.Text           = __cnc;
                    }
                }
                else
                {
                    tb.Value = DateTime.Now;
                    tk.Value = DateTime.Now;

                    FormListIup fp = new FormListIup();
                    cbbTahapKegiatan.SelectedValue = this.Idtahap;
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
Exemple #4
0
 public FormIup(FormListIup formListIup)
 {
     InitializeComponent();
     dbConnect           = new DBConnect();
     this.frmFormListIup = formListIup;
 }