//
        // GET: /QuestionsCategory/Edit/5
        public ActionResult Edit(int id)
        {
            var _categoryBAL             = new CategoryBAL();
            QuestionsCategory _QCategory = _categoryBAL.GetCategoryById(id);
            var model = new CategoryModel();

            model.Id          = _QCategory.Id;
            model.Name        = _QCategory.Name;
            model.IsActive    = _QCategory.IsActive;
            model.CreatedBy   = _QCategory.CreatedBy;
            model.CreatedDate = _QCategory.CreatedDate;

            return(View(model));
        }
        public ActionResult Delete(int id, CategoryModel model)
        {
            try
            {
                CategoryBAL       _categoryBAL = new CategoryBAL();
                QuestionsCategory Qcategory    = _categoryBAL.GetCategoryById(id);
                Qcategory.Id          = model.Id;
                Qcategory.Name        = model.Name;
                Qcategory.UpdatedBy   = "Admin";
                Qcategory.UpdatedDate = DateTime.Now.ToUniversalTime();
                _categoryBAL.DeleteQuestoinsCategory(Qcategory);

                return(RedirectToAction("Index"));
            }
            catch
            {
                return(View());
            }
        }