Esempio n. 1
0
        private void btnEditRoom_Click(object sender, EventArgs e)
        {
            string   id     = idRoom.Text;
            string   sn     = snRoom.Text;
            string   area   = areaRoom.Text;
            string   status = statusRoom.Text;
            Room_DTO room   = new Room_DTO(id, sn, area, status);

            Room_BUS.EditRoom(room);
        }
Esempio n. 2
0
        private void button1_Click(object sender, EventArgs e)
        {
            string id     = idAddRoom.Text;
            string sn     = seatNumberAddRoom.Text;
            string area   = areaAddRoom.Text;
            string status = statusAddRoom.Text;

            Room_DTO room = new Room_DTO(id, sn, area, status);

            Room_BUS.AddRoom(room);
            MessageBox.Show("Complete!", "Add a room", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
            this.Close();
        }
Esempio n. 3
0
 private void btnEditRoom_Click(object sender, EventArgs e)
 {
     if (gridRoom.RowCount > 0)
     {
         DataRow row = gridRoom.GetDataRow(gridRoom.GetSelectedRows()[0]);
         EditRoom.oldInfo = row;
         EditRoom edit = new EditRoom();
         edit.ShowDialog();
         dgvListRoom.DataSource = Room_BUS.ListRoom();
     }
     else
     {
         MessageBox.Show("Error!", "My Application", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
     }
 }
Esempio n. 4
0
 private void btnDeleteShow_Click(object sender, EventArgs e)
 {
     if (gridShow.RowCount > 0)
     {
         DataRow      row          = gridShow.GetDataRow(gridShow.GetSelectedRows()[0]);
         DialogResult dialogResult = MessageBox.Show("Are you sure?", "Delete showtime", MessageBoxButtons.YesNo);
         if (dialogResult == DialogResult.Yes)
         {
             Room_BUS.DeleteRoom(row["IDShowtime"].ToString());
             MessageBox.Show("Showtime was deleted", "My Application", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
         }
         dgvListShow.DataSource = Showtime_BUS.ListShowtime();
     }
     else
     {
         MessageBox.Show("Error!", "My Application", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
     }
 }
Esempio n. 5
0
 private void btnDeleteAccount_Click(object sender, EventArgs e)
 {
     if (gridAccount.RowCount > 0)
     {
         DataRow      row          = gridAccount.GetDataRow(gridAccount.GetSelectedRows()[0]);
         DialogResult dialogResult = MessageBox.Show("Are you sure?", "Delete room", MessageBoxButtons.YesNo);
         if (dialogResult == DialogResult.Yes)
         {
             Account_BUS.DeleteAccount(row["IDAccount"].ToString());
             MessageBox.Show("Account was deleted", "My Application", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
         }
         dgvListAccount.DataSource = Room_BUS.ListRoom();
     }
     else
     {
         MessageBox.Show("Error!", "My Application", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
     }
 }
Esempio n. 6
0
 private void btnUpdate_Click(object sender, EventArgs e)
 {
     dgvListRoom.DataSource = Room_BUS.ListRoom();
 }
Esempio n. 7
0
 private void ListRoom_Load(object sender, EventArgs e)
 {
     dgvListRoom.DataSource = Room_BUS.ListRoom();
 }
Esempio n. 8
0
 private void btnSearchRoom_Click(object sender, EventArgs e)
 {
     dgvListRoom.DataSource = Room_BUS.FindRoomById(searchRoom.Text.ToString());
 }