public ActionResult Index(ReportInfo report) { if (report.CarNumber != null) { List<ReportInfo> reports = ReportPresent.GetOneReport(report.CarNumber); ViewData["report"] = reports; return View(); } else return View(); }
public static ReportInfo GetReportInfo(SqlDataReader sqlDR) { ReportInfo row = new ReportInfo(); row.CarNumber = DBNullToString(sqlDR["CarNumber"]); row.LoadTime = sqlDR["LoadTime"].ToString(); row.UnloadTime = DBNullToString(sqlDR["UnloadTime"]); row.DepartTime = DBNullToString(sqlDR["DepartTime"]); row.ArriveTime = DBNullToString(sqlDR["ArriveTime"]); return row; }