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

namespace LHDN.CRM.Web.Areas.Case.Controllers
{
    public class SearchController : BaseController
    {
        // GET: Case/Search
        [CRMAuthorize(Constant.Authentication.Cases.SearchCaseProfile)]
        public ActionResult Index()
        {
            ViewBag.TableType = (int)Constant.TableType.Case;

            AddAntiforgeryToken();
            return View();
        }

        [HttpPost]
        public ActionResult Listing(DashboardTilesStatusViewModel model)
        {
            ViewBag.TableType = (int)Constant.TableType.Case;
            ViewBag.CaseStatusId = model.Status1ID;
            ViewBag.IsTodayCase = model.IsTodayCase;
            ViewBag.LinkfromDashboard = true;
          
            AddAntiforgeryToken();
            return View("Index");
        }
    }
}