Ejemplo n.º 1
0
 protected void ReportEditButtonClick(object sender, EventArgs e)
 {
     if (Page.IsValid)
     {
         ReportBLL       bll    = new ReportBLL(connectionString);
         ReportViewModel report = new ReportViewModel();
         report.ReportID          = Convert.ToInt32(Request.QueryString["ReportID"]);
         report.ReportName        = ReportName.Text;
         report.ReportDescription = ReportDescription.Text;
         report.DateOfIncident    = Convert.ToDateTime(DateOfIncident.Text);
         bll.EditReport(report);
         Response.Redirect("~/Reports.aspx");
     }
 }
Ejemplo n.º 2
0
 protected void btnEditReport_Click(object sender, EventArgs e)
 {
     if (Page.IsValid)
     {
         ReportBLL       reportBL = new ReportBLL(connectionString);
         ReportViewModel report   = new ReportViewModel();
         report.CarID             = Convert.ToInt32(ddlRide.SelectedValue);
         report.DateOfIncident    = Convert.ToDateTime(tbIncidentDate.Text);
         report.ReportName        = tbReportName.Text;
         report.ReportDescription = tbDescription.Text;
         report.DateOfReport      = DateTime.Now;
         reportBL.EditReport(report);
         Response.Redirect("~/Reports.aspx");
     }
 }
Ejemplo n.º 3
0
        protected void ReportEditButton_Click(object sender, EventArgs e)
        {
            string Ride = RideDropDownList.Text;

            if (Page.IsValid)
            {
                ReportBLL       bll    = new ReportBLL(connectionString);
                ReportViewModel report = new ReportViewModel();
                report.ReportID          = Convert.ToInt32(Request.QueryString["ReportID"]);
                report.CarID             = Convert.ToInt32(GetCarId(Ride));
                report.DateOfIncident    = DateOfIncident.Text;
                report.ReportName        = ReportName.Text;
                report.ReportDescription = ReportDescription.Text;
                report.DateOfReport      = DateTime.Now.ToString();
                bll.EditReport(report);
                Response.Redirect("~/Reports.aspx");
            }
        }