Beispiel #1
0
        private void SearchRoomTypeMappingDataByProduct(ref bool blnDataExist, int pageindex = 0)
        {
            try
            {
                MDMSVC.DC_Accommodation_SupplierRoomTypeMap_SearchRQ _objSearch = new MDMSVC.DC_Accommodation_SupplierRoomTypeMap_SearchRQ();

                //For Binding
                if (ddlCountryByProduct.SelectedValue != "0")
                {
                    _objSearch.Country = Guid.Parse(ddlCountryByProduct.SelectedValue);
                }
                if (ddlCityByProduct.SelectedValue != "0")
                {
                    _objSearch.City = Guid.Parse(ddlCityByProduct.SelectedValue);
                }
                if (ddlStatusByProduct.SelectedValue != "0")
                {
                    _objSearch.Status = ddlStatusBySupplier.SelectedItem.Text;
                }
                if (!string.IsNullOrWhiteSpace(Convert.ToString(txtCommonByProduct.Text)))
                {
                    if (!string.IsNullOrWhiteSpace(Convert.ToString(txtHotelNameByProduct.Text)))
                    {
                        _objSearch.PageSize = Convert.ToInt32(ddlPageSizeBySupplier.SelectedItem.Text);
                    }
                }

                _objSearch.PageNo = pageindex;
                var res = _mapping.GetAccomodationSupplierRoomTypeMapping_Search(_objSearch);
                if (res != null)
                {
                    if (res.Count > 0)
                    {
                        blnDataExist = true;
                        MappingButtonShowHide(blnDataExist);
                        grdRoomTypeMappingSearchResultsBySupplier.VirtualItemCount = res[0].TotalRecords;
                        lblSupplierRoomSearchCount.Text = res[0].TotalRecords.ToString();
                    }
                    else
                    {
                        lblSupplierRoomSearchCount.Text = "0";
                        blnDataExist = false;
                        MappingButtonShowHide(blnDataExist);
                    }
                }
                else
                {
                    lblSupplierRoomSearchCount.Text = "0";
                    blnDataExist = false;
                    MappingButtonShowHide(blnDataExist);
                }
                grdRoomTypeMappingSearchResultsBySupplier.DataSource = res;
                grdRoomTypeMappingSearchResultsBySupplier.PageIndex  = pageindex;
                grdRoomTypeMappingSearchResultsBySupplier.PageSize   = Convert.ToInt32(ddlPageSizeBySupplier.SelectedItem.Text);
                grdRoomTypeMappingSearchResultsBySupplier.DataBind();
            }
            catch
            {
                throw;
            }
        }
Beispiel #2
0
        public List <DC_Accommodation_SupplierRoomTypeMap_SearchRS> GetAccomodationSupplierRoomTypeMapping_Search(MDMSVC.DC_Accommodation_SupplierRoomTypeMap_SearchRQ RQParams)
        {
            object result = null;

            ServiceConnection.MDMSvcProxy.PostData(ConfigurationManager.AppSettings["Mapping_GetAccoSupplierRoomType"], RQParams, typeof(MDMSVC.DC_Accommodation_SupplierRoomTypeMap_SearchRQ), typeof(List <MDMSVC.DC_Accommodation_SupplierRoomTypeMap_SearchRS>), out result);
            return(result as List <DC_Accommodation_SupplierRoomTypeMap_SearchRS>);
        }