protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { Accomodation_ID = new Guid(Request.QueryString["Hotel_Id"]); BindMedia(); BindCategory(); //BindFileFormat(); BindMediaType(); BindRoomCategory(); BindSubCategory(); BindAttributeType(); BindFileMaster(); divMediaAttributes.Visible = false; BindDateDefaults(); Accomodation_ID = new Guid(Request.QueryString["Hotel_Id"]); var resultAcco = AccSvc.GetHotelDetails(Accomodation_ID); MediaAbsPath = System.Configuration.ConfigurationManager.AppSettings["MediaAbsPath"] + resultAcco[0].ProductCategorySubType + "/" + resultAcco[0].CompanyHotelID.ToString() + "/"; txtMediaPath.Text = MediaAbsPath; MediaAbsUrl = System.Configuration.ConfigurationManager.AppSettings["MediaAbsURL"] + resultAcco[0].ProductCategorySubType + "/" + resultAcco[0].CompanyHotelID.ToString() + "/"; txtMediaURL.Text = MediaAbsUrl; txtMediaPosition.Attributes.Add("onkeyup", "CheckMediaPositionDuplicate();"); } }
public void fillAPMrequestobject(Guid Accomodation_ID, int pageIndex, string searchSource) { btnMap.CommandArgument = Accomodation_ID.ToString(); btnMapAll.CommandArgument = Accomodation_ID.ToString(); btnSupManualSearch.CommandArgument = Accomodation_ID.ToString(); btnUnmapSelected.CommandArgument = Accomodation_ID.ToString(); btnUnmapAll.CommandArgument = Accomodation_ID.ToString(); btnMapSelectedForgrdAccoMaps.CommandArgument = Accomodation_ID.ToString(); btnMapAllForgrdAccoMaps.CommandArgument = Accomodation_ID.ToString(); //GridView grdTLGXProdData = (GridView)this.Parent.FindControl("grdTLGXProdData"); //RQAPM = null; if (searchSource == "id") { var hoteldetails = AccSvc.GetHotelDetails(Accomodation_ID); if (hoteldetails != null) { if (!string.IsNullOrEmpty(hoteldetails[0].HotelName)) { RQAPM.ProductName = hoteldetails[0].HotelName; } if (!string.IsNullOrEmpty(hoteldetails[0].StreetName)) { RQAPM.Street = hoteldetails[0].StreetName; } if (!string.IsNullOrEmpty(hoteldetails[0].Country)) { RQAPM.CountryName = hoteldetails[0].Country; } if (!string.IsNullOrEmpty(hoteldetails[0].City)) { RQAPM.CityName = hoteldetails[0].City; } var telephones = hoteldetails[0].Accomodation_Contact; if (telephones != null) { if (telephones.Length > 0) { if (!string.IsNullOrEmpty(telephones[0].Telephone)) { RQAPM.TelephoneNumber = telephones[0].Telephone; } } } //RQAPM.Status = ""; //RQAPM.StatusExcept = "MAPPED"; } } else if (searchSource == "manual") { if (!string.IsNullOrEmpty(txtSupProductName.Text)) { RQAPM.ProductName = txtSupProductName.Text; } if (!string.IsNullOrEmpty(txtSupAddress.Text)) { RQAPM.Street = txtSupAddress.Text; } if (!string.IsNullOrEmpty(txtSupCountry.Text)) { RQAPM.CountryName = txtSupCountry.Text; } if (!string.IsNullOrEmpty(txtSupCity.Text)) { RQAPM.CityName = txtSupCity.Text; } if (!string.IsNullOrEmpty(txtSupTelephone.Text)) { RQAPM.TelephoneNumber = txtSupTelephone.Text; } } RQAPM.Source = "SYSTEMDATA"; RQAPM.CalledFromTLGX = "TLGX"; //RQAPM.StatusExcept = "MAPPED"; RQAPM.Status = "UNMAPPED"; RQAPM.PageNo = pageIndex; RQAPM.PageSize = Convert.ToInt32(ddlPageSizeSupDump.SelectedItem.Text); var mappingresult = MapSvc.GetProductMappingData(RQAPM); if (mappingresult != null) { grdSupplierDump.DataSource = mappingresult; if (mappingresult.Count > 0) { grdSupplierDump.VirtualItemCount = mappingresult[0].TotalRecords; lblSupDump.Text = mappingresult[0].TotalRecords.ToString(); } else { lblSupDump.Text = "0"; } } else { lblSupDump.Text = "0"; } grdSupplierDump.PageIndex = pageIndex; grdSupplierDump.PageSize = Convert.ToInt32(ddlPageSizeSupDump.SelectedItem.Text); //grdCityMaps.DataKeyNames = new string[] {"CityMapping_Id"}; grdSupplierDump.DataBind(); setupmanualsearchfileds(); }