Esempio n. 1
0
        public void DeleteBoats(int userChoice, int userBoatChoice)
        {
            string showBoatQuery = "CALL `displayBoat`" + "(" + userChoice + ");";

            sqlConnection.DeleteBoatSQL(showBoatQuery);

            string deleteBoatQuery = "CALL `deleteBoat`" + "(" + userBoatChoice + ");";

            sqlConnection.DeleteBoatSQL(deleteBoatQuery);
        }
Esempio n. 2
0
        public static void EditBoats()
        {
            ShowUser.ShowUsers();

            Console.WriteLine("");
            Console.Write("Vilken medlem vill du ändra en båt hos: ");
            int userChoice = int.Parse(Console.ReadLine());

            string showBoatQuery = "CALL `displayBoat`" + "(" + userChoice + ");";

            SQLconnection.DeleteBoatSQL(showBoatQuery);

            Console.WriteLine("Vilken båt vill ändra..?");
            int userBoatChoice = int.Parse(Console.ReadLine());

            Console.WriteLine("Ange nya båtvärden..");

            Console.WriteLine("Ny båtlängd:");
            string newBoatLength = Console.ReadLine();

            Console.WriteLine("Ange en ny båttyp:");
            Console.WriteLine("1.Segelbåt 2.Motorseglare 3.Motorbåt 4.Kajak/Kanot 5.Övrigt");
            string newBoatype = Console.ReadLine();

            string editBoatQuery = "UPDATE boat SET boattypeID='" + newBoatype + "'" + ", boatlength='" + newBoatLength + "'" + " WHERE boatID='" + userBoatChoice + "'";

            SQLconnection.con(editBoatQuery);

            Console.Clear();
            Presentation.BoatIsEdited();
            Program.ContinueOnKeyPressed();
        }
Esempio n. 3
0
        public void EditBoats(int userChoice, int userBoatChoice, string newBoatLength, string newBoatype)
        {
            string showBoatQuery = "CALL `displayBoat`" + "(" + userChoice + ");";

            sqlConnection.DeleteBoatSQL(showBoatQuery);

            string editBoatQuery = "UPDATE boat SET boattypeID='" + newBoatype + "'" + ", boatlength='" + newBoatLength + "'" + " WHERE boatID='" + userBoatChoice + "'";

            sqlConnection.AddUserAndEditBoatSQL(editBoatQuery);
        }
Esempio n. 4
0
        public static void DeleteUsers()
        {
            Presentation.DeletePresentation();

            ShowUser.ShowUsers();

            Console.WriteLine("Vilken användare vill du ta bort?: ");
            int deleteChoice = int.Parse(Console.ReadLine());

            string deleteMemberQuery = "CALL `deleteMember`" + "(" + deleteChoice + ");";

            SQLconnection.DeleteBoatSQL(deleteMemberQuery);

            Console.WriteLine("Nu är medlemmen borttagen");
        }
Esempio n. 5
0
        public static void DeleteUsers()
        {
            Presentation.DeletePresentation();
            ShowUser.ShowUsers();

            Console.WriteLine("");
            Console.Write("Vilken användare vill du ta bort?: ");
            int deleteChoice = int.Parse(Console.ReadLine());

            string deleteMemberQuery = "CALL `deleteMember`" + "(" + deleteChoice + ");";

            SQLconnection.DeleteBoatSQL(deleteMemberQuery);

            Console.Clear();
            Presentation.UserIsDeleted();
            Program.ContinueOnKeyPressed();
        }
Esempio n. 6
0
        public static void DeleteBoats()
        {
            ShowUser.ShowUsers();

            Console.WriteLine("Vilken medlem vill du ta bort en båt hos..?");
            int userChoice = int.Parse(Console.ReadLine());

            string showBoatQuery = "CALL `displayBoat`" + "(" + userChoice + ");";

            SQLconnection.DeleteBoatSQL(showBoatQuery);

            Console.WriteLine("Vilken båt vill du ta bort..?");
            int userBoatChoice = int.Parse(Console.ReadLine());

            string deleteBoatQuery = "CALL `deleteBoat`" + "(" + userBoatChoice + ");";

            SQLconnection.DeleteBoatSQL(deleteBoatQuery);

            Console.WriteLine("Nu är din båt borttagen din jävla sexiga hukk!");
        }
Esempio n. 7
0
        public static void DeleteBoats()
        {
            ShowUser.ShowUsers();

            Console.WriteLine("Vilken medlem vill du ta bort en båt hos..?");
            int userChoice = int.Parse(Console.ReadLine());

            string showBoatQuery = "CALL `displayBoat`" + "(" + userChoice + ");";

            SQLconnection.DeleteBoatSQL(showBoatQuery);

            Console.WriteLine("Vilken båt vill du ta bort..?");
            int userBoatChoice = int.Parse(Console.ReadLine());

            string deleteBoatQuery = "CALL `deleteBoat`" + "(" + userBoatChoice + ");";

            SQLconnection.DeleteBoatSQL(deleteBoatQuery);

            Console.Clear();
            Presentation.BoatIsDeleted();
            Program.ContinueOnKeyPressed();
        }
Esempio n. 8
0
        public void DeleteUsers(int deleteChoice)
        {
            string deleteMemberQuery = "CALL `deleteMember`" + "(" + deleteChoice + ");";

            sqlConnection.DeleteBoatSQL(deleteMemberQuery);
        }