public virtual async Task <ActionResult> Manage(RelativeSearchFilter filter)
        {
            filter.UserId = User.GetUserId();
            //ViewBag.HasExtraButton = true;
            //ViewBag.ExtraButtonUrl = Url.Action("InsuranceInfo", "User");
            //ViewBag.ExtraButtonText = Strings.PreFactor;
            //ViewBag.ExtraButtonIcon = "zmdi-eye";

            var getUser = await _userSrv.FindAsync(User.GetUserId());

            var startDate = PersianDateTime.Parse(_configuration["CustomSettings:StartLockDate"]).ToDateTime();
            var endDate   = PersianDateTime.Parse(_configuration["CustomSettings:EndLockDate"]).ToDateTime();

            ViewBag.CanEdit          = !(getUser.Result.InsertDateMi >= startDate && getUser.Result.InsertDateMi <= endDate);
            ViewBag.WithoutAddButton = !ViewBag.CanEdit;

            if (!Request.IsAjaxRequest())
            {
                return(View(_MemberRelativeSrv.Get(filter)));
            }
            else
            {
                return(PartialView("Partials/_List", _MemberRelativeSrv.Get(filter)));
            }
        }
Example #2
0
 public virtual ActionResult Manage(RelativeSearchFilter filter)
 {
     ViewBag.ExcelExport = true;
     if (!Request.IsAjaxRequest())
     {
         return(View(_relativeSrv.Get(filter)));
     }
     else
     {
         return(PartialView("Partials/_List", _relativeSrv.Get(filter)));
     }
 }