private void button1_Click(object sender, EventArgs e)
        {
            string roomID = textBox1.Text;
            string SQL    = "UPDATE Room SET Availability='Vacant',  StartDate=NULL, EndDate=NULL, ID=NULL WHERE RoomID='" + roomID + "'";

            Main.databaseCon(SQL);
            Main.updateRooms();
        }
コード例 #2
0
        private void button2_Click(object sender, EventArgs e)
        {
            string roomID = textBox1.Text;
            string SQL    = "UPDATE Room SET CheckedIn = '" + false + "' WHERE RoomID='" + roomID + "'";

            Main.databaseCon(SQL);
            Main.updateRooms();
        }
コード例 #3
0
 private void button1_Click(object sender, EventArgs e)
 {
     if (goodPrice && CB1 && CB2)
     {
         string SQL = "UPDATE Room SET Price='" + newPrice + "' WHERE OceanView='" + OVorNOV + "' AND Beds ='1 " + QorK + "'";
         Main.databaseCon(SQL);
         Main.updateRooms();
     }
 }
コード例 #4
0
        private void button1_Click(object sender, EventArgs e)
        {
            NewTransactionReview transactionReview = new NewTransactionReview();

            transactionReview.setCustomerInfo(customerInfo);
            transactionReview.Show();
            string SQL  = "INSERT INTO AspNetUsers (UserName, ID, Email, EmailConfirmed, PhoneNumber, FirstName, LastName, Address, City, State, Zip, PhoneNumberConfirmed, TwoFactorEnabled, LockoutEnabled, AccessFailedCount) VALUES ('" + customerInfo[0] + customerInfo[1] + "','" + customerInfo[0] + customerInfo[1] + customerInfo[5] + "','" + customerInfo[7] + "','" + false + "','" + customerInfo[6] + "','" + customerInfo[0] + "','" + customerInfo[1] + "','" + customerInfo[2] + "','" + customerInfo[3] + "','" + customerInfo[4] + "','" + customerInfo[5] + "','" + false + "','" + false + "','" + false + "','" + 0 + "');";
            string SQL2 = "UPDATE Room SET Availability='Occupied',  StartDate='" + customerInfo[8] + "', EndDate='" + customerInfo[9] + "', ID='" + customerInfo[0] + customerInfo[1] + customerInfo[5] + "' WHERE RoomID='" + customerInfo[16] + "'";
            string SQL3 = "INSERT INTO Transaction (Id, Amount) VALUES ('" + customerInfo[0] + customerInfo[1] + customerInfo[5] + "','" + maskedTextBox8.Text + "');";
            string SQL4 = "INSERT INTO Account (id,PaymentType, CreditCardNumber) VALUES ('" + customerInfo[0] + customerInfo[1] + customerInfo[5] + "','" + customerInfo[10] + "','" + maskedTextBox7.Text + "');";

            Console.WriteLine(SQL2);
            Console.WriteLine(SQL3);
            Console.WriteLine(SQL4);
            Main.databaseCon(SQL);
            Main.databaseCon(SQL2);
            //Main.databaseCon(SQL4);
            Main.databaseCon(SQL3);
            Main.updateRooms();
        }
コード例 #5
0
 private void button1_Click(object sender, EventArgs e)
 {
     for (int a = 0; a < 3; a++)
     {
         if (input[0].CompareTo(users[a, 0]) == 0)
         {
             if (input[1].CompareTo(users[a, 1]) == 0)
             {
                 if (users[a, 2].CompareTo("manager") == 0)
                 {
                     Main.manager = true;
                 }
                 Main.validUser = true;
                 int[] tempIndex = { 0, 1 };
                 Main.updateRooms();
                 this.Close();
                 break;
             }
         }
     }
 }