public ActionResult ActivateUser(int UserId)
        {
            objUser.SetActive(UserId, true);
            var countries = objUser.Select_STP_GetUserDetails().Where(p => p.IsActive == false && p.UserType.ToUpper() == "USER");

            if (SessionManager.GetInstance.ActiveUser.UserType == "Agent")
            {
                countries = countries.Where(p => p.PanchayatId == SessionManager.GetInstance.ActiveUser.UserId);
            }
            int pageindex = 0;
            var filter    = countries.OrderBy(p => p.UserId).Skip(pageindex * PageSize).Take(PageSize);

            Session["users"]     = countries;
            Session["pageindex"] = 0;
            return(Json(filter, JsonRequestBehavior.AllowGet));
        }
예제 #2
0
 public ActionResult ActivateDeactivate(int UserId, bool IsActive)
 {
     objUser.SetActive(UserId, IsActive, false);
     return(Json(true, JsonRequestBehavior.AllowGet));
 }