public List<ModelAdminPage> GetAdminPagesList(int page = 0)
        {
            List<ModelAdminPage> ModelAdminPageList = new List<ModelAdminPage>();
            DataTable dt = new DataTable();
            dt = DALCommon.GetDataByStoredProcedure("sp_Admin_GetAdminPages");

            if (dt.Rows.Count > 0)
            {
                foreach (DataRow item in dt.Rows)
                {
                    ModelAdminPage objModelAdminPage = new ModelAdminPage();
                    objModelAdminPage.AdminPageID = Convert.ToDouble(item["AdminPageID"]);
                    objModelAdminPage.AdminPageNameEn = Convert.ToString(item["AdminPageNameEn"]);
                    objModelAdminPage.AdminPageNameAr = Convert.ToString(item["AdminPageNameAr"]);
                    objModelAdminPage.AdminPageURL = Convert.ToString(item["AdminPageURL"]);
                    objModelAdminPage.IsActive = Convert.ToBoolean(item["IsActive"]);
                    //objModelAdminPage.IsShowInMenu = Convert.ToBoolean(item["AddedDate"]);
                    objModelAdminPage.AdminPageAddedBy = Convert.ToDouble(item["AdminPageAddedBy"]);
                    objModelAdminPage.AddedDate = Convert.ToDateTime(item["AddedDate"]);
                    ModelAdminPageList.Add(objModelAdminPage);

                }
            }
            return ModelAdminPageList;
        }
        public decimal InsertAdminPage(ModelAdminPage objModelAdminPage)
        {
            SqlParameter[] param = new SqlParameter[5];

            param[0] = new SqlParameter("@AdminPageNameEn", objModelAdminPage.AdminPageNameEn);
            param[1] = new SqlParameter("@AdminPageNameAr", objModelAdminPage.AdminPageNameAr);
            param[2] = new SqlParameter("@AdminPageURL", objModelAdminPage.AdminPageURL);
            param[3] = new SqlParameter("@IsActive", objModelAdminPage.IsActive);
            // param[4] = new SqlParameter("@FeedTitlePath", objModelAdminPage.IsShowInMenu);
            param[4] = new SqlParameter("@AdminPageAddedBy", objModelAdminPage.AdminPageAddedBy);

            return DALCommon.ExecuteNonQueryReturnIdentity("sp_Admin_InsertAdminPages", param);
        }
        public ActionResult FormWebForm(ModelAdminPage objModelAdminPage)
        {
            if (ModelState.IsValid)
            {
                try
                {
                    if (Session[DALVariables.AdminUserNo] == null)
                    {
                        return RedirectToAction("Login", "Admin");
                    }

                    bllAdminPages = new BLLAdminPages();
                    decimal result = 0;
                    objModelAdminPage.AdminPageAddedBy = Convert.ToDouble(Session[DALVariables.AdminUserNo]);
                    result = bllAdminPages.InsertAdminPage(objModelAdminPage);
                    if (result > 0)
                    {
                        return View();
                    }
                    else
                    {
                        ModelState.AddModelError("", "Error occured while adding Admin page");
                        return View();
                    }
                }
                catch (Exception ex)
                {
                    DALUtility.ErrorLog(ex.Message, "AdminController, Login");
                }
            }
            else
            {
                ModelState.AddModelError("", "Check error of form; Please correct to continue!");
            }
            return View();
        }