protected void GetVenueDetails(string VenueID) { try { VenueDetailsViewModel _venueDetailsViewModel = new VenueDetailsViewModel(); VenueDetailsModel _venueDetailsModel = new VenueDetailsModel(); _venueDetailsModel = _venueDetailsViewModel.GetVenueDetailsByID(VenueID); hdVenueID.Value = _venueDetailsModel.VenueID.ToString(); txtVenueName.Value = _venueDetailsModel.VenueName; txtStreetAddress.Value = _venueDetailsModel.StreetAddress; txtCity.Value = _venueDetailsModel.City; txtStateProvision.Value = _venueDetailsModel.StateProvision; txtZipCode.Value = _venueDetailsModel.ZipCode; VenueImagePath.Value = _venueDetailsModel.VenueImage; img_prev.Src = _venueDetailsModel.VenueImage; } catch (Exception ex) { throw ex; } }
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); } }
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); } }