none
I want to show category name in panel

    Question

  • <g class="gr_ gr_4 gr-alert gr_gramm gr_run_anim Punctuation only-ins replaceWithoutSep" data-gr-id="4" id="4">Hello</g> Guys! <g class="gr_ gr_15 gr-alert gr_tiny gr_spell gr_run_anim ContextualSpelling multiReplace" data-gr-id="15" id="15">i</g> want to show category name in panel <g class="gr_ gr_16 gr-alert gr_tiny gr_spell gr_run_anim ContextualSpelling multiReplace" data-gr-id="16" id="16">i</g> have code for <g class="gr_ gr_12 gr-alert gr_gramm gr_run_anim Grammar multiReplace" data-gr-id="12" id="12">hide</g> but <g class="gr_ gr_17 gr-alert gr_tiny gr_spell gr_run_anim ContextualSpelling multiReplace" data-gr-id="17" id="17">i</g> <g class="gr_ gr_5 gr-alert gr_spell gr_run_anim ContextualSpelling ins-del multiReplace" data-gr-id="5" id="5">dont</g> know how to show this category

    dbe = new Database1Entities();
                foreach (Control ctrl in flpCategories.Controls)
                {
                    var btn = ctrl as Button;
                    if (btn != null)
                    {
                        int id = int.Parse(btn.Tag.ToString());
                        var cat = dbe.tblCategory.FirstOrDefault(x => x.categoryId == id);
                        if (cat != null)
                        {
                            if (!((cat.StartTime.Value.Year <= DateTime.Now.Year && cat.StartTime.Value.Month <= DateTime.Now.Month && cat.StartTime.Value.Day <= DateTime.Now.Day && cat.StartTime.Value.Hour <= DateTime.Now.Hour && cat.StartTime.Value.Minute <= DateTime.Now.Minute) && (cat.EndTime.HasValue && cat.EndTime.Value.Year >= DateTime.Now.Year && cat.EndTime.Value.Month >= DateTime.Now.Month && cat.EndTime.Value.Day >= DateTime.Now.Day && cat.EndTime.Value.Hour >= DateTime.Now.Hour && cat.EndTime.Value.Minute >= DateTime.Now.Minute)))
                            {
                                flpCategories.Controls.Remove(ctrl);
                            }
                        }
                    }

    this code am using for hide category 

    but i want to know how to show category 

    Tuesday, October 11, 2016 8:49 PM

Answers