public MemberRelativeController(IUserService userSrv, IRelativeService MemberRelativeSrv,
                                 IConfiguration configuration)
 {
     _userSrv           = userSrv;
     _configuration     = configuration;
     _MemberRelativeSrv = MemberRelativeSrv;
 }
Example #2
0
 public HomeController(IUserService userSrv, IRelativeService relativeSrv,
                       IConfiguration configuration, IHttpContextAccessor httpAccessor) : base(httpAccessor)
 {
     _userSrv       = userSrv;
     _relativeSrv   = relativeSrv;
     _configuration = configuration;
 }
Example #3
0
 public UserController(UserManager <ApplicationUser> userManager, GuideDBContext db,
                       IRelativeService relativeService)
 {
     _userManager     = userManager;
     _db              = db;
     _relativeService = relativeService;
 }
        public virtual async Task <JsonResult> Update([FromServices] IRelativeService relativeSrv, int id)
        {
            var find = await _LossSrv.FindAsync(id);

            if (!find.IsSuccessful)
            {
                return(Json(new { IsSuccessful = false, Message = Strings.RecordNotFound.Fill(DomainString.Loss) }));
            }
            ViewBag.Types = GetTypes();
            if (find.Result.RelativeId != null)
            {
                var rel = await relativeSrv.FindAsync(find.Result.RelativeId ?? 0);

                find.Result.Relative = rel.Result;
            }
            return(Json(new Modal
            {
                Title = $"{Strings.Update} {DomainString.Loss}",
                AutoSubmitBtnText = Strings.Edit,
                Body = ControllerExtension.RenderViewToString(this, "Partials/_Entity", find.Result),
                AutoSubmit = false
            }));
        }
 public virtual JsonResult Search([FromServices] IRelativeService relativeSrv, string q)
 => Json(relativeSrv.Search(q, User.GetUserId()).ToSelectListItems());
Example #6
0
 public RelativeController(IRelativeService relativeService)
 {
     this._relativeService = relativeService;
 }
Example #7
0
 public UserController(IUserService userSrv, IRelativeService relativeSrv, IConfiguration configuration)
 {
     _userSrv       = userSrv;
     _relativeSrv   = relativeSrv;
     _configuration = configuration;
 }
Example #8
0
 public RelativeController(IRelativeService MemberRelativeSrv, IConfiguration configuration)
 {
     _relativeSrv   = MemberRelativeSrv;
     _configuration = configuration;
 }