private void LoadList() { try { LocationBLL locationBLL = new LocationBLL(); DataTable dt = locationBLL.GetAll(); rptrList.DataSource = dt; rptrList.DataBind(); } catch (Exception) { //throw; } }
private void LoadLocation() { try { LocationBLL locationBLL = new LocationBLL(); DataTable dt = locationBLL.GetAll(); ddlLocation.DataSource = dt; ddlLocation.DataTextField = "Name"; ddlLocation.DataValueField = "LocationId"; ddlLocation.DataBind(); ddlLocation.Items.Insert(0, "--- Please Select ---"); } catch (Exception) { //throw; } }
private void LoadDashboardInfo() { try { //Total Guide GuideBLL guideBLL = new GuideBLL(); DataTable dtGuide = guideBLL.GetAll(); lblTotalGuide.Text = Convert.ToString(Convert.ToInt32(dtGuide.Rows.Count)); //Total Event EventBLL eventBLL = new EventBLL(); DataTable dtEvent = eventBLL.GetAll(); lblTotalEvent.Text = Convert.ToString(Convert.ToInt32(dtEvent.Rows.Count)); //Total Location LocationBLL locationBLL = new LocationBLL(); DataTable dtLocation = locationBLL.GetAll(); lblTotalLocation.Text = Convert.ToString(Convert.ToInt32(dtLocation.Rows.Count)); //Total Hotel Reservation HotelReservationBLL hotelReservationBLL = new HotelReservationBLL(); DataTable dtHotelReservation = hotelReservationBLL.GetAll(); lblTotalHotelReservation.Text = Convert.ToString(Convert.ToInt32(dtHotelReservation.Rows.Count)); //Total Registration RegistrationBLL registrationBLL = new RegistrationBLL(); DataTable dtRegistration = registrationBLL.GetAll(); lblTotalRegistration.Text = Convert.ToString(Convert.ToInt32(dtRegistration.Rows.Count)); //Total Registration //SubscribeBLL subscribeBLL = new SubscribeBLL(); //DataTable dtSubscribe = subscribeBLL.GetAll(); //lblTotalSubscribe.Text = Convert.ToString(Convert.ToInt32(dtSubscribe.Rows.Count)); } catch (Exception) { throw; } }
private void GenerateCode() { try { QuaintLibraryManager lib = new QuaintLibraryManager(); this.ModelCode = CodePrefix.Location + "-" + lib.GetSixDigitNumber(1); LocationBLL locationBLL = new LocationBLL(); DataTable dt = locationBLL.GetAll(); if (dt != null) { if (dt.Rows.Count > 0) { string[] lastCode = dt.Rows[dt.Rows.Count - 1]["LocationCode"].ToString().Split('-'); int lastCodeNumber = Convert.ToInt32(lastCode[1]); this.ModelCode = CodePrefix.Location + "-" + lib.GetSixDigitNumber(lastCodeNumber + 1); } } } catch (Exception) { Alert(AlertType.Error, "Failed to load."); } }