Exemplo n.º 1
0
 public void fillRoomAmenityTypes()
 {
     ddlAmentityType.DataSource     = LookupAtrributes.GetAllAttributeAndValuesByFOR("RoomAmenities", "RoomAmenityType").MasterAttributeValues;
     ddlAmentityType.DataTextField  = "AttributeValue";
     ddlAmentityType.DataValueField = "MasterAttributeValue_Id";
     ddlAmentityType.DataBind();
 }
 private void LoadEntities()
 {
     ddlSupplierApiLocEntity.DataSource     = LookupAtrributes.GetAllAttributeAndValuesByFOR("MappingFileConfig", "MappingEntity").MasterAttributeValues;
     ddlSupplierApiLocEntity.DataTextField  = "AttributeValue";
     ddlSupplierApiLocEntity.DataValueField = "MasterAttributeValue_Id";
     ddlSupplierApiLocEntity.DataBind();
 }
Exemplo n.º 3
0
        protected void GetLookupData()
        {
            DropDownList ddlFrom = (DropDownList)frmRouote.FindControl("ddlFrom");

            ddlFrom.DataSource     = LookupAtrributes.GetAllAttributeAndValuesByFOR(AttributeOptionFor, "From").MasterAttributeValues;
            ddlFrom.DataTextField  = "AttributeValue";
            ddlFrom.DataValueField = "MasterAttributeValue_Id";
            ddlFrom.DataBind();

            DropDownList ddlModeOfTransport = (DropDownList)frmRouote.FindControl("ddlModeOfTransport");

            ddlModeOfTransport.DataSource     = LookupAtrributes.GetAllAttributeAndValuesByFOR(AttributeOptionFor, "ModeOfTransport").MasterAttributeValues;
            ddlModeOfTransport.DataTextField  = "AttributeValue";
            ddlModeOfTransport.DataValueField = "MasterAttributeValue_Id";
            ddlModeOfTransport.DataBind();

            DropDownList ddlTransportType = (DropDownList)frmRouote.FindControl("ddlTransportType");

            ddlTransportType.DataSource     = LookupAtrributes.GetAllAttributeAndValuesByFOR(AttributeOptionFor, "TransportType").MasterAttributeValues;
            ddlTransportType.DataTextField  = "AttributeValue";
            ddlTransportType.DataValueField = "MasterAttributeValue_Id";
            ddlTransportType.DataBind();


            DropDownList ddlNameOfPlace = (DropDownList)frmRouote.FindControl("ddlNameOfPlace");

            ddlNameOfPlace.DataSource     = LookupAtrributes.GetAllAttributeAndValuesByFOR(AttributeOptionFor, "NameOfPlace").MasterAttributeValues;
            ddlNameOfPlace.DataTextField  = "AttributeValue";
            ddlNameOfPlace.DataValueField = "MasterAttributeValue_Id";
            ddlNameOfPlace.DataBind();
        }
 private void fillproductcategorysubtype(DropDownList ddl, string SelectedVal)
 {
     try
     {
         Guid gSelectedVal;
         ddl.Items.Clear();
         var result = LookupAtrributes.GetAllAttributeAndValuesByFOR("Activity", "ActivityProductCategory").MasterAttributeValues;
         if (Guid.TryParse(SelectedVal, out gSelectedVal))
         {
             ddl.DataSource     = result.Where(w => w.ParentAttributeValue_Id == gSelectedVal).Select(s => s);
             ddl.DataTextField  = "AttributeValue";
             ddl.DataValueField = "MasterAttributeValue_Id";
         }
         else
         {
             ddl.DataSource = null;
         }
         ddl.DataBind();
         InsertDefaultValuesInDDL(ddl);
     }
     catch
     {
         throw;
     }
 }
Exemplo n.º 5
0
 private void fillAttributeValues(DropDownList ddl, string Attribute_Name, string OptionFor)
 {
     ddl.DataSource     = LookupAtrributes.GetAllAttributeAndValuesByFOR(OptionFor, Attribute_Name).MasterAttributeValues;
     ddl.DataTextField  = "AttributeValue";
     ddl.DataValueField = "MasterAttributeValue_Id";
     ddl.DataBind();
     ddl.Items.Insert(0, new ListItem("---ALL---", "0"));
 }
Exemplo n.º 6
0
 private void fillproductcaterogy()
 {
     //fillAttributeValues("ddlAddProductCategorySubType", "ProductCategorySubType");
     ddlAddProductCategorySubType.DataSource     = LookupAtrributes.GetAllAttributeAndValuesByFOR("HotelInfo", "ProductCategorySubType").MasterAttributeValues;
     ddlAddProductCategorySubType.DataTextField  = "AttributeValue";
     ddlAddProductCategorySubType.DataValueField = "MasterAttributeValue_Id";
     ddlAddProductCategorySubType.DataBind();
     ddlAddProductCategorySubType.SelectedIndex = ddlAddProductCategorySubType.Items.IndexOf(ddlAddProductCategorySubType.Items.FindByText("Hotel"));
 }
Exemplo n.º 7
0
        protected void GetLookUpValues(String BindTime, String AttributeType)
        {
            ScriptManager scriptMan = ScriptManager.GetCurrent(this.Page);

            if (BindTime == "Page")
            {
                // only the first ddlAttributeType is set, the other is handled on selectednidex changed
                DropDownList ddlAttributeType = (DropDownList)frmClassificationAttribute.FindControl("ddlAttributeType");
                ddlAttributeType.Items.Clear();
                ListItem itm = new ListItem("-Select-", "0");
                ddlAttributeType.Items.Add(itm);
                itm = null;

                ddlAttributeType.DataSource     = LookupAtrributes.GetAllAttributeAndValuesByFOR(AttributeOptionFor, "AttributeType").MasterAttributeValues;
                ddlAttributeType.DataTextField  = "AttributeValue";
                ddlAttributeType.DataValueField = "MasterAttributeValue_Id";
                ddlAttributeType.DataBind();

                scriptMan.RegisterAsyncPostBackControl(ddlAttributeType);
            }

            if (BindTime == "Form")
            {
                DropDownList ddlAttributeType = (DropDownList)frmClassificationAttribute.FindControl("ddlAttributeType");
                ddlAttributeType.Items.Clear();
                ListItem itm = new ListItem("-Select-", "0");
                ddlAttributeType.Items.Add(itm);
                itm = null;

                ddlAttributeType.DataSource     = LookupAtrributes.GetAllAttributeAndValuesByFOR(AttributeOptionFor, "AttributeType").MasterAttributeValues;
                ddlAttributeType.DataTextField  = "AttributeValue";
                ddlAttributeType.DataValueField = "MasterAttributeValue_Id";
                ddlAttributeType.DataBind();

                scriptMan.RegisterAsyncPostBackControl(ddlAttributeType);

                DropDownList ddlAttributeSubType = (DropDownList)frmClassificationAttribute.FindControl("ddlAttributeSubType");
                ddlAttributeSubType.Items.Clear();
                itm = new ListItem("-Select-", "0");
                ddlAttributeSubType.Items.Add(itm);
                itm = null;

                var result = LookupAtrributes.GetAllAttributeAndValuesByFOR(AttributeOptionFor, "AttributeSubType").MasterAttributeValues;

                ddlAttributeSubType.DataSource     = (from r in result where r.ParentAttributeValue == AttributeType select new { r.MasterAttributeValue_Id, r.AttributeValue }).ToList();
                ddlAttributeSubType.DataTextField  = "AttributeValue";
                ddlAttributeSubType.DataValueField = "MasterAttributeValue_Id";
                ddlAttributeSubType.DataBind();
            }
        }
Exemplo n.º 8
0
 private void fillStarRating()
 {
     try
     {
         ddlStarRating.DataSource     = LookupAtrributes.GetAllAttributeAndValuesByFOR("hotelinfo", "Stars").MasterAttributeValues;
         ddlStarRating.DataTextField  = "AttributeValue";
         ddlStarRating.DataValueField = "MasterAttributeValue_Id";
         ddlStarRating.DataBind();
         ddlStarRating.Items.Insert(0, new ListItem("---ALL---", "0"));
     }
     catch (Exception)
     {
         throw;
     }
 }
Exemplo n.º 9
0
        protected void GetLookupValues()
        {
            DropDownList ddlPlaceCategory = (DropDownList)frmLandmark.FindControl("ddlPlaceCategory");
            DropDownList ddlUnitOfMeasure = (DropDownList)frmLandmark.FindControl("ddlUnitOfMeasure");

            ddlPlaceCategory.DataSource     = LookupAtrributes.GetAllAttributeAndValuesByFOR("InAndAround", "PlaceCategoryGoogle").MasterAttributeValues;
            ddlPlaceCategory.DataTextField  = "AttributeValue";
            ddlPlaceCategory.DataValueField = "MasterAttributeValue_Id";
            ddlPlaceCategory.DataBind();

            ddlUnitOfMeasure.DataSource     = LookupAtrributes.GetAllAttributeAndValuesByFOR(AttributeOptionFor, "UnitOfMeasurement").MasterAttributeValues;
            ddlUnitOfMeasure.DataTextField  = "AttributeValue";
            ddlUnitOfMeasure.DataValueField = "MasterAttributeValue_Id";
            ddlUnitOfMeasure.DataBind();
        }
Exemplo n.º 10
0
        protected void GetLookUpValues()
        {
            DropDownList ddlHSCategory = (DropDownList)frmHealthAndSafety.FindControl("ddlHSCategory");
            DropDownList ddlHSName     = (DropDownList)frmHealthAndSafety.FindControl("ddlHSName");

            ddlHSCategory.DataSource     = LookupAtrributes.GetAllAttributeAndValuesByFOR(AttributeOptionFor, "HealthAndSafetyCategory").MasterAttributeValues;
            ddlHSCategory.DataTextField  = "AttributeValue";
            ddlHSCategory.DataValueField = "MasterAttributeValue_Id";
            ddlHSCategory.DataBind();


            ddlHSName.DataSource     = LookupAtrributes.GetAllAttributeAndValuesByFOR(AttributeOptionFor, "Name").MasterAttributeValues;
            ddlHSName.DataTextField  = "AttributeValue";
            ddlHSName.DataValueField = "MasterAttributeValue_Id";
            ddlHSName.DataBind();
        }
Exemplo n.º 11
0
 protected void fillReviewType(DropDownList ddl)
 {
     try
     {
         ddl.Items.Clear();
         ddl.DataSource     = LookupAtrributes.GetAllAttributeAndValuesByFOR("Activity", "ActivityReviewType").MasterAttributeValues;
         ddl.DataTextField  = "AttributeValue";
         ddl.DataValueField = "MasterAttributeValue_Id";
         ddl.DataBind();
         ddl.Items.Insert(0, new ListItem("---Select---", "0"));
     }
     catch
     {
         throw;
     }
 }
 private void fillInclusionFor(DropDownList ddl)
 {
     try
     {
         ddl.Items.Clear();
         ddl.DataSource     = LookupAtrributes.GetAllAttributeAndValuesByFOR("Activity", "InclusionFor").MasterAttributeValues;
         ddl.DataTextField  = "AttributeValue";
         ddl.DataValueField = "MasterAttributeValue_Id";
         ddl.DataBind();
         ddl.Items.Insert(0, new ListItem("---ALL---", "0"));
     }
     catch (Exception)
     {
         throw;
     }
 }
Exemplo n.º 13
0
 private void fillAttributeValues(DropDownList ddl, string Attribute_Name)
 {
     ddl.DataSource     = LookupAtrributes.GetAllAttributeAndValuesByFOR(AttributeOptionFor, Attribute_Name).MasterAttributeValues;
     ddl.DataTextField  = "AttributeValue";
     ddl.DataValueField = "MasterAttributeValue_Id";
     ddl.DataBind();
 }
Exemplo n.º 14
0
        public void ProcessRequest(HttpContext context)
        {
            var OptionFor      = context.Request.QueryString["OptionFor"];
            var Attribute_Name = context.Request.QueryString["Attribute_Name"];
            var result         = LookupAtrributes.GetAllAttributeAndValuesByFOR(OptionFor, Attribute_Name).MasterAttributeValues;

            context.Response.Write(new JavaScriptSerializer().Serialize(result));
        }
 private void BindCategory()
 {
     ddlPlaceCategory.Items.Clear();
     ddlPlaceCategory.DataSource     = LookupAtrributes.GetAllAttributeAndValuesByFOR("InAndAround", "PlaceCategoryGoogle").MasterAttributeValues;
     ddlPlaceCategory.DataTextField  = "AttributeValue";
     ddlPlaceCategory.DataValueField = "MasterAttributeValue_Id";
     ddlPlaceCategory.DataBind();
     ddlPlaceCategory.Items.Insert(0, new ListItem("select", "0"));
 }
Exemplo n.º 16
0
        //RoomAmenityType

        #region Binding Code



        protected void GetLookUpValues()
        {
            DropDownList ddlFacilityCategory = (DropDownList)frmRoomAmenity.FindControl("ddlFacilityCategory");

            ddlFacilityCategory.DataSource     = LookupAtrributes.GetAllAttributeAndValuesByFOR(AttributeOptionFor, "RoomAmenityType").MasterAttributeValues;
            ddlFacilityCategory.DataTextField  = "AttributeValue";
            ddlFacilityCategory.DataValueField = "MasterAttributeValue_Id";
            ddlFacilityCategory.DataBind();
        }
Exemplo n.º 17
0
        protected void GetDescriptionType()
        {
            DropDownList ddlDescriptionType = (DropDownList)frmDescriptionDetail.FindControl("ddlDescriptionType");


            ddlDescriptionType.DataSource     = LookupAtrributes.GetAllAttributeAndValuesByFOR(AttributeOptionFor, "DescriptionType").MasterAttributeValues;
            ddlDescriptionType.DataTextField  = "AttributeValue";
            ddlDescriptionType.DataValueField = "MasterAttributeValue_Id";
            ddlDescriptionType.DataBind();
        }
Exemplo n.º 18
0
        protected void GetLookupValues()
        {
            DropDownList ddlCompanyRoomCategory = (DropDownList)frmRoomInfo.FindControl("ddlCompanyRoomCategory");

            ddlCompanyRoomCategory.DataSource     = LookupAtrributes.GetAllAttributeAndValuesByFOR(AttributeOptionFor, "CompanyRoomCategory").MasterAttributeValues;
            ddlCompanyRoomCategory.DataTextField  = "AttributeValue";
            ddlCompanyRoomCategory.DataValueField = "MasterAttributeValue_Id";
            ddlCompanyRoomCategory.DataBind();

            DropDownList ddlBedType = (DropDownList)frmRoomInfo.FindControl("ddlBedType");

            ddlBedType.DataSource     = LookupAtrributes.GetAllAttributeAndValuesByFOR(AttributeOptionFor, "BedType").MasterAttributeValues;
            ddlBedType.DataTextField  = "AttributeValue";
            ddlBedType.DataValueField = "MasterAttributeValue_Id";
            ddlBedType.DataBind();


            DropDownList ddlBathRoomType = (DropDownList)frmRoomInfo.FindControl("ddlBathRoomType");

            ddlBathRoomType.DataSource     = LookupAtrributes.GetAllAttributeAndValuesByFOR(AttributeOptionFor, "BathRoomType").MasterAttributeValues;
            ddlBathRoomType.DataTextField  = "AttributeValue";
            ddlBathRoomType.DataValueField = "MasterAttributeValue_Id";
            ddlBathRoomType.DataBind();
        }
Exemplo n.º 19
0
 private void fillActivityStatusMaster(DropDownList ddlActivityStatus)
 {
     try
     {
         ddlActivityStatus.Items.Clear();
         ddlActivityStatus.DataSource     = LookupAtrributes.GetAllAttributeAndValuesByFOR("Activity", "Activity_Status").MasterAttributeValues;
         ddlActivityStatus.DataTextField  = "AttributeValue";
         ddlActivityStatus.DataValueField = "MasterAttributeValue_Id";
         ddlActivityStatus.DataBind();
     }
     catch
     {
         throw;
     }
 }
Exemplo n.º 20
0
        protected void GetMasterData()
        {
            DropDownList ddlCompanyMarket = (DropDownList)frmActivityStatus.FindControl("ddlCompanyMarket");

            ddlCompanyMarket.DataSource     = LookupAtrributes.GetAllAttributeAndValuesByFOR("Activity", "CompanyMarket").MasterAttributeValues;
            ddlCompanyMarket.DataTextField  = "AttributeValue";
            ddlCompanyMarket.DataValueField = "MasterAttributeValue_Id";
            ddlCompanyMarket.DataBind();

            DropDownList ddlStatus = (DropDownList)frmActivityStatus.FindControl("ddlStatus");

            //ddlStatus.DataSource = MasterData.getAllStatuses();
            ddlStatus.DataSource     = _objMasterData.GetAllStatuses();
            ddlStatus.DataTextField  = "Status_Name";
            ddlStatus.DataValueField = "Status_Short";
            ddlStatus.DataBind();
        }
 private void fillProductRating(DropDownList ddl)
 {
     try
     {
         ddl.Items.Clear();
         ddl.DataSource     = LookupAtrributes.GetAllAttributeAndValuesByFOR("Activity", "Activity_Product_Rating").MasterAttributeValues;
         ddl.DataTextField  = "AttributeValue";
         ddl.DataValueField = "MasterAttributeValue_Id";
         ddl.DataBind();
         ddl.Items.Insert(0, new ListItem("---ALL---", "0"));
     }
     catch
     {
         throw;
     }
 }
Exemplo n.º 22
0
        private void fillAccomodationPriority(ListBox ddl)
        {
            lookupAttributeDAL LookupAtrributes = new lookupAttributeDAL();

            MDMSVC.DC_M_masterattributelists list = LookupAtrributes.GetAllAttributeAndValuesByFOR("Accommodation", "Priority");

            try
            {
                list.MasterAttributeValues = list.MasterAttributeValues.OrderBy(x => Convert.ToInt32(x.AttributeValue)).ToArray();
            }
            catch
            {
            }
            ddl.Items.Clear();
            ddl.DataSource     = list.MasterAttributeValues;
            ddl.DataValueField = "AttributeValue";
            ddl.DataTextField  = "OTA_CodeTableValue";
            ddl.DataBind();
        }