protected void BindCategory()
 {
     if (_CategoryID > 0)
     {
         App.Domain.FAQ.FaqCategoryManager manager = new App.Domain.FAQ.FaqCategoryManager();
         FaqCategory category = manager.Get(_CategoryID);
         if (category == null)
         {
             pnlDetails.Visible = false;
             AppUtil.ShowMessageBox(divMessage, "Sorry! Requested FAQ Category was not found in the system.", true);
         }
         else
         {
             txtCategory.Text = category.Category;
         }
     }
 }
    private void SaveCategory()
    {
        App.Domain.FAQ.FaqCategoryManager manager = new App.Domain.FAQ.FaqCategoryManager();
        FaqCategory category = null;
        if (_CategoryID == 0)
            category = new FaqCategory();
        else
            category = manager.Get(_CategoryID);

        if (category != null)
        {
            category.Category = txtCategory.Text.Trim();
            category.CatOrder = 5; //This is found hard coded in the old ASP Code
            category.EnteredBy = SessionCache.CurrentUser.Username;
            category.TimeStamp = DateTime.Now;

            manager.SaveOrUpdate(category);
        }
    }