Esempio n. 1
0
        protected void GetVenueDetails()
        {
            try
            {
                VenueDetailsViewModel _venueDetailsViewModel = new VenueDetailsViewModel();
                List<VenueDetailsModel> _venueDetailsModel = new List<VenueDetailsModel>();
                VenueDetailsModel _venueDetails = new VenueDetailsModel();

                if (Convert.ToInt32(Session["SVenue"].ToString()) == 0)
                {
                    _venueDetailsModel = _venueDetailsViewModel.GetVenueDetails();
                    ddVenue.DataSource = _venueDetailsModel;
                    ddVenue.DataTextField = "VenueName";
                    ddVenue.DataValueField = "VenueID";
                    ddVenue.DataBind();
                }
                else
                {
                    _venueDetails = _venueDetailsViewModel.GetVenueDetailsByID(Session["SVenue"].ToString());

                    ListItem lst = new ListItem();
                    lst.Text = _venueDetails.VenueName;
                    lst.Value = _venueDetails.VenueID.ToString();
                    ddVenue.Items.Add(lst);
                }

                ListItem lst1 = new ListItem();
                lst1.Text = "--SELECT--";
                lst1.Value = "--SELECT--";
                ddVenue.Items.Insert(0, lst1);
            }
            catch (Exception ex)
            {
                ErrHandler.WriteError(ex.Message);
                System.Text.StringBuilder sb = new System.Text.StringBuilder();
                sb.Append(@"<script language='javascript'>");
                sb.Append(@"alert('Error : " + ex.Message + "')");
                sb.Append(@"</script>");
                ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "Error", sb.ToString(), false);
            }
        }
Esempio n. 2
0
        protected void GetVenueDetails()
        {
            try
            {
                List<VenueDetailsModel> _venueDetails = new List<VenueDetailsModel>();
                VenueDetailsViewModel venueList = new VenueDetailsViewModel();

                _venueDetails = venueList.GetVenueDetails();

                foreach (var item in _venueDetails)
                {
                    ListItem lst = new ListItem();
                    lst.Text = item.VenueName;
                    lst.Value = item.VenueID.ToString();
                    ddVenueDetails.Items.Add(lst);
                }
            }
            catch (Exception ex)
            {
                ErrHandler.WriteError(ex.Message);
                ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "Error", "javascript:alert('Server is busy.Please try after sometime.');", true);
            }
        }
        protected void GetVenueDetails()
        {
            try
            {
                List<VenueDetailsModel> _venueDetails = new List<VenueDetailsModel>();
                VenueDetailsViewModel venueList = new VenueDetailsViewModel();

                _venueDetails = venueList.GetVenueDetails();

                foreach (var item in _venueDetails)
                {
                    ListItem lst = new ListItem();
                    lst.Text = item.VenueName;
                    lst.Value = item.VenueID.ToString();
                    ddVenueDetails.Items.Add(lst);
                }
            }
            catch
            {

            }
        }
Esempio n. 4
0
        protected void GetVenueDetails()
        {
            try
            {
                List<VenueDetailsModel> _venueDetails = new List<VenueDetailsModel>();
                VenueDetailsModel _VenueDetailsModel = new VenueDetailsModel();

                VenueDetailsViewModel venueList = new VenueDetailsViewModel();

                //TODO
                if (Convert.ToInt32(Session["SVenue"].ToString()) == 0)
                {
                    _venueDetails = venueList.GetVenueDetails();

                    foreach (var item in _venueDetails)
                    {
                    ListItem lst = new ListItem();
                    lst.Text = item.VenueName;
                    lst.Value = item.VenueID.ToString();
                    ddVenueDetails.Items.Add(lst);
                    }

                }
                else
                {
                    _VenueDetailsModel = venueList.GetVenueDetailsByID(Session["SVenue"].ToString());

                    ListItem lst = new ListItem();
                    lst.Text = _VenueDetailsModel.VenueName;
                    lst.Value = _VenueDetailsModel.VenueID.ToString();
                    ddVenueDetails.Items.Add(lst);
                }

            }
            catch (Exception ex)
            {
                ErrHandler.WriteError(ex.Message);
                System.Text.StringBuilder sb = new System.Text.StringBuilder();
                sb.Append(@"<script language='javascript'>");
                sb.Append(@"alert('Error : " + ex.Message + "')");
                sb.Append(@"</script>");
                ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "Error", sb.ToString(), false);

            }
        }
Esempio n. 5
0
        private void GetVenueDetails()
        {
            try
            {
                List<VenueDetailsModel> _venueDetailsModel = new List<VenueDetailsModel>();
                VenueDetailsViewModel _venueDetailsViewModel = new VenueDetailsViewModel();
                _venueDetailsModel = _venueDetailsViewModel.GetVenueDetails();

                //gvVenueDetails.DataSource = _venueDetailsModel;
                //gvVenueDetails.DataBind();

                gvVenueDetailsList.DataSource = _venueDetailsModel;
                gvVenueDetailsList.DataBind();
            }
            catch (Exception ex)
            {
                ErrHandler.WriteError(ex.Message);
                System.Text.StringBuilder sb = new System.Text.StringBuilder();
                sb.Append(@"<script language='javascript'>");
                sb.Append(@"alert('Error : " + ex.Message + "')");
                sb.Append(@"</script>");
                ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "Error", sb.ToString(), false);
            }
        }