コード例 #1
0
 public EmployeeController(Payroll_DbContext _context, IHostingEnvironment _environment, SignInManager <AppUser> _signInManager, UserManager <AppUser> _userManager)
 {
     context       = _context;
     environment   = _environment;
     signInManager = _signInManager;
     userManager   = _userManager;
 }
コード例 #2
0
 public AccountController(Payroll_DbContext context, UserManager <AppUser> userManager, SignInManager <AppUser> signInManager, RoleManager <IdentityRole> roleManager)
 {
     this.context       = context;
     this.userManager   = userManager;
     this.signInManager = signInManager;
     this.roleManager   = roleManager;
 }
コード例 #3
0
        public static IEnumerable <SelectListItem> GetWorkPlaceSelect <T>(this Payroll_DbContext context, int?Id)
        {
            IEnumerable <SelectListItem> WorkPlaces = null;
            var model = context.Model;

            var entityTypes = model.GetEntityTypes();

            var entityType = entityTypes.First(t => t.ClrType == typeof(T)).Name;

            if (entityType == "HR_Payroll_App.Models.Company")
            {
                WorkPlaces = context.Companies.Where(x => x.HoldingId == Id.Value)
                             .Select(x => new SelectListItem {
                    Text = x.Name, Value = x.Id.ToString()
                });
            }
            if (entityType == "HR_Payroll_App.Models.Department")
            {
                WorkPlaces = context.Departments.Where(x => x.Id == Id.Value)
                             .Select(x => new SelectListItem {
                    Text = x.Name, Value = x.Id.ToString()
                });
            }
            if (entityType == "HR_Payroll_App.Models.Position")
            {
                WorkPlaces = context.Positions.Where(x => x.DepartmentId == Id.Value)
                             .Select(x => new SelectListItem {
                    Text = x.Namme, Value = x.Id.ToString()
                });
            }

            return(WorkPlaces);
        }
コード例 #4
0
 public IncentiveController(Payroll_DbContext _context, SignInManager <AppUser> _signInManager, UserManager <AppUser> _userManager)
 {
     context       = _context;
     signInManager = _signInManager;
     userManager   = _userManager;
 }
コード例 #5
0
 public OldWorkPlaceViewComponent(Payroll_DbContext context)
 {
     this.context = context;
 }
コード例 #6
0
 public PositionController(Payroll_DbContext _context)
 {
     context = _context;
 }
コード例 #7
0
 public CompanyController(Payroll_DbContext _context)
 {
     context = _context;
 }
コード例 #8
0
 public AdminController(Payroll_DbContext _context, IHostingEnvironment _environment)
 {
     context     = _context;
     environment = _environment;
 }
コード例 #9
0
 public DepartmentController(Payroll_DbContext _context)
 {
     context = _context;
 }
コード例 #10
0
 public OldWorkPlaceController(Payroll_DbContext _context)
 {
     context = _context;
 }
コード例 #11
0
 public BranchController(Payroll_DbContext _context)
 {
     context = _context;
 }
コード例 #12
0
 public SalaryController(Payroll_DbContext _context)
 {
     context = _context;
 }