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

namespace LHDN.CRM.Web.Areas.Case.Controllers
{
    public class ProfileController : BaseController
    {
        // GET: Case/Profile
        [HttpGet]
        [CRMAuthorize(Constant.Authentication.Cases.ViewCaseProfile)]
        public ActionResult Detail(long id)
        {
            if(id > 0)
            {
                ViewBag.CaseId = id;
                AddAntiforgeryToken();
                return View("Index");
            }
            else
            {
                return View();
            }
        }

        [HttpPost]
        [CRMAuthorize(Constant.Authentication.Cases.CreateUpdateCase)]
        public ActionResult New(OpenNewActViewModel model)
        {
            if (model.ActID > 0)
            {
                ViewBag.ActivityId = model.ActID;
            }
            AddAntiforgeryToken();

            return View("Index");
        }
    }
}