Exemplo n.º 1
0
        private void SetDataSourceFromCategoryProvider()
        {
            ods.TypeName     = typeof(CustomerDAC).FullName;
            ods.EnablePaging = true;
            ods.SelectParameters.Clear();
            ods.SelectParameters.Add("categoryID", CategoryID.ToString());
            ods.SelectParameters.Add("providerID", ProviderID.ToString());
            ods.SelectParameters.Add("stFrom", dtFrom.ToString());
            ods.SelectParameters.Add("stTo", dtTo.ToString());
            ods.SelectParameters.Add("ageFrom", AgeFrom.ToString());
            ods.SelectParameters.Add("ageTo", AgeTo.ToString());
            ods.SelectParameters.Add("suburbID", SuburbID.ToString());

            ods.SelectParameters.Add("MonFilter", MonFilter.ToString());
            ods.SelectParameters.Add("TueFilter", TueFilter.ToString());
            ods.SelectParameters.Add("WedFilter", WedFilter.ToString());
            ods.SelectParameters.Add("ThursFilter", ThursFilter.ToString());
            ods.SelectParameters.Add("FriFilter", FriFilter.ToString());
            ods.SelectParameters.Add("SatFilter", SatFilter.ToString());
            ods.SelectParameters.Add("SunFilter", SunFilter.ToString());

            ods.SelectMethod                = "RetrieveProviderActivities";
            ods.SelectCountMethod           = "RetrieveProviderActivitiesCount";
            ods.MaximumRowsParameterName    = "amount";
            ods.StartRowIndexParameterName  = "startIndex";
            ods.SortParameterName           = "sortExpression";
            GridViewActivities.PageSize     = PageSize;
            GridViewActivities.DataSourceID = "ods";
            SortProducts();
            //DataPager1.SetPageProperties(StartRow, DataPager1.MaximumRows, false);
            //ListViewProducts.DataBind();
        }
Exemplo n.º 2
0
        public AddCheeseViewModel(IEnumerable <CheeseCategory> cheeseCategories)
        {
            //CheeseTypes = new List<SelectListItem>();

            //foreach (var cheeseType in Enum.GetValues(typeof(CheeseType)))
            //{
            //    CheeseTypes.Add(new SelectListItem
            //    {
            //        Value = ((int)cheeseType).ToString(),
            //        Text = cheeseType.ToString()
            //    }); ;
            //}
            cheeseCategory = new List <SelectListItem>();

            if (!cheeseCategories.Any())
            {
                cheeseCategory.Add(new SelectListItem
                {
                    Value = '0'.ToString(),
                    Text  = "Empty"
                });
                return;
            }
            foreach (var category in cheeseCategories)
            {
                cheeseCategory.Add(new SelectListItem {
                    Value = CategoryID.ToString(),
                    Text  = Category.Name
                });
            }
        }
Exemplo n.º 3
0
        private void SetDataSourcebySearchKey(String SearchPhrase)
        {
            ods.TypeName     = typeof(CustomerDAC).FullName;
            ods.EnablePaging = true;
            ods.SelectParameters.Clear();

            ods.SelectParameters.Add("providerID", ProviderID.ToString());
            ods.SelectParameters.Add("searchKey", SearchPhrase);


            ods.SelectParameters.Add("ageFrom", AgeFrom.ToString());
            ods.SelectParameters.Add("ageTo", AgeTo.ToString());

            ods.SelectParameters.Add("RewardType", RewardType.ToString());
            ods.SelectParameters.Add("categoryID", CategoryID.ToString());

            ods.SelectMethod               = "RetrieveAdminRewardsbySearchPhrase";
            ods.SelectCountMethod          = "RetrieveAdminRewardsbySearchPhraseCount";
            ods.MaximumRowsParameterName   = "amount";
            ods.StartRowIndexParameterName = "startIndex";
            ods.SortParameterName          = "sortExpression";

            ListViewRewards.DataSourceID = "ods";

            SortProducts();
        }
        private void LoadLanguages()
        {
            CategoryID category;

            listLanguages = new List <CategoryID>();
            string query = "SELECT language.`language_id`, language.`name` FROM language";

            try
            {
                command.CommandText = query;
                reader = command.ExecuteReader();
                listLanguages.Clear();

                while (reader.Read())
                {
                    category = new CategoryID(reader[0].ToString(), reader["name"].ToString());
                    listLanguages.Add(category);
                }

                bind(cbxLanguages, listLanguages);
                cbxLanguages.SelectedIndex = -1;
                cbxLanguages.Text          = "Choose Language";

                if (reader != null)
                {
                    reader.Close();
                }
            }
            catch (Exception ex) { MessageBox.Show(ex.Message); }
        }
Exemplo n.º 5
0
 /// <summary>
 /// Gets the SPDiagnosticsCategory corresponding to a specified CategoryID enum value.
 /// </summary>
 /// <param name="id">A CategoryID enum value.</param>
 /// <returns>A corresponding SPDiagnosticsCategory.</returns>
 public SPDiagnosticsCategory this[CategoryID id]
 {
     get
     {
         return(Areas[diagAreaName].Categories[id.ToString()]);
     }
 }
Exemplo n.º 6
0
    protected void Page_Load(object sender, EventArgs e)
    {
        UTLUtilities.CL_ActiveModule = 7;
        this.CheckUserSession();
        this.Page.Header.Title = "www.apnerdeal.com ";
        this.CheckQueryString();
        if (!Page.IsPostBack)
        {
            string strSku = this.Get_Last_ProfileSpecificSKU(intProfileID, _ClassifiedSeller);
            this.Generate_ProfileSpecific_UniqueSKU(strSku);
            this.LoadRecord_Category();
            if (CategoryID > 0 && SubcategoryID > 0)
            {
                ddlCategory.SelectedValue = CategoryID.ToString();
                this.LoadRecord_Subcategory(CategoryID);
                ddlSubcategory.SelectedValue = SubcategoryID.ToString();
                this.LoadRecord_2ndSubcategory(CategoryID, SubcategoryID);

                if (CategoryID == 1 || CategoryID == 8)
                {
                    pnlModel.Visible = false;
                    pnlModel.Enabled = false;
                }
                else
                {
                    pnlModel.Visible = true;
                    pnlModel.Enabled = true;
                }
            }
        }
    }
        private void LoadRatings()
        {
            CategoryID category;

            listRatings = new List <CategoryID>();
            string query   = "SELECT DISTINCT film.`rating` AS `name` FROM film";
            int    counter = -1;

            try
            {
                command.CommandText = query;
                reader = command.ExecuteReader();
                listRatings.Clear();

                while (reader.Read())
                {
                    category = new CategoryID(counter++.ToString(), reader["name"].ToString());
                    listRatings.Add(category);
                }

                bind(cbxRatings, listRatings);
                cbxRatings.SelectedIndex = -1;
                cbxRatings.Text          = "Choose Rating";

                if (reader != null)
                {
                    reader.Close();
                }
            }
            catch (Exception ex) { MessageBox.Show(ex.Message); }
        }
 private void InitializeControls()
 {
     insideDhakaCtrl.CategoryID  = CategoryID;
     outsideDhakaCtrl.CategoryID = CategoryID;
     rangeCtrl.CategoryID        = CategoryID.ToString();
     rangeCtrl.SubcategoryID     = ddlSubcategory.SelectedValue;
 }
Exemplo n.º 9
0
        /// <summary>
        /// Checks for at least one filter in the GetCategory request.
        /// See GetCategory Post https://developers.neto.com.au/documentation/engineers/api-documentation/categories/getcategory
        /// </summary>
        /// <returns></returns>
        internal override bool isValid()
        {
            if (DatePostedFrom != DateTime.MinValue)
            {
                return(true);
            }

            if (DatePostedTo != DateTime.MinValue)
            {
                return(true);
            }

            if (DateUpdatedFrom != DateTime.MinValue)
            {
                return(true);
            }

            if (DateUpdatedTo != DateTime.MinValue)
            {
                return(true);
            }

            int requiredFilterCount = CategoryID.NullSafeLength() +
                                      ParentCategoryID.NullSafeLength() +
                                      CategoryName.NullSafeLength();

            if (requiredFilterCount != 0)
            {
                return(true);
            }

            throw new NetoRequestException("At least one filter is required in the GetCategory request");
        }
Exemplo n.º 10
0
        private void SetDataSourcebySearchKey(String SearchPhrase)
        {
            ods.TypeName     = typeof(CustomerDAC).FullName;
            ods.EnablePaging = true;
            ods.SelectParameters.Clear();
            ods.SelectParameters.Add("searchKey", SearchPhrase);
            ods.SelectParameters.Add("providerID", ProviderID.ToString());
            ods.SelectParameters.Add("ageFrom", AgeFrom.ToString());
            ods.SelectParameters.Add("ageTo", AgeTo.ToString());
            ods.SelectParameters.Add("stFrom", dtFrom.ToString());
            ods.SelectParameters.Add("stTo", dtTo.ToString());
            ods.SelectParameters.Add("tmFrom", tmFrom.ToString());
            ods.SelectParameters.Add("tmTo", tmTo.ToString());
            ods.SelectParameters.Add("suburbID", SuburbID.ToString());
            ods.SelectParameters.Add("categoryID", CategoryID.ToString());

            ods.SelectParameters.Add("MonFilter", MonFilter.ToString());
            ods.SelectParameters.Add("TueFilter", TueFilter.ToString());
            ods.SelectParameters.Add("WedFilter", WedFilter.ToString());
            ods.SelectParameters.Add("ThursFilter", ThursFilter.ToString());
            ods.SelectParameters.Add("FriFilter", FriFilter.ToString());
            ods.SelectParameters.Add("SatFilter", SatFilter.ToString());
            ods.SelectParameters.Add("SunFilter", SunFilter.ToString());

            ods.SelectMethod               = "RetrieveProviderActivitiesbySearchPhrase";
            ods.SelectCountMethod          = "RetrieveProviderActivitiesbySearchPhraseCount";
            ods.MaximumRowsParameterName   = "amount";
            ods.StartRowIndexParameterName = "startIndex";
            ods.SortParameterName          = "sortExpression";

            ListViewActivities.DataSourceID = "ods";

            SortProducts();
        }
Exemplo n.º 11
0
 public override string ToString()
 {
     return(string.Concat(new string[] {
         "CategoryID: ", CategoryID.ToString(),
         "Description: ", Description
     }));
 }
Exemplo n.º 12
0
    public void SaveInfo()
    {
        if (CategoryID.IsNoNull())
        {
            objCategory = objLogRule.loger_category.First(p => p.CategoryID == CategoryID);
            objCategory.CategoryName     = txtCategoryName.Text;
            objCategory.LogWriteType     = chkLogWriteType.SelectValueString;
            objCategory.CategoryTypeCode = txtCategoryTypeCode.Text.Trim();

            if (objLogRule.loger_category.Any(s => s.ApplicationID == objCategory.ApplicationID && s.CategoryID != objCategory.CategoryID && s.CategoryTypeCode == objCategory.CategoryTypeCode))
            {
                MessageDialog("输入的日志类型代码已经存在");
                return;
            }
            objLogRule.SaveChanges();
            MessageDialog("修改成功", "ApplicationInfo.aspx?ApplicationID=" + ApplicationID);
        }
        else
        {
            objCategory = new loger_category();
            objCategory.CategoryName     = txtCategoryName.Text;
            objCategory.LogWriteType     = chkLogWriteType.SelectValueString;
            objCategory.CategoryTypeCode = txtCategoryTypeCode.Text.Trim();
            objCategory.ApplicationID    = ApplicationID;
            objLogRule.InsertCategory(objCategory);
            MessageDialog("新增成功", "ApplicationInfo.aspx?ApplicationID=" + ApplicationID);
        }
    }
Exemplo n.º 13
0
        /// <summary>
        /// Handles the Load event of the Page control.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param>
        protected void Page_Load(object sender, EventArgs e)
        {
            //radCategories.DataTextField = "Title";
            //radCategories.DataNavigateUrlField = "Url";
            //radCategories.DataFieldID = "Id";
            //radCategories.DataFieldParentID = "ParentId";

            //radCategories.DataSource =
            //radCategories.DataBind();

            //var currentItem = radCategories.FindItemByUrl(Request.Url.PathAndQuery);
            //if (currentItem != null)
            //    currentItem.HighlightPath();


            var categories = dataManager.ProductCategory.SelectHierarchy(SiteID);


            radProductCategoryTreeView.DataSource        = GetCategories();
            radProductCategoryTreeView.DataTextField     = "Title";
            radProductCategoryTreeView.DataFieldID       = "Id";
            radProductCategoryTreeView.DataValueField    = "Id";
            radProductCategoryTreeView.DataFieldParentID = "ParentId";
            radProductCategoryTreeView.DataBind();

            if (CategoryID != Guid.Empty)
            {
                RadTreeNode rtn = radProductCategoryTreeView.FindNodeByValue(CategoryID.ToString());
                rtn.Expanded = true;
                rtn.Selected = true;
                rtn.ExpandParentNodes();
            }
        }
Exemplo n.º 14
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         this.CategoryID.DataSource = Category.selectC();
         CategoryID.DataBind();
     }
 }
Exemplo n.º 15
0
 private void Categories_Load(object sender, EventArgs e)
 {
     resetText();
     CategoryID.Focus();
     dataGridView1.DataSource = tl.getList();
     CategoryID.Text          = dataGridView1.Rows.Count.ToString("00");
     dataGridView1.AutoResizeColumns();
 }
Exemplo n.º 16
0
 public override int GetHashCode()
 {
     unchecked {
         var hashCode = CategoryID.GetHashCode();
         hashCode = (hashCode * 397) ^ Dices?.GetHashCode() ?? 0;
         return(hashCode);
     }
 }
Exemplo n.º 17
0
 public override void RenderPage()
 {
     if (CategoryID.IsNoNull())
     {
         objCategory = objLogRule.loger_category.First(p => p.CategoryID == CategoryID);
         chkLogWriteType.SetSelectValue(objCategory.LogWriteType);
         Page.DataBind();
     }
 }
Exemplo n.º 18
0
    public override int GetHashCode()
    {
        int hashcode = 157;

        unchecked {
            if (__isset.mid)
            {
                hashcode = (hashcode * 397) + Mid.GetHashCode();
            }
            if (__isset.name)
            {
                hashcode = (hashcode * 397) + Name.GetHashCode();
            }
            if (__isset.welcomeMessage)
            {
                hashcode = (hashcode * 397) + WelcomeMessage.GetHashCode();
            }
            if (__isset.profileImageObsHash)
            {
                hashcode = (hashcode * 397) + ProfileImageObsHash.GetHashCode();
            }
            if (__isset.desc)
            {
                hashcode = (hashcode * 397) + Desc.GetHashCode();
            }
            if (__isset.searchable)
            {
                hashcode = (hashcode * 397) + Searchable.GetHashCode();
            }
            if (__isset.type)
            {
                hashcode = (hashcode * 397) + Type.GetHashCode();
            }
            if (__isset.categoryID)
            {
                hashcode = (hashcode * 397) + CategoryID.GetHashCode();
            }
            if (__isset.invitationURL)
            {
                hashcode = (hashcode * 397) + InvitationURL.GetHashCode();
            }
            if (__isset.revision)
            {
                hashcode = (hashcode * 397) + Revision.GetHashCode();
            }
            if (__isset.ableToUseInvitationTicket)
            {
                hashcode = (hashcode * 397) + AbleToUseInvitationTicket.GetHashCode();
            }
            if (__isset.state)
            {
                hashcode = (hashcode * 397) + State.GetHashCode();
            }
        }
        return(hashcode);
    }
        public AddCheeseViewModel(IEnumerable <CheeseCategory> categories)
        {
            Categories = new List <SelectListItem>();

            Categories.Add(new SelectListItem
            {
                Value = CategoryID.ToString(),
                Text  = Name.ToString()
            });
        }
Exemplo n.º 20
0
        public override int GetHashCode()
        {
            unchecked
            {
                int hash = 17;
                hash = hash * 23 + CategoryID.GetHashCode();

                return(hash);
            }
        }
 protected void repProvince_ItemCommand(object source, RepeaterCommandEventArgs e)
 {
     if (LinkClicked != null)
     {
         MenuEventArgs mnuEvent = new MenuEventArgs();
         mnuEvent.CategoryID    = CategoryID.ToString();
         mnuEvent.SubcategoryID = SubcategoryID.ToString();
         mnuEvent.AreaID        = e.CommandArgument.ToString();
         this.LinkClicked(this, mnuEvent);
     }
 }
Exemplo n.º 22
0
        /// <summary>
        /// Override of the ToString method.
        /// </summary>
        /// <returns>Supplier ID, Type and Company Name</returns>
        public override string ToString()
        {
            StringBuilder sb = new StringBuilder();

            sb.Append("Product Name: ");
            sb.Append(ProductName);
            sb.Append("\tCategory ID: ");
            sb.Append(CategoryID.ToString());
            sb.Append("\tSupplier ID ");
            sb.Append(SupplierID.ToString());
            return(sb.ToString());
        }
Exemplo n.º 23
0
        private void BindData()
        {
            DataTable dt = new DataTable();

            dt.Columns.Add("code");
            dt.Columns.Add("status");

            foreach (int code in Enum.GetValues(typeof(ProductStatus)))
            {
                DataRow row = dt.NewRow();
                row["code"]   = code;
                row["status"] = Enum.GetName(typeof(ProductStatus), code);
                dt.Rows.Add(row);
            }

            drpStatus.DataSource     = dt;
            drpStatus.DataTextField  = "status";
            drpStatus.DataValueField = "code";
            drpStatus.DataBind();

            DropDown_Brand.DataSource     = new BrandCategoryRelationBll().GetCategoryBrandList(CategoryID);
            DropDown_Brand.DataTextField  = "brandname";
            DropDown_Brand.DataValueField = "brandid";
            DropDown_Brand.DataBind();

            Label_CategoryNamePath.Text = new CategoryModelBll().GetCategoryNamePath(CategoryID);
            txtCategoryID.Value         = CategoryID.ToString();


            DropDown_Packing.DataSource     = AddSelectRow(new ProductSpecificationBll().GetList(SpecificationType.包装清单));
            DropDown_Packing.DataTextField  = "title";
            DropDown_Packing.DataValueField = "content";
            DropDown_Packing.DataBind();

            DropDown_Service.DataSource     = AddSelectRow(new ProductSpecificationBll().GetList(SpecificationType.售后服务));
            DropDown_Service.DataTextField  = "title";
            DropDown_Service.DataValueField = "content";
            DropDown_Service.DataBind();

            DropDown_OfferSet.DataSource     = AddSelectRow(new ProductSpecificationBll().GetList(SpecificationType.优惠套装));
            DropDown_OfferSet.DataTextField  = "title";
            DropDown_OfferSet.DataValueField = "content";
            DropDown_OfferSet.DataBind();

            DropDown_Specification.DataSource     = AddSelectRow(new ProductSpecificationBll().GetList(SpecificationType.规格参数));
            DropDown_Specification.DataTextField  = "title";
            DropDown_Specification.DataValueField = "content";
            DropDown_Specification.DataBind();

            txtProductCode.Text = ProductID.ToString();
        }
Exemplo n.º 24
0
        /// <summary>
        /// Checks for at least one filter in the GetItem request.
        /// See GetItem Post https://developers.neto.com.au/documentation/engineers/api-documentation/products/getitem
        /// </summary>
        /// <returns>bool</returns>
        internal override bool isValid()
        {
            if (!string.IsNullOrWhiteSpace(ParentSKU))
            {
                return(true);
            }

            if (DateAddedFrom != DateTime.MinValue)
            {
                return(true);
            }

            if (DateAddedTo != DateTime.MinValue)
            {
                return(true);
            }

            if (DateUpdatedFrom != DateTime.MinValue)
            {
                return(true);
            }

            if (DateUpdatedTo != DateTime.MinValue)
            {
                return(true);
            }

            int requiredFilterCount = SKU.NullSafeLength() +
                                      AccountingCode.NullSafeLength() +
                                      InventoryID.NullSafeLength() +
                                      Brand.NullSafeLength() +
                                      Model.NullSafeLength() +
                                      Name.NullSafeLength() +
                                      PrimarySupplier.NullSafeLength() +
                                      Approved.NullSafeLength() +
                                      ApprovedForPOS.NullSafeLength() +
                                      ApprovedForMobileStore.NullSafeLength() +
                                      SalesChannels.NullSafeLength() +
                                      Visible.NullSafeLength() +
                                      IsActive.NullSafeLength() +
                                      CategoryID.NullSafeLength();


            if (requiredFilterCount != 0)
            {
                return(true);
            }

            throw new NetoRequestException("At least one filter is required in the GetItem request");
        }
Exemplo n.º 25
0
        public override int GetHashCode()
        {
            var hashCode = 1145259212;

            hashCode = hashCode * -1521134295 + EqualityComparer <string> .Default.GetHashCode(Name);

            hashCode = hashCode * -1521134295 + Articul.GetHashCode();
            hashCode = hashCode * -1521134295 + EqualityComparer <string> .Default.GetHashCode(Description);

            hashCode = hashCode * -1521134295 + EqualityComparer <Image> .Default.GetHashCode(Image);

            hashCode = hashCode * -1521134295 + CategoryID.GetHashCode();
            return(hashCode);
        }
Exemplo n.º 26
0
 public MainPage Add(string Product, string Price, string Quantity, string Stock, string Order, string Level)
 {
     AllProducts.Click();
     CreateNew.Click();
     ProductName.SendKeys(Product);
     CategoryID.FindElement(By.XPath("//option[. = 'Seafood']")).Click();
     SupplierID.FindElement(By.XPath("//option[. = 'Leka Trading']")).Click();
     UnitPrice.SendKeys(Price);
     QuantityPerUnit.SendKeys(Quantity);
     UnitsInStock.SendKeys(Stock);
     UnitsOnOrder.SendKeys(Order);
     ReorderLevel.SendKeys(Level);
     Confirm.Click();
     return(new MainPage(driver));
 }
Exemplo n.º 27
0
        private void SetDataSourcebyProviderCategory()
        {
            ods.TypeName     = typeof(ProviderDAC).FullName;
            ods.EnablePaging = true;
            ods.SelectParameters.Clear();
            ods.SelectParameters.Add("categoryID", CategoryID.ToString());
            ods.SelectParameters.Add("providerID", ProviderID.ToString());
            ods.SelectMethod               = "RetrieveProviderActivities";
            ods.SelectCountMethod          = "RetrieveProviderActivitiesCount";
            ods.MaximumRowsParameterName   = "amount";
            ods.StartRowIndexParameterName = "startIndex";
            ods.SortParameterName          = "sortExpression";

            ListViewActivities.DataSourceID = "ods";
            SortProducts();
        }
Exemplo n.º 28
0
 public MainPage Exist()
 {
     AllProducts.Click();
     TestProduct.Click();
     Assert.AreEqual(ProductName.GetAttribute("value"), "Test Product");
     Assert.AreEqual(CategoryID.FindElement(By.XPath("//option[. = 'Seafood']")).GetAttribute("text"), "Seafood");
     Assert.AreEqual(SupplierID.FindElement(By.XPath("//option[. = 'Leka Trading']")).GetAttribute("text"), "Leka Trading");
     Assert.AreEqual(UnitPrice.GetAttribute("value"), "111,0000");
     Assert.AreEqual(QuantityPerUnit.GetAttribute("value"), "222");
     Assert.AreEqual(UnitsInStock.GetAttribute("value"), "333");
     Assert.AreEqual(UnitsOnOrder.GetAttribute("value"), "444");
     Assert.AreEqual(ReorderLevel.GetAttribute("value"), "555");
     Home.Click();
     logoutField.Click();
     return(new MainPage(driver));
 }
Exemplo n.º 29
0
 private void SetDataSourceFromCategoryProvider()
 {
     ods.TypeName     = typeof(ProviderDAC).FullName;
     ods.EnablePaging = true;
     ods.SelectParameters.Clear();
     ods.SelectParameters.Add("categoryID", CategoryID.ToString());
     ods.SelectParameters.Add("providerID", ProviderID.ToString());
     ods.SelectMethod                = "RetrieveProviderActivities";
     ods.SelectCountMethod           = "RetrieveProviderActivitiesCount";
     ods.MaximumRowsParameterName    = "amount";
     ods.StartRowIndexParameterName  = "startIndex";
     ods.SortParameterName           = "sortExpression";
     GridViewActivities.PageSize     = PageSize;
     GridViewActivities.DataSourceID = "ods";
     SortProducts();
     //DataPager1.SetPageProperties(StartRow, DataPager1.MaximumRows, false);
     //ListViewProducts.DataBind();
 }
Exemplo n.º 30
0
        private void setCategoryAndParent(string href)
        {
            string encCat = String.Empty;

            if (Page.RouteData.Values["cat"] != null)
            {
                encCat                             = Page.RouteData.Values["cat"].ToString();
                aCategory.HRef                     = "";
                aCategory.Style["color"]           = "grey";
                aCategory.Style["text-decoration"] = "none";
            }
            else
            {
                encCat         = Encryption.Encrypt(CategoryID.ToString());
                aCategory.HRef = href + "cat/" + encCat + "/";
            }

            sep2.Visible = true;

            CATEGORY cat = ApplicationContext.Current.Categories.GetById(CategoryID);

            if (Session["Culture"] == null || Session["Culture"].ToString() != "en-US")
            {
                CategoryName = cat.Name;
            }
            else
            {
                CategoryName = cat.NameEng;
            }
            if (cat.ParentID.HasValue)
            {
                string encParent = Encryption.Encrypt(cat.ParentID.Value.ToString());
                if (Session["Culture"] == null || Session["Culture"].ToString() != "en-US")
                {
                    ParentCategoryName = cat.CATEGORY2.Name;
                }
                else
                {
                    ParentCategoryName = cat.CATEGORY2.NameEng;
                }
                aParentCategory.HRef = href + "cat/" + encParent + "/";
                sep.Visible          = true;
            }
        }