Пример #1
0
        //public List<DC_CountryMapping> GetCountryMappingData(int PageNo, int PageSize, Guid Supplier_Id, Guid Country_Id, string sts, string SortBy)
        //{
        //    object result = null;
        //    ServiceConnection.MDMSvcProxy.GetData(string.Format(ConfigurationManager.AppSettings["Mapping_GetCountryMappingURI"], PageNo, PageSize, Supplier_Id, Country_Id, sts, SortBy), typeof(List<DC_CountryMapping>), out result);
        //    return result as List<DC_CountryMapping>;
        //}

        public List <DC_CountryMapping> GetCountryMappingData(MDMSVC.DC_CountryMappingRQ RQ)
        {
            object result = null;

            ServiceConnection.MDMSvcProxy.PostData(ConfigurationManager.AppSettings["Mapping_GetCountryMappingURI"], RQ, typeof(MDMSVC.DC_CountryMappingRQ), typeof(List <DC_CountryMapping>), out result);
            return(result as List <DC_CountryMapping>);
        }
        private void fillmatchingdata()
        {
            MDMSVC.DC_CountryMappingRQ RQParam = new MDMSVC.DC_CountryMappingRQ();
            RQParam.Supplier_Id         = Guid.Empty;
            RQParam.Country_Id          = Guid.Empty;
            RQParam.Status              = "All";
            RQParam.StatusExcept        = MatchedStatus;
            RQParam.SupplierCountryName = MatchedSupplierName;
            RQParam.PageNo              = MatchedPageIndex;
            RQParam.PageSize            = Convert.ToInt32(ddlMatchingPageSize.SelectedItem.Text);
            RQParam.SortBy              = (SortBy + " " + SortEx).Trim();
            var res = mapperSVc.GetCountryMappingData(RQParam);

            grdMatchingCountry.DataSource = res; //.Where(Country => Country.Status.ToUpper()!="MAPPED");
            if (res != null && res.Count > 0)
            {
                grdMatchingCountry.VirtualItemCount = res[0].TotalRecord;
                if (res[0].TotalRecord > 0)
                {
                    lblMsg.Text = "There are (" + res[0].TotalRecord.ToString() + ") similar records in system matching with mapped combination. Do you wish to map the same? ";
                }
                else
                {
                    lblMsg.Text = "No similar records found matching with updated combination";
                }
                //lblTotalCount.Text = res[0].TotalRecord.ToString();
            }
            else
            {
                lblMsg.Text = "No similar records found matching with updated combination";
            }
            //else
            //{
            //    lblTotalCount.Text = "0";
            //}
            grdMatchingCountry.PageIndex = MatchedPageIndex;
            grdMatchingCountry.PageSize  = Convert.ToInt32(ddlMatchingPageSize.SelectedItem.Text);
            grdMatchingCountry.DataBind();
        }