Ejemplo n.º 1
0
        private void delete()
        {
            epg = new EntPegawai();

            epg.Nip = sendNip;

            condition = ipg.delete(epg, logTransactionDelete());

            if (condition)
            {
                message = "Data berhasil di hapus";

                MessageBox.Show(message, "Informasi - SIMKAP 1.0.0",
                                MessageBoxButtons.OK, MessageBoxIcon.Information);

                setDataPegawai();
            }
            else
            {
                message = "Data gagal di hapus";

                MessageBox.Show(message, "Pesan Kesalahan - SIMKAP 1.0.0",
                                MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
        public bool validationInsert(EntPegawai et)
        {
            query = "SpValidationInsertPegawai";

            dbParams = new SqlParameter[]
            {
                new SqlParameter("@jabatan", et.Jabatan)
            };

            table = "Pegawai";
            dt    = new DataTable();

            condition = connect.eksekusiQuery(query, dbParams, false);

            if (condition)
            {
                connect.viewTable(table).Fill(dt);

                if (dt.Rows.Count > 0)
                {
                    status = true;
                }
                else
                {
                    status = false;
                }
            }

            return(status);
        }
Ejemplo n.º 3
0
        private void getEntity()
        {
            ep = new EntPegawai();

            ep.Nip        = txtNip.Text;
            ep.Nama       = txtNama.Text;
            ep.Pagolru    = txtPangkat.Text;
            ep.Jabatan    = txtJabatan.Text;
            ep.Idunit     = cmbUnitKerja.SelectedValue.ToString();
            ep.Keterangan = cmbKeterangan.SelectedItem.ToString();
        }
        public bool delete(EntPegawai et, string dt)
        {
            query = "SpDeletePegawai";

            dbParams = new SqlParameter[]
            {
                new SqlParameter("@nip", et.Nip)
            };

            condition = connect.eksekusiQuery(query, dbParams, false);

            ls = new ImpLogServer();
            ls.writeLogTrasaction(dt);

            return(condition);
        }
        public bool edit(EntPegawai et, string dt)
        {
            query = "SpEditPegawai";

            dbParams = new SqlParameter[]
            {
                new SqlParameter("@nip", et.Nip),
                new SqlParameter("@nama", et.Nama),
                new SqlParameter("@pagolru", et.Pagolru),
                new SqlParameter("@jabatan", et.Jabatan),
                new SqlParameter("@idunit", et.Idunit),
                new SqlParameter("@keterangan", et.Keterangan)
            };

            condition = connect.eksekusiQuery(query, dbParams, false);

            ls = new ImpLogServer();
            ls.writeLogTrasaction(dt);

            return(condition);
        }