using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.Mvc; using NP.Model; using NP.Base.Auth; namespace NP.FO.Controllers { public class CRoomBaseController : FOAuthBaseController { protected VMCRoom vm { get; set; } protected override void OnActionExecuting(ActionExecutingContext filterContext) { base.OnActionExecuting(filterContext); ViewBag.croompageleftmenutoggle = CookieGet("croompageleftmenutoggle", ""); if (GetLong(Request["croomlectno"]) < 1 && GetInt(Request["croomcmno"]) < 1) { Response.Redirect("/"); } if (ViewBag.croomlectno != null) { vm.croomlectno = (Int64)ViewBag.croomlectno; vm.croomcmno = (int)ViewBag.croomcmno; vm.croomusertype = (int)ViewBag.croomusertype; vm.croomparam = ViewBag.croomparam; } } protected ActionResult CView(VMCRoom cvm = null) { if (cvm != null) { cvm.croomlectno = vm.croomlectno; cvm.croomcmno = vm.croomcmno; cvm.croomusertype = vm.croomusertype; cvm.croomparam = vm.croomparam; } return View(cvm??vm); } } }