Ejemplo n.º 1
0
        public void m4()
        {
            int    menu4, input1, input2, input3, input5, input6, input7;
            string input4;

m4:
            Console.Clear();
            Console.WriteLine("================== DELETE ===================");
            isimenu();
            Console.Write("Tentukan Pilihanmu : "); menu4 = Convert.ToInt32(Console.ReadLine());
            switch (menu4)
            {
            case 1:
                System.Console.Write("Masukkan Id yang ingin di hapus : ");
                input1 = Convert.ToInt32(System.Console.ReadLine());
                RoleController panggilrole = new RoleController();
                panggilrole.DeleteRole(input1);
                Console.WriteLine("=============================================");
                Console.WriteLine("Sukses");
                break;

            case 2:
                System.Console.Write("Masukkan Id yang ingin di hapus : ");
                input2 = Convert.ToInt32(System.Console.ReadLine());
                DepartmentController panggildept = new DepartmentController();
                panggildept.DeleteDepartment(input2);
                Console.WriteLine("=============================================");
                Console.WriteLine("Sukses");
                break;

            case 3:
                System.Console.Write("Masukkan Id yang ingin di hapus : ");
                input3 = Convert.ToInt32(System.Console.ReadLine());
                UserController panggiluser = new UserController();
                panggiluser.DeleteUser(input3);
                Console.WriteLine("=============================================");
                Console.WriteLine("Sukses");
                break;

            case 4:
                System.Console.Write("Masukkan Id yang ingin di hapus : ");
                input4 = System.Console.ReadLine();
                TypeController panggildd = new TypeController();
                panggildd.DeleteDueDate(input4);
                Console.WriteLine("=============================================");
                Console.WriteLine("Sukses");
                break;

            case 5:
                System.Console.Write("Masukkan Id yang ingin di hapus : ");
                input5 = Convert.ToInt32(System.Console.ReadLine());
                CategoryController panggilcat = new CategoryController();
                panggilcat.DeleteCategory(input5);
                Console.WriteLine("=============================================");
                Console.WriteLine("Sukses");
                break;

            case 6:
                System.Console.Write("Masukkan Id yang ingin di hapus : ");
                input6 = Convert.ToInt32(System.Console.ReadLine());
                SubCategoryController panggilsubcat = new SubCategoryController();
                panggilsubcat.DeleteSubCategory(input6);
                Console.WriteLine("=============================================");
                Console.WriteLine("Sukses");
                break;

            case 7:
                System.Console.Write("Masukkan Id yang ingin di hapus : ");
                input7 = Convert.ToInt32(System.Console.ReadLine());
                TicketController panggiltck = new TicketController();
                panggiltck.DeleteTicket(input7);
                Console.Clear();
                Console.WriteLine("Press Any Key...");
                break;

            default:
                Console.WriteLine("Input Salah !!");
                Console.WriteLine("\n");
                goto m4;
            }
        }