private void Page_Loaded(object sender, RoutedEventArgs e) { //try //{ // pageMode = PageFunctions.pageParameter(this, "Mode"); //} //catch (Exception generalException) //{ // MessageFunctions.Error("Error retrieving query details", generalException); // PageFunctions.ShowTilesPage(); //} FromDate.SelectedDate = fromDate = Globals.StartOfMonth; ToDate.SelectedDate = toDate = Globals.Today; refreshTypeNames(); refreshStaffCombo(); FromDate.Focus(); ToDate.Focus(); TypeCombo.Focus(); }
private void Page_Loaded(object sender, RoutedEventArgs e) { //try //{ // pageMode = PageFunctions.pageParameter(this, "Mode"); //} //catch (Exception generalException) //{ // MessageFunctions.Error("Error retrieving query details", generalException); // PageFunctions.ShowTilesPage(); //} FromDate.SelectedDate = fromDate = Globals.StartOfMonth; ToDate.SelectedDate = toDate = Globals.Today; refreshTableNames(); refreshStaffCombo(); FromDate.Focus(); ToDate.Focus(); TableCombo.Focus(); MessageFunctions.InfoAlert("Only records within or relevant to the current Entity (" + Globals.CurrentEntityName + ") are displayed.", "Please note:"); }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { string errorPage = "~/404"; ViewState["ReferrerUrl"] = Request.UrlReferrer.ToString(); if (Request.Params.AllKeys.Contains("id")) { int borrowingID = Convert.ToInt32(Request["id"]); var db = new BookLibrary.Models.BookLibraryContext(); Borrowing borrowing = db.Borrowings.First(b => b.BorrowingID == borrowingID); Member.Text = borrowing.Member.DisplayName; Book.Text = borrowing.Book.DisplayName; FromDate.Text = borrowing.From.ToString("MM/dd/yyyy"); ToDate.Text = DateTime.Now.ToString("MM/dd/yyyy"); ToDate.Focus(); } else { Response.Redirect(errorPage); } } }