public ActionResult GLAList(double?id, string ed)
        {
            if (Session["User"] == null)
            {
                return(RedirectToAction("LogIn", "LogIn"));
            }
            if (((tbl_UserDetail)Session["User"]).GroupPages.Contains("GLAList"))
            {
                try
                {
                    if (id != null)
                    {
                        var x = MvcHelper.GetGLAccount(Convert.ToInt64(id));
                        if (!string.IsNullOrEmpty(ed) && ed.Equals("2"))
                        {
                            x.ApproveStat = string.Empty;
                        }
                        ViewBag.obj = x;
                        ViewBag.hid = id;
                    }
                    ViewBag.termiallist = MvcHelper.GetTerminalsIdList();
                    ViewBag.list        = MvcHelper.GetGLAccountList();
                }
                catch (Exception ex)
                {
                    TempData["Error"] = "Something went wrong.";
                }

                return(View());
            }
            else
            {
                return(RedirectToAction("Error", "ErrorPage"));
            }
        }