Beispiel #1
0
        public List <DC_Accomodation_ProductMapping> GetProductMappingData(MDMSVC.DC_Mapping_ProductSupplier_Search_RQ RQParams)
        {
            object result = null;

            ServiceConnection.MDMSvcProxy.PostData(ConfigurationManager.AppSettings["Mapping_GetProductMappingURI"], RQParams, typeof(MDMSVC.DC_Mapping_ProductSupplier_Search_RQ), typeof(List <MDMSVC.DC_Accomodation_ProductMapping>), out result);
            return(result as List <DC_Accomodation_ProductMapping>);
        }
Beispiel #2
0
        public void fillmappeddata(Guid Accomodation_ID, int pageIndexMapped)
        {
            //RQAPM = null;
            if (Accomodation_ID != null)
            {
                //PageIndexMapped = intMappedgrvwPageNo;

                MDMSVC.DC_Mapping_ProductSupplier_Search_RQ RQParams = new MDMSVC.DC_Mapping_ProductSupplier_Search_RQ();
                RQParams.Accommodation_Id = Accomodation_ID;
                RQParams.PageNo           = pageIndexMapped;
                RQParams.PageSize         = 10;
                RQParams.StatusExcept     = "UNMAPPED";

                if (!string.IsNullOrEmpty(txtSupProductName.Text))
                {
                    RQParams.ProductName = txtSupProductName.Text;
                }
                if (!string.IsNullOrEmpty(txtSupAddress.Text))
                {
                    RQParams.Street = txtSupAddress.Text;
                }
                if (!string.IsNullOrEmpty(txtSupCountry.Text))
                {
                    RQParams.CountryName = txtSupCountry.Text;
                }
                if (!string.IsNullOrEmpty(txtSupCity.Text))
                {
                    RQParams.CityName = txtSupCity.Text;
                }
                if (!string.IsNullOrEmpty(txtSupTelephone.Text))
                {
                    RQParams.TelephoneNumber = txtSupTelephone.Text;
                }

                //var resmapped = MapSvc.GetProductMappingMasterData(PageIndexMapped, 10, Accomodation_ID, "MAPPED,REVIEW");
                var resmapped = MapSvc.GetProductMappingMasterData(RQParams);
                if (resmapped != null)
                {
                    grdAccoMaps.DataSource = resmapped;
                    if (resmapped.Count > 0)
                    {
                        grdAccoMaps.VirtualItemCount = resmapped[0].TotalRecords;
                        lblMappedData.Text           = resmapped[0].TotalRecords.ToString();
                    }
                    else
                    {
                        lblMappedData.Text = "0";
                    }
                }
                else
                {
                    lblMappedData.Text = "0";
                }
                grdAccoMaps.PageIndex = pageIndexMapped;
                grdAccoMaps.PageSize  = 10;
                grdAccoMaps.DataBind();
            }
        }
Beispiel #3
0
        protected void grdRoomTypeMappingSearchResultsBySupplier_RowCommand(object sender, GridViewCommandEventArgs e)
        {
            if (e.CommandName == "OPENSPM")
            {
                GridViewRow row      = (GridViewRow)(((LinkButton)e.CommandSource).NamingContainer);
                int         index    = row.RowIndex;
                Guid        myRow_Id = Guid.Parse(grdRoomTypeMappingSearchResultsBySupplier.DataKeys[index].Values[0].ToString());

                MDMSVC.DC_Mapping_ProductSupplier_Search_RQ RQ = new MDMSVC.DC_Mapping_ProductSupplier_Search_RQ();
                if (grdRoomTypeMappingSearchResultsBySupplier.DataKeys[index].Values[1] != null)
                {
                    RQ.Accommodation_Id = Guid.Parse(grdRoomTypeMappingSearchResultsBySupplier.DataKeys[index].Values[1].ToString());
                }
                if (grdRoomTypeMappingSearchResultsBySupplier.DataKeys[index].Values[2] != null)
                {
                    RQ.Supplier_Id = Guid.Parse(grdRoomTypeMappingSearchResultsBySupplier.DataKeys[index].Values[2].ToString());
                }
                if (grdRoomTypeMappingSearchResultsBySupplier.DataKeys[index].Values[3] != null)
                {
                    RQ.SupplierProductCode = grdRoomTypeMappingSearchResultsBySupplier.DataKeys[index].Values[3].ToString();
                }

                RQ.PageSize = int.MaxValue;

                var searchAPM = _mapping.GetProductMappingData(RQ);
                if (searchAPM != null && searchAPM.Count > 0)
                {
                    UpdateSupplierProductMapping.CalledFrom = "RTM";
                    UpdateSupplierProductMapping.Accommodation_ProductMapping_Id = searchAPM[0].Accommodation_ProductMapping_Id;
                    UpdateSupplierProductMapping.SupplierId      = searchAPM[0].SupplierId;
                    UpdateSupplierProductMapping.SupplierName    = searchAPM[0].SupplierName;
                    UpdateSupplierProductMapping.ProductId       = searchAPM[0].ProductId;
                    UpdateSupplierProductMapping.ProductName     = searchAPM[0].ProductName;
                    UpdateSupplierProductMapping.ProductType     = searchAPM[0].ProductType;
                    UpdateSupplierProductMapping.Street          = searchAPM[0].FullAddress;
                    UpdateSupplierProductMapping.TelephoneNumber = searchAPM[0].TelephoneNumber;
                    UpdateSupplierProductMapping.CountryCode     = searchAPM[0].CountryCode;
                    UpdateSupplierProductMapping.CountryName     = searchAPM[0].CountryName;
                    UpdateSupplierProductMapping.CityCode        = searchAPM[0].CityCode;
                    UpdateSupplierProductMapping.CityName        = searchAPM[0].CityName;
                    UpdateSupplierProductMapping.Status          = searchAPM[0].Status;
                }
                UpdateSupplierProductMapping.BindData();
                ScriptManager.RegisterStartupScript((Control)grdRoomTypeMappingSearchResultsBySupplier, ((Control)grdRoomTypeMappingSearchResultsBySupplier).GetType(), "Pop" + index.ToString(), "showProductMappingModal();", true);
                //ClientScriptManager.RegisterStartupScript(this.GetType(), "tmp", "CreateClickableLinks();", false);
            }
        }