/// <summary> /// Returns a list of RequestStatusVw objects /// </summary> /// <returns></returns> public ActionResult Index(RequestStatusVwViewModel Model) { Db db = new Db(DbServices.ConnectionString); Model.List = RequestStatusVwServices.List(db); return(View(Model)); }
private void FormRequestStatusView_Load(object sender, EventArgs e) { if (dataSource == null) { DateTime dt = DateTime.Now; DataSource = RequestStatusVwServices.List(new Db(DbServices.ConnectionString)); slblEllapsedTimeValue.Text = (DateTime.Now.Subtract(dt).TotalMilliseconds / 1000).ToString(); } }
/// <summary> /// /// </summary> /// <param name="id"></param> /// <returns></returns> public ActionResult Details(Nullable <byte> id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } RequestStatusVwViewModel requestStatusVwViewModel = new RequestStatusVwViewModel(); Db db = new Db(DbServices.ConnectionString); // requestStatusVwViewModel.Instance = RequestStatusVwServices.Get(id.Value, db); requestStatusVwViewModel.Instance = RequestStatusVwServices.GetChildren(id.Value, db); if (requestStatusVwViewModel.Instance == null) { return(HttpNotFound()); } return(View(requestStatusVwViewModel)); }