Exemplo n.º 1
0
        private void GetDialogResult(frmPegawaiLookupHRD dialogForm)
        {
            this.nip = dialogForm._NIP;
            this.commonTextBox1.Text = dialogForm._Nama;
            this.unitkerja           = dialogForm._Unitkerja;
            this.lp         = dialogForm._LP;
            this.jabatan    = dialogForm._Jabatan;
            this.alamat     = dialogForm._Alamat;
            this.no_telp    = dialogForm._NoTelp;
            this.tgl_lahir  = dialogForm._TglLahir;
            this.tgl_masuk  = dialogForm._TglMasuk;
            this.keterangan = dialogForm._Keterangan;

            if (this.SelectData != null)
            {
                this.SelectData(this, new EventArgs());
            }
        }
Exemplo n.º 2
0
 private void ShowDialogForm()
 {
     try
     {
         DataTable dtPegawai = new DataTable();
         using (Database db = new Database(GlobalVar.DBName))
         {
             db.Commands.Add(db.CreateCommand("usp_Lookup_Pegawai"));
             db.Commands[0].Parameters.Add(new Parameter("@str", SqlDbType.VarChar, commonTextBox1.Text));
             dtPegawai = db.Commands[0].ExecuteDataTable();
         }
         frmPegawaiLookupHRD ifrmDialog = new frmPegawaiLookupHRD(dtPegawai);
         ifrmDialog.ShowDialog();
         if (ifrmDialog.DialogResult == DialogResult.OK)
         {
             GetDialogResult(ifrmDialog);
         }
     }
     catch (Exception ex)
     {
         Error.LogError(ex);
     }
 }