using LHDN.CRM.BC.Common;
using LHDN.CRM.Web.Controllers;
using LHDN.CRM.Web.Filters;
using System.Web.Mvc;
using LHDN.CRM.Models.ViewModels;

namespace LHDN.CRM.Web.Areas.Admin.Controllers
{
    public class SearchViewController : BaseController
    {
        // GET: Admin/SearchViewConfig 
        [HttpGet]
        public ActionResult Index()
        {
         
            AddAntiforgeryToken();
            return View("SearchView");
        }

        [HttpGet]
        public ActionResult AdvancedRulesViews(int id)
        {
            ViewBag.TableType = id;


            return View("View/_ViewDetails");
        }

       
        [HttpGet]
        public ActionResult ConfigureView(int ViewID, int TableType)
        {
            ViewBag.ViewID = ViewID;
            ViewBag.TableType = TableType;
            AddAntiforgeryToken();
            return View("SearchViewConfig");
        }

        [HttpPost]
        //[CRMAuthorize(Constant.Authentication.Outbound.ManageSegmentization)]
        public ActionResult New(OpenNewAdvRuleConfigViewModel model)
        {

            AddAntiforgeryToken(); 
            ViewBag.JSonStringAdvanced = model.jSonStringAdvanced; 
            ViewBag.NewViewID = model.newViewID;
            ViewBag.TableType = model.tableType;

            return View("SearchViewConfig"); //View("Index");

        }

        //public ActionResult ConfigureActivitySearchView(string id)
        //{
        //    return View("SearchViewConfig/_FileType");
        //}

        //public ActionResult ConfigureCaseSearchView(string id)
        //{
        //    return View("SearchViewConfig/_BahasaPerhubungan");
        //}
    }
}