Exemplo n.º 1
0
        private void loadDataDepartemen()
        {
            try
            {
                List <Departemen> daftarDept = deptDAO.GetAll();
                DGV.DataSource = daftarDept.ToArray();
                DGV.ReadOnly   = true;

                //Set otomatis lebar kolom
                DGV.Columns[0].AutoSizeMode = DataGridViewAutoSizeColumnMode.AllCells;
                DGV.Columns[1].AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
                DGV.AutoSizeRowsMode        = DataGridViewAutoSizeRowsMode.AllCells;
            }
            catch (Exception ex)
            {
                errorDBox(ex.Message.ToString(), "loadDataDepartemen");
            }
        }
 [TestMethod]//okpass
 public void TestGetall()
 {
     Assert.IsNotNull(aDAO.GetAll());
 }