Exemple #1
0
        public List <DC_CityMapping> GetCityMappingData(MDMSVC.DC_CityMapping_RQ RQParams)
        {
            object result = null;

            ServiceConnection.MDMSvcProxy.PostData(ConfigurationManager.AppSettings["Mapping_GetCityMappingURI"], RQParams, typeof(MDMSVC.DC_CityMapping_RQ), typeof(List <MDMSVC.DC_CityMapping>), out result);
            return(result as List <DC_CityMapping>);
        }
        private void fillmappeddata()
        {
            MDMSVC.DC_CityMapping_RQ RQ = new MDMSVC.DC_CityMapping_RQ();
            Guid selSupplier_ID         = Guid.Empty;
            Guid selCountry_ID          = Guid.Empty;
            Guid selCity_ID             = Guid.Empty;

            if (ddlSupplierName.SelectedItem.Value != "0")
            {
                //selSupplier_ID =
                RQ.Supplier_Id = new Guid(ddlSupplierName.SelectedItem.Value);
            }
            RQ.Status  = "MAPPED";
            RQ.City_Id = CityKey;

            RQ.PageNo   = PageIndexMapped;
            RQ.SortBy   = (SortBy + " " + SortEx).Trim();
            RQ.PageSize = Convert.ToInt32(ddlPageSizeMapped.SelectedItem.Text);

            var res = mapperSVc.GetCityMappingData(RQ);

            grdCityMaps.DataSource = res;
            if (res != null)
            {
                if (res.Count > 0)
                {
                    grdCityMaps.VirtualItemCount = res[0].TotalRecords;
                    lblMappedCount.Text          = res[0].TotalRecords.ToString();
                }
                else
                {
                    lblMappedCount.Text = "0";
                }
            }
            else
            {
                lblMappedCount.Text = "0";
            }
            grdCityMaps.PageIndex = PageIndex;
            grdCityMaps.PageSize  = Convert.ToInt32(ddlPageSizeMapped.SelectedItem.Text);;
            //grdCityMaps.DataKeyNames = new string[] {"CityMapping_Id"};
            grdCityMaps.DataBind();
            pnlSuppDump.Visible   = true;
            pnlCityMaster.Visible = true;
            pnlCityMap.Visible    = true;
        }