private void deleteSpectacleToolStripMenuItem_Click(object sender, EventArgs e) { if (currentView != null) { currentView.dismissFromContainer(); } Tuple <String, String> premiera = new Tuple <String, String>(Constants.titluField, ""); Array arr = new Tuple <String, String>[] { premiera }; deleteSpectacle.drawInForm(this); deleteSpectacle.refreshWithData(arr); currentView = deleteSpectacle; }
private void exportTicketsToolStripMenuItem_Click(object sender, EventArgs e) { if (currentView != null) { currentView.dismissFromContainer(); } Tuple <String, String> exportType = new Tuple <String, String>("Export Type", ""); Tuple <String, String> spectacol = new Tuple <String, String>(Constants.spectacolField, ""); Tuple <String, String> filePath = new Tuple <String, String>("File Path", ""); Array arr = new Tuple <String, String>[] { exportType, spectacol, filePath }; export.drawInForm(this); export.refreshWithData(arr); currentView = export; }
private void addTicketToolStripMenuItem_Click(object sender, EventArgs e) { if (currentView != null) { currentView.dismissFromContainer(); } Tuple <String, String> code = new Tuple <String, String>(Constants.codeField, ""); Tuple <String, String> spectacol = new Tuple <String, String>(Constants.spectacolField, ""); Tuple <String, String> rand = new Tuple <String, String>(Constants.randField, ""); Tuple <String, String> numar = new Tuple <String, String>(Constants.numarField, ""); Array arr = new Tuple <String, String>[] { code, spectacol, rand, numar }; addTicket.drawInForm(this); addTicket.refreshWithData(arr); currentView = addTicket; }
// Employees operations private void addNewEmployeeToolStripMenuItem_Click(object sender, EventArgs e) { if (currentView != null) { currentView.dismissFromContainer(); } Tuple <String, String> username = new Tuple <String, String>(Constants.usernameField, ""); Tuple <String, String> name = new Tuple <String, String>(Constants.nameField, ""); Tuple <String, String> password = new Tuple <String, String>(Constants.passwordField, ""); Tuple <String, String> userRole = new Tuple <String, String>(Constants.userRoleField, ""); Array arr = new Tuple <String, String>[] { username, name, password, userRole }; addNewEmployee.drawInForm(this); addNewEmployee.refreshWithData(arr); currentView = addNewEmployee; }
private void addNewSpectacleToolStripMenuItem_Click(object sender, EventArgs e) { if (currentView != null) { currentView.dismissFromContainer(); } Tuple <String, String> premiera = new Tuple <String, String>(Constants.premieraField, ""); Tuple <String, String> titlu = new Tuple <String, String>(Constants.titluField, ""); Tuple <String, String> regia = new Tuple <String, String>(Constants.regiaField, ""); Tuple <String, String> distributia = new Tuple <String, String>(Constants.distributiaField, ""); Tuple <String, String> nrOfTickets = new Tuple <String, String>(Constants.nrOfTicketsField, ""); Array arr = new Tuple <String, String>[] { premiera, titlu, regia, distributia, nrOfTickets }; addNewSpectacle.drawInForm(this); addNewSpectacle.refreshWithData(arr); currentView = addNewSpectacle; }
// Handle Spectacles update operation private void handlerTableEditRow(object sender, System.Collections.Specialized.OrderedDictionary e) { if (sender.Equals(spectalesTable)) { if (currentView != null) { currentView.dismissFromContainer(); } Tuple <String, String> premiera = new Tuple <String, String>(Constants.premieraField, e[Constants.premieraField].ToString()); Tuple <String, String> titlu = new Tuple <String, String>(Constants.titluField, e[Constants.titluField].ToString()); Tuple <String, String> regia = new Tuple <String, String>(Constants.regiaField, e[Constants.regiaField].ToString()); Tuple <String, String> distributia = new Tuple <String, String>(Constants.distributiaField, e[Constants.distributiaField].ToString()); Tuple <String, String> nrOfTickets = new Tuple <String, String>(Constants.nrOfTicketsField, e[Constants.nrOfTicketsField].ToString()); Array arr = new Tuple <String, String>[] { premiera, titlu, regia, distributia, nrOfTickets }; updateSpectacle.drawInForm(this); updateSpectacle.refreshWithData(arr); currentView = updateSpectacle; } }