Exemple #1
0
        private void btn_edit_Click(object sender, EventArgs e)
        {
            var baris = dgv_data_pegawai.CurrentRow.Index;

            var data = peg.get_pegawai(dgv_data_pegawai.Rows[baris].Cells[0].Value.ToString());

            pegawai_form anggota_form = new pegawai_form(this);

            anggota_form.label_header.Text = "Edit Pegawai";
            anggota_form.txt_id.ReadOnly   = true;
            anggota_form.txt_id.Text       = data[0];
            anggota_form.txt_nama.Text     = data[1];
            anggota_form.txt_alamat.Text   = data[2];
            anggota_form.txt_telp.Text     = data[3];
            anggota_form.cmb_level.Text    = data[4];
            if (data[5] == "y")
            {
                anggota_form.check_aktif.Checked = true;
            }
            else
            {
                anggota_form.check_aktif.Checked = false;
            }
            anggota_form.label_pass_info.Visible = true;
            anggota_form.btn_tambah.Visible      = false;
            anggota_form.btn_update.Visible      = true;
            anggota_form.ShowDialog();
        }
Exemple #2
0
        private void btn_tambah_Click(object sender, EventArgs e)
        {
            pegawai_form frmact = new pegawai_form(this);

            frmact.ShowDialog();
        }