public void CreateNewReport(LogIncidentReportHandler c) { c.ChooseReporter(4); c.CreateNewIncidentReport( ); Console.WriteLine("Select ID of the Weather when the incident happened."); Console.WriteLine("\t1) Fine"); Console.WriteLine("\t2) Rain"); Console.WriteLine("\t3) Cloudy"); Console.WriteLine("\t4) Windy"); Console.WriteLine(); int weatherID = (int.Parse(Console.ReadLine()) - 1); c.ChooseWeather(weatherID); c.LogIncidentReport(); }
public void ModifyReport(LogIncidentReportHandler c) { c.ChooseReporter(4); Console.WriteLine("Please enter the ID of the Incident Report you want to modify."); int reportID = (int.Parse(Console.ReadLine()) - 1); // the id of the report -1 for the index.. if 0 is entered ..throws an exception c.ChooseReport(reportID); c.CreateNewIncidentReport(); Console.WriteLine("Select ID of the Weather when the incident happened."); Console.WriteLine("\t1) Fine"); Console.WriteLine("\t2) Rain"); Console.WriteLine("\t3) Cloudy"); Console.WriteLine("\t4) Windy"); Console.WriteLine(); int weatherID = (int.Parse(Console.ReadLine()) - 1); c.ModifyWeather(weatherID); c.ModifyReport(); }
protected void Page_Load(object sender, EventArgs e) { // if (Page.IsPostBack == true) //{ Debug.WriteLine("load page post back"); //if (Page.IsPostBack == false) //{ // if (Profile.DropZoneStaffUser == null) // { // //Controller c = new Controller(); // //c.LogInStaff(User.Identity.Name); // //Profile.DropZoneStaffUser = c.DropZoneStaffUser; // //if (Profile.DropZoneStaffUser.AccessLevel == 3) // //{ // // Profile.SelectedDropZone = c.SelectedDropZone; // //} // //else // //{ // //} // Debug.WriteLine("user identity: " + User.Identity.Name); // Debug.WriteLine("----------------------"); // Debug.WriteLine(" about page loaded..."); // Debug.WriteLine("----------------------"); // } //} handler = new LogIncidentReportHandler(); //c.Reporter = Profile.DZStaffUser; handler.ChooseReporter(1); handler.CreateNewIncidentReport(); // Load the: // Drop Zone Name to the DropZoneNameLabel //DropZoneNameLabel.Text = Controller.Instance.SelectedDropZone.DropZoneName; DropZoneNameLabel.Text = handler.Reporter.DropZoneName; // Drop Zone Code to the DropZoneCodeLabel //DropZoneCodeLabel.Text = Controller.Instance.SelectedDropZone.DropZoneCode; //DropZoneCodeLabel.Text = irc.DropZone.DropZoneCode; // Username Name to the ReporterNameTextBox //ReporterNameTextBox.Text = Controller.Instance.DZStaffUser.DropZoneStaffFirstName + " " + Controller.Instance.DZStaffUser.DropZoneStaffLastName; ReporterNameTextBox.Text = handler.Report.DropZoneStaff.FirstName; // Username Title to the ReporterTitleTextBox //ReporterTitleTextBox.Text = Controller.Instance.DZStaffUser.DropZoneStaffTitle; //ReporterTitleTextBox.Text = handler.IR.DropZoneStaff.StaffNumber; // Username Licence Type to the ReporterLicenceTypeDropDownList by value instead of index // Username Licence Number to the ReporterLicenceNumberTextBox // Increment the Incident ID value and load it. Save into controller? // Get current DateTime.Now.ToShortDateString for the Report Date. Don't show it, just add it to the controller/database without // the user knowing. //SeverityDropDownList.DataSource = irc.SeverityDropDownList; //SeverityDropDownList.DataBind(); //} }