Beispiel #1
0
        //on Click function. this show a new child form which allow the admin to add a report
        private void AddReport(object sender, EventArgs e)
        {
            AdminReportEdit ReportListChild = new AdminReportEdit(this.Email, this.PassHash, this.BookingID);

            ReportListChild.MdiParent       = this.ParentForm;
            ReportListChild.FormBorderStyle = FormBorderStyle.None;
            ReportListChild.Dock            = DockStyle.Fill;
            ReportListChild.Show();
        }
Beispiel #2
0
 //on Click function. this show a new child form which allow the admin to modify a service
 private void EditReport(object sender, EventArgs e)
 {
     if (reportListView.SelectedItems.Count == 1)
     {
         try
         {
             var             selectedReport  = this.reportManager.getReportByID(Convert.ToInt32(this.reportListView.SelectedItems[0].Text), this.Email, this.PassHash);
             AdminReportEdit ReportListChild = new AdminReportEdit(this.Email, this.PassHash, selectedReport);
             ReportListChild.MdiParent       = this.ParentForm;
             ReportListChild.FormBorderStyle = FormBorderStyle.None;
             ReportListChild.Dock            = DockStyle.Fill;
             ReportListChild.Show();
         }catch (Exception exc)
         {
             MessageBox.Show("Errore nella connessione al server.", "Proprio non riesco a farti editare il report", MessageBoxButtons.OK);
         }
     }
 }