Example #1
0
        private void BindProductCategory(DropDownList ddlProductCategoryBind)
        {
            var result = _objMaster.GetAllAttributeAndValues(new MDMSVC.DC_MasterAttribute()
            {
                MasterFor = "SupplierInfo", Name = "ProductCategory"
            });

            if (result != null)
            {
                if (result.Count > 0)
                {
                    ddlProductCategoryBind.Items.Clear();
                    ddlProductCategoryBind.DataSource     = result;
                    ddlProductCategoryBind.DataTextField  = "AttributeValue";
                    ddlProductCategoryBind.DataValueField = "MasterAttributeValue_Id";
                    ddlProductCategoryBind.DataBind();
                    ddlProductCategoryBind.Items.Insert(0, new ListItem {
                        Text = "--Select--", Value = "0"
                    });
                }
            }
        }
Example #2
0
        public void fillattributes(string masterfor, string attributename, DropDownList ddl)
        {
            ddl.Items.Clear();
            MDMSVC.DC_MasterAttribute RQ = new MDMSVC.DC_MasterAttribute();
            RQ.MasterFor = masterfor;
            RQ.Name      = attributename;
            var resvalues = _objMasterSVC.GetAllAttributeAndValues(RQ);

            ddl.DataSource     = resvalues;
            ddl.DataTextField  = "AttributeValue";
            ddl.DataValueField = "MasterAttributeValue_Id";
            ddl.DataBind();
            ddl.Items.Insert(0, new ListItem("--ALL--", "0"));
            RQ        = null;
            resvalues = null;
        }
        private void fillentities()
        {
            var result = _objMaster.GetAllAttributeAndValues(new MDMSVC.DC_MasterAttribute()
            {
                MasterFor = "MappingFileConfig", Name = "MappingEntity"
            });

            if (result != null)
            {
                if (result.Count > 0)
                {
                    ddlEntity.DataSource     = result;
                    ddlEntity.DataTextField  = "AttributeValue";
                    ddlEntity.DataValueField = "MasterAttributeValue_Id";
                    ddlEntity.DataBind();
                }
            }
        }
        //public static string AttributeOptionFor = "SupplierInfo";
        //public static Guid mySupplier_Id = Guid.Empty;
        private void BindMainSupplierData()
        {
            DropDownList ddlSupplierType = (DropDownList)frmSupplierDetail.FindControl("ddlSupplierType");

            var result = _objMaster.GetAllAttributeAndValues(new MDMSVC.DC_MasterAttribute()
            {
                MasterFor = "SupplierInfo", Name = "SupplierType"
            });

            if (result != null)
            {
                if (result.Count > 0)
                {
                    ddlSupplierType.Items.Clear();
                    ddlSupplierType.DataSource     = result;
                    ddlSupplierType.DataTextField  = "AttributeValue";
                    ddlSupplierType.DataValueField = "MasterAttributeValue_Id";
                    ddlSupplierType.DataBind();
                    ddlSupplierType.Items.Insert(0, new ListItem {
                        Text = "--Select--", Value = "0"
                    });
                }
            }
        }