public List <MDMSVC.DC_PortMaster> PortMasterSeach(MDMSVC.DC_PortMaster_RQ RQParams) { object result = null; ServiceConnection.MDMSvcProxy.PostData(ConfigurationManager.AppSettings["Masters_PortSearch"], RQParams, typeof(MDMSVC.DC_PortMaster_RQ), typeof(List <MDMSVC.DC_PortMaster>), out result); return(result as List <MDMSVC.DC_PortMaster>); }
private void SearchPortDetails(int PageNo, int PageSize) { try { var _ddlCountryMaster = Convert.ToString(ddlMasterCountry.SelectedValue) == "0" ? String.Empty : Convert.ToString(ddlMasterCountry.SelectedValue); var _ddlMasterCity = Convert.ToString(ddlMasterCity.SelectedValue) == "0" ? String.Empty : Convert.ToString(ddlMasterCity.SelectedValue); var _ddlStatus = Convert.ToString(ddlStatus.SelectedValue) == "0" ? String.Empty : Convert.ToString(ddlStatus.SelectedValue); var _ddlEntriesCount = Convert.ToString(ddlShowEntries.SelectedValue); var lblPortCountry = Convert.ToString(txtSuppCountry.Text) == String.Empty ? String.Empty : Convert.ToString(txtSuppCountry.Text); MDMSVC.DC_PortMaster_RQ _obj = new MDMSVC.DC_PortMaster_RQ(); if (!string.IsNullOrWhiteSpace(_ddlCountryMaster)) { _obj.Country_Id = Guid.Parse(_ddlCountryMaster); } if (!string.IsNullOrWhiteSpace(_ddlMasterCity)) { _obj.City_Id = Guid.Parse(_ddlMasterCity); } if (!string.IsNullOrWhiteSpace(_ddlStatus)) { _obj.Mapping_Status = _ddlStatus; } //if (!string.IsNullOrWhiteSpace(_ddlEntriesCount)) // _obj.PageSize = Convert.ToInt32(_ddlEntriesCount); //else // _obj.PageSize = 10; _obj.PageSize = PageSize; if (!string.IsNullOrWhiteSpace(lblPortCountry)) { _obj.Port_Country_Name = lblPortCountry; } // _obj.PageNo = intPageIndex; _obj.PageNo = PageNo; var result = _serviceMaster.PortMasterSeach(_obj); // grdPortList.PageIndex = intPageIndex; grdPortList.PageIndex = PageNo; grdPortList.DataSource = result; if (result != null) { if (result.Count > 0) { //grdPortList.PageSize = intPageSize; grdPortList.PageSize = PageSize; grdPortList.VirtualItemCount = result[0].TotalRecords; lblTotalCount.Text = result[0].TotalRecords.ToString(); } } grdPortList.DataBind(); } catch (Exception) { throw; } }