public ApprovalController(OrderMakerContext context, UserHandler userHandler, IEmailSenderBlank emailSender, IStringLocalizer <SharedResource> sharedLocalizer) { _context = context; _userHandler = userHandler; _emailSender = emailSender; _localizer = sharedLocalizer; }
public ApprovalHandler(OrderMakerContext context, string idstore) { _context = context; idStore = idstore; storeCache = null; approvalCache = null; }
public static async Task <List <string> > GetWaitStoreIds(OrderMakerContext context, WebAppUser user, string formId) { List <string> approvalIds = await context.MtdApproval.Where(x => x.MtdForm == formId).Select(x => x.Id).ToListAsync(); List <int> stagesUser = await context.MtdApprovalStage.Where(x => approvalIds.Contains(x.MtdApproval) && x.UserId == user.Id).Select(x => x.Id).ToListAsync(); return(await context.MtdStoreApproval.Where(x => x.Complete == 0 && stagesUser.Contains(x.MtdApproveStage)).Select(x => x.Id).ToListAsync()); }
public FilterHandler(OrderMakerContext orderMakerContext, string idForm, WebAppUser user, UserHandler userHandler) { _context = orderMakerContext; _user = user; _userHandler = userHandler; IdForm = idForm; queryMtdStore = _context.MtdStore; }
public ErrorModel( IEmailSender emailSender, IHostingEnvironment hostingEnvironment, OrderMakerContext context) { _emailSender = emailSender; _hostingEnvironment = hostingEnvironment; this.context = context; }
public UserHandler(OrderMakerContext context, IUserStore <WebAppUser> store, IOptions <IdentityOptions> optionsAccessor, IPasswordHasher <WebAppUser> passwordHasher, IEnumerable <IUserValidator <WebAppUser> > userValidators, IEnumerable <IPasswordValidator <WebAppUser> > passwordValidators, ILookupNormalizer keyNormalizer, IdentityErrorDescriber errors, IServiceProvider services, ILogger <UserManager <WebAppUser> > logger, SignInManager <WebAppUser> signInManager) : base(store, optionsAccessor, passwordHasher, userValidators, passwordValidators, keyNormalizer, errors, services, logger) { _context = context; _signInManager = signInManager; }
public static async Task <List <ApprovalStore> > GetStoreStatusAsync(OrderMakerContext context, IList <string> storeIds, WebAppUser appUser) { List <ApprovalStore> result = new List <ApprovalStore>(); IList <MtdStoreApproval> mtdStoreApprovals = await context.MtdStoreApproval .Include(x => x.MdApproveStageNavigation) .Where(x => storeIds.Contains(x.Id)) .ToListAsync(); List <string> approvalIds = mtdStoreApprovals.Select(x => x.MdApproveStageNavigation.MtdApproval).ToList(); IList <MtdApprovalStage> stages = await context.MtdApprovalStage .Where(x => approvalIds.Contains(x.MtdApproval)) .OrderBy(x => x.Stage).ToListAsync(); foreach (string storeId in storeIds) { ApprovalStore approvalStore = new ApprovalStore { StoreId = storeId }; MtdStoreApproval sa = mtdStoreApprovals.Where(x => x.Id == storeId).FirstOrDefault(); if (sa == null) { approvalStore.Status = ApprovalStatus.Start; } else { bool isComplete = sa.Complete == 1 ? true : false; int approved = sa.Result; string approvalId = sa.MdApproveStageNavigation.MtdApproval; int currentId = sa.MtdApproveStage; int firstId = stages.Where(x => x.MtdApproval == approvalId) .OrderBy(x => x.Stage).Select(x => x.Id).FirstOrDefault(); bool isFirst = currentId == firstId ? true : false; bool isApprover = sa.MdApproveStageNavigation.UserId == appUser.Id ? true : false; approvalStore.Status = DefineStatus(isComplete, approved, isFirst, isApprover); } result.Add(approvalStore); } return(result); }
public UsersController( UserManager <WebAppUser> userManager, RoleManager <WebAppRole> roleManager, SignInManager <WebAppUser> signInManager, IEmailSender emailSender, IHostingEnvironment hostingEnvironment, OrderMakerContext context, IStringLocalizer <UsersController> localizer, IOptions <ConfigSettings> options ) { _userManager = userManager; _roleManager = roleManager; _signInManager = signInManager; _emailSender = emailSender; _hostingEnvironment = hostingEnvironment; _context = context; _localizer = localizer; _options = options; }
public Display(OrderMakerContext orderMakerContext, UserHandler userHandler) { _context = orderMakerContext; _userHandler = userHandler; }
public PartsModel(OrderMakerContext context) { _context = context; }
public DetailsModel(OrderMakerContext context, UserHandler userHandler) { _context = context; _userHandler = userHandler; }
public Editor(OrderMakerContext orderMakerContext) { _context = orderMakerContext; }
public ActionController(OrderMakerContext context, UserHandler userHandler, IHostingEnvironment hostingEnvironment) { _context = context; _userHandler = userHandler; _hostingEnvironment = hostingEnvironment; }
public DataController(OrderMakerContext context, UserManager <WebAppUser> userManager) { _context = context; _userManager = userManager; }
public EmailSenderBlank(OrderMakerContext context, IHostingEnvironment hostingEnvironment) { this.context = context; _hostingEnvironment = hostingEnvironment; }
public CreateModel(OrderMakerContext context, IStringLocalizer <CreateModel> localizer) { _context = context; _localizer = localizer; }
private async Task InitDataBase(OrderMakerContext context) { bool exists = await context.MtdSysType.AnyAsync(); if (exists) { return; } MtdCategoryForm mtdGroupForm = new MtdCategoryForm { Id = "17101180-9250-4498-BE4E-4A941AD6713C", Name = "Default", Description = "Default Group", Parent = "17101180-9250-4498-BE4E-4A941AD6713C" }; await context.MtdCategoryForm.AddAsync(mtdGroupForm); List <MtdSysType> mtdSysTypes = new List <MtdSysType> { new MtdSysType { Id = 1, Name = "Text", Description = "Text", Active = true }, new MtdSysType { Id = 2, Name = "Integer", Description = "Integer", Active = true }, new MtdSysType { Id = 3, Name = "Decimal", Description = "Decimal", Active = true }, new MtdSysType { Id = 4, Name = "Memo", Description = "Memo", Active = true }, new MtdSysType { Id = 5, Name = "Date", Description = "Date", Active = true }, new MtdSysType { Id = 6, Name = "DateTime", Description = "DateTime", Active = true }, new MtdSysType { Id = 7, Name = "File", Description = "File", Active = true }, new MtdSysType { Id = 8, Name = "Image", Description = "Image", Active = true }, //new MtdSysType{ Id = 9, Name="Phone",Description="Phone",Active=false}, //new MtdSysType{ Id = 10, Name="Time",Description="Time",Active=false}, new MtdSysType { Id = 11, Name = "List", Description = "List", Active = true }, new MtdSysType { Id = 12, Name = "Checkbox", Description = "Checkbox", Active = true }, }; await context.MtdSysType.AddRangeAsync(mtdSysTypes); List <MtdSysTerm> mtdSysTerms = new List <MtdSysTerm> { new MtdSysTerm { Id = 1, Name = "equal", Sign = "=" }, new MtdSysTerm { Id = 2, Name = "less", Sign = ">" }, new MtdSysTerm { Id = 3, Name = "more", Sign = "<" }, new MtdSysTerm { Id = 4, Name = "contains", Sign = "~" }, new MtdSysTerm { Id = 5, Name = "no equal", Sign = "<>" }, }; await context.MtdSysTerm.AddRangeAsync(mtdSysTerms); List <MtdSysStyle> mtdSysStyles = new List <MtdSysStyle> { new MtdSysStyle { Id = 4, Name = "Line", Description = "Line", Active = true }, new MtdSysStyle { Id = 5, Name = "Column", Description = "Column", Active = true } }; await context.MtdSysStyle.AddRangeAsync(mtdSysStyles); await context.SaveChangesAsync(); }
public ConfigHandler(OrderMakerContext context) { _context = context; }
public GroupsController(OrderMakerContext context) { _context = context; }
public CreateModel(OrderMakerContext context) { _context = context; }
public StageEditModel(OrderMakerContext context, UserHandler userHandler) { _context = context; _userHandler = userHandler; }
public DataContoller(OrderMakerContext context, UserHandler userHandler) { _context = context; _userHandler = userHandler; }
public DataController(OrderMakerContext context) { _context = context; }
public Cell(OrderMakerContext orderMakerContext) { _context = orderMakerContext; }
public static async Task <bool> IsApprovalFormAsync(OrderMakerContext context, string formId) { bool isApprovalForm = await context.MtdApproval.Where(x => x.MtdForm == formId).AnyAsync(); return(isApprovalForm); }
public IndexModel(OrderMakerContext context, UserHandler userHandler) { _context = context; _userHandler = userHandler; }
public EditModel(OrderMakerContext context) { _context = context; }
public StagesModel(OrderMakerContext context) { _context = context; }
public IndexModel(OrderMakerContext context) { _context = context; }
public Form(OrderMakerContext orderMakerContext, UserHandler userHandler) { _context = orderMakerContext; _userHandler = userHandler; }