protected void Page_Unload(object sender, EventArgs e) { if (restaurantBookingByDateBLL != null) { restaurantBookingByDateBLL.Dispose(); restaurantBookingByDateBLL = null; } }
protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { txtDate.Text = Date.ToString("dd/MM/yyyy"); rptBooking.DataSource = RestaurantBookingByDateBLL.RestaurantBookingGetAllByDate(Date).OrderBy(x => x.PartOfDay).ThenBy(x => x.Time); rptBooking.DataBind(); } }