Пример #1
0
        public void AddPegawai()
        {
            PegawaiController pc = new PegawaiController();
            int count1 = (pc.ShowData().Count()) + 1;

            using (HospitalEntities context = new HospitalEntities())
            {
                int result = (int)(context.GetNewPegawaiId().FirstOrDefault());
                if (result > -1)
                {
                    Pegawai p = new Pegawai()
                    {
                        ID_Pegawai = result,
                        Jenis_Pegawai = "Dokter",
                        Nama_Pegawai = "Ipir",
                        Alamat_Pegawai = "Keputih",
                        Telp_Pegawai = 0912,
                        Kota = "asd",
                        Email = "asdfs"
                    };
                    //PegawaiController pac = new PegawaiController();
                    pc.AddPegawi(p);
                }

                int count2 = pc.ShowData().Count();

                Assert.AreEqual(count1, count2, "Wrong");

            }
        }
Пример #2
0
 public Karyawan()
 {
     InitializeComponent();
     controller = new PegawaiController();
     InisialisasiListView();
     LoadDataPegawai();
     LoadDropdownJbt();
 }