Esempio n. 1
0
 private void LoadList()
 {
     try
     {
         GuideBLL  guideBLL = new GuideBLL();
         DataTable dt       = guideBLL.GetAll();
         rptrList.DataSource = dt;
         rptrList.DataBind();
     }
     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;
            }
        }
Esempio n. 3
0
 private void GenerateCode()
 {
     try
     {
         QuaintLibraryManager lib = new QuaintLibraryManager();
         ModelCode = CodePrefix.Guide + "-" + lib.GetSixDigitNumber(1);
         GuideBLL  guideBLL = new GuideBLL();
         DataTable dt       = guideBLL.GetAll();
         if (dt != null)
         {
             if (dt.Rows.Count > 0)
             {
                 string[] lastCode       = dt.Rows[dt.Rows.Count - 1]["GuideCode"].ToString().Split('-');
                 int      lastCodeNumber = Convert.ToInt32(lastCode[1]);
                 ModelCode = CodePrefix.Guide + "-" + lib.GetSixDigitNumber(lastCodeNumber + 1);
             }
         }
     }
     catch (Exception)
     {
         Alert(AlertType.Error, "Failed to load.");
     }
 }