public ActionResult Edit(CommonUserDTO model) { try { var entity = CommonUserService.GetModel(model.Id); entity.Status = model.Status; entity.Address = model.Address; entity.Email = model.Email; entity.Fax = model.Fax; entity.Gander = model.Gander; entity.IDNumber = model.IDNumber; entity.Mobile = model.Mobile; entity.Phone = model.Phone; entity.QQ = model.QQ; entity.UserName = model.UserName; entity.ModifyUserId = model.Id; entity.ModifyDate = DateTime.Now; CommonUserService.Modify(entity); return(View("Jump")); } catch { return(View()); } }
public AuthenticationController(IOptions <JwtIssuerOptions> jwtOptions, CommonUserService commonUserSvc, CommonContext commonContext, RedisCache cache, IOptions <AppSettings> appSettings, MailService mailSvc) : base(commonContext, cache, appSettings) { _commonUserSvc = commonUserSvc; _jwtOptions = jwtOptions.Value; _mailSvc = mailSvc; }
public ActionResult Edit(Guid id) { CommonUser entity = CommonUserService.GetModel(id); var model = Mapper.Map <CommonUserDTO>(entity); return(View(model)); }
public AttachmentController(CommonContext commonContext, IServiceProvider serviceProvider, RedisCache redisCache, IOptions <AppSettings> appSettings, AccountContext accountCtx, CommonUserService commonUserSvc, FileService fileService) : base(commonContext, serviceProvider, redisCache, appSettings) { _commonUserSvc = commonUserSvc; _accountCtx = accountCtx; _fileService = fileService; _appSettings = appSettings.Value; }
public CommonController(CommonContext commonContext, RedisCache cache, IOptions <AppSettings> appSettings, CommonAccountService commonAccountSvc, CommonUserService commonUserSvc, AccountContext accountCtx, MailService mailSvc) : base(commonContext, cache, appSettings) { _accountCtx = accountCtx; _commonAccountSvc = commonAccountSvc; _commonUserSvc = commonUserSvc; _mailSvc = mailSvc; }
public UsersController(CommonContext commonContext, RedisCache cache, IOptions <AppSettings> appSettings, CommonAccountService commonAccountSvc, CommonUserService commonUserSvc, AccountContext accountCtx, PushNotification PushSvc) : base(commonContext, cache, appSettings) { _accountCtx = accountCtx; _commonAccountSvc = commonAccountSvc; _commonUserSvc = commonUserSvc; _PushSvc = PushSvc; }
public ActionResult Index(int?page) { int p = page ?? 1; int total = 0; var models = CommonUserService.GetModels(p, 5, string.Empty, "CreateDate", null); PageModel pm = Kernel.CreatePageModel(5, p, models.TotalCount); var dtos = Mapper.Map <List <CommonUserDTO> >(models.Models); if (dtos == null) { dtos = new List <CommonUserDTO>(); } ViewBag.PM = pm; return(View(dtos)); }
public ActionResult Create(CommonUserDTO model) { try { var entity = Mapper.Map <CommonUser>(model); var id = Guid.NewGuid(); entity.Id = id; entity.CreateUserId = id; entity.CreateDate = DateTime.Now; entity.ModifyDate = null; entity.LastLoginDate = null; CommonUserService.Add(entity); return(View("Jump")); } catch { return(View()); } }
public EventsController(CommonContext commonContext, IServiceProvider serviceProvider, RedisCache redisCache, IOptions <AppSettings> appSettings, AccountContext accountCtx, CommonUserService commonUserSvc, MailService mailSvc, ViolationService violationSvc, FileService fileService, CommonAccountService commonAccountSvc, PushNotification pushSvc) : base(commonContext, serviceProvider, redisCache, appSettings) { _accountCtx = accountCtx; _mailSvc = mailSvc; _violationSvc = violationSvc; _appSettings = appSettings.Value; _commonContext = commonContext; _fileService = fileService; _commonAccountSvc = commonAccountSvc; _PushSvc = pushSvc; }
public VendorsController(CommonContext commonContext, IServiceProvider serviceProvider, RedisCache redisCache, IOptions <AppSettings> appSettings, AccountContext accountCtx, CommonUserService commonUserSvc) : base(commonContext, serviceProvider, redisCache, appSettings) { _commonUserSvc = commonUserSvc; _accountCtx = accountCtx; }
public ActionResult Authorization(Guid userId, Guid[] roles) { CommonUserService.Authorization(userId, roles); return(RedirectToAction("Authorization", new { userId })); }
public ActionResult Delete(Guid id) { CommonUserService.Delete(id); return(RedirectToAction("Index")); }