public GLGAFLedgerRecordsCreatorTests()
        {
            _accountDataContext   = GetService <AccountDataContext>();
            _gafPeriodDataContext = GetService <GAFPeriodDataContext>();
            _taxPeriodDataContext = GetService <TaxPeriodDataContext>();
            _branchDataContext    = GetService <BranchDataContext>();
            _finPeriodDataContext = GetService <FinPeriodDataContext>();

            _glgafLedgerRecordsCreator = new GLGAFLedgerRecordsCreator(GAFRepository);

            GAFRepositoryMock.Setup(repo => repo.GetTaxPeriodByKey(_gafPeriodDataContext.GAFPeriod.BranchID, _gafPeriodDataContext.GAFPeriod.TaxAgencyID, _gafPeriodDataContext.GAFPeriod.TaxPeriodID))
            .Returns(_taxPeriodDataContext.TaxPeriod);

            GAFRepositoryMock.Setup(repo => repo.GetFinPeriodsInInterval(_taxPeriodDataContext.TaxPeriod.StartDate, _taxPeriodDataContext.TaxPeriod.EndDate))
            .Returns(_finPeriodDataContext.FinPeriod201503.SingleToArray());

            GAFRepositoryMock.Setup(repo => repo.GetBranchByID(_branchDataContext.Branch.BranchID))
            .Returns(_branchDataContext.Branch);

            GAFRepositoryMock.Setup(repo => repo.FindLastYearNotAdjustmentPeriod(It.IsAny <string>()))
            .Returns(new FinPeriod()
            {
                FinPeriodID = "201512"
            });
        }
예제 #2
0
 public ContractController(IConfiguration configuration, ILoggerFactory loggerFactory, AccountDataContext _accountContext, UserManager <UserAccount> _userManager)
 {
     logger         = loggerFactory.CreateLogger <ContractController>();
     accountContext = _accountContext;
     userManager    = _userManager;
     describer      = userManager.ErrorDescriber as LocalizedIdentityErrorDescriber;
 }
예제 #3
0
 public AggregatorController(AccountDataContext _accountContext, UserManager <UserAccount> userManager, IEmailSender emailSender, IClaimServiceFactory claimsManager)
 {
     accountContext = _accountContext;
     _userManager   = userManager;
     _emailSender   = emailSender;
     _claimsManager = claimsManager;
 }
예제 #4
0
 public EditAccount()
 {
     DataContext = new AccountDataContext();
     InitializeComponent();
     // NavigationContext is not available in constructor
     this.Loaded += new RoutedEventHandler(PageLoaded);
     // Translate unsupported XAML bindings
     ApplicationBar.TranslateButtons();
 }
예제 #5
0
 public NotificationController(PeiuGridDataContext peiuGridDataContext, IRedisConnectionFactory redis,
                               AccountDataContext accountContext,
                               IClaimServiceFactory claimServiceFactory)
 {
     this.peiuGridDataContext = peiuGridDataContext;
     db = redis.Connection().GetDatabase(1);
     this.claimServiceFactory = claimServiceFactory;
     this._accountContext     = accountContext;
 }
예제 #6
0
 public ContractorController(UserManager <UserAccount> userManager,
                             SignInManager <UserAccount> signInManager, RoleManager <Role> _roleManager,
                             IEmailSender emailSender, IHTMLGenerator _htmlGenerator, IClaimServiceFactory claimsManager,
                             IStringLocalizer <LocalizedIdentityErrorDescriber> localizer,
                             AccountDataContext accountContext)
 {
     _userManager    = userManager;
     _accountContext = accountContext;
     _signInManager  = signInManager;
     _localizer      = localizer;
     _emailSender    = emailSender;
     htmlGenerator   = _htmlGenerator;
     roleManager     = _roleManager;
     _claimsManager  = claimsManager;
 }
 public BoardController(UserManager <UserAccountEF> userManager,
                        SignInManager <UserAccountEF> signInManager, RoleManager <Role> _roleManager,
                        IEmailSender emailSender, IHTMLGenerator _htmlGenerator, IClaimServiceFactory claimsManager, ILogger <BoardController> logger,
                        IConfiguration config, AccountEF accountEF, AccountDataContext accountDataContext)
 {
     _userManager    = userManager;
     _accountContext = accountDataContext;
     _signInManager  = signInManager;
     _emailSender    = emailSender;
     htmlGenerator   = _htmlGenerator;
     roleManager     = _roleManager;
     _claimsManager  = claimsManager;
     _accountEF      = accountEF;
     this.logger     = logger;
 }
예제 #8
0
        protected void Button1_Click(object sender, EventArgs e)
        {
            //t_Orders_100 aa = new t_Orders_100();

            AccountDataContext accountDB = new AccountDataContext();

            t_Account_100 _t_Account_100 = new t_Account_100
            {
                UserID = 789789,
                Point = 10,
                svPoint = 10,
                Score = 20
            };
            accountDB.t_Account_100.InsertOnSubmit(_t_Account_100);
            accountDB.SubmitChanges();
        }
예제 #9
0
 public StatisticsController(UserManager <UserAccount> userManager,
                             SignInManager <UserAccount> signInManager, RoleManager <Role> _roleManager, IRedisConnectionFactory redis, ILogger <StatisticsController> logger,
                             IEmailSender emailSender, IHTMLGenerator _htmlGenerator, IClaimServiceFactory claimsManager, PeiuGridDataContext peiuGridDataContext,
                             AccountDataContext accountContext)
 {
     _userManager         = userManager;
     _accountContext      = accountContext;
     _signInManager       = signInManager;
     _emailSender         = emailSender;
     htmlGenerator        = _htmlGenerator;
     roleManager          = _roleManager;
     _claimsManager       = claimsManager;
     _peiuGridDataContext = peiuGridDataContext;
     _redisConn           = redis.Connection();
     _redisDb             = _redisConn.GetDatabase();
     this.logger          = logger;
 }
 public AuthController(UserManager <UserAccountEF> userManager,
                       SignInManager <UserAccountEF> signInManager, RoleManager <Role> _roleManager, ILogger <StatisticsController> logger,
                       IEmailSender emailSender, IHTMLGenerator _htmlGenerator, IClaimServiceFactory claimsManager, AccountEF accountEF,
                       IStringLocalizer <LocalizedIdentityErrorDescriber> localizer, ReservedRegisterNotifyPublisher _publisher,
                       AccountDataContext _accountContext
                       /*,AccountDataContext accountContext*/)
 {
     _userManager = userManager;
     //_accountContext = accountContext;
     _signInManager       = signInManager;
     _localizer           = localizer;
     _emailSender         = emailSender;
     htmlGenerator        = _htmlGenerator;
     Publisher            = _publisher;
     roleManager          = _roleManager;
     _claimsManager       = claimsManager;
     this.logger          = logger;
     this._accountContext = _accountContext;
     this.accountEF       = accountEF;
 }
예제 #11
0
        protected void Button2_Click(object sender, EventArgs e)
        {
            AccountDataContext accountDB = new AccountDataContext();
            var result = from o in accountDB.t_Orders_100
                             select o;
                         //group o by o.roomid;
                         //select new
                         //{
                         //    newOrder.Key,
                         //    MostExpensiveProducts = from o2 in newOrder
                         //                            where o2.payAmount == newOrder.Max(o3 => o3.payAmount)
                         //                            select o2
                         //};

            //List<t_Orders_100> list = (List<t_Orders_100>)result;

            foreach (t_Orders_100 v in result)
            {
                string sss = v.payAmount.ToString();
            }


        }
예제 #12
0
 public DeviceController(PeiuGridDataContext context, AccountDataContext _accountContext, IRedisConnectionFactory redisConnectionFactory)
 {
     peiuGridDataContext = context;
     peiuDataContext     = _accountContext;
     database            = redisConnectionFactory.Connection().GetDatabase(1);
 }
예제 #13
0
 public AccountDal(AccountDataContext accountContext, AdminWebDalDataContext adminWebContext)
 {
     this.accountContext  = accountContext;
     this.adminWebContext = adminWebContext;
 }
예제 #14
0
 public AccountRepo(AccountDataContext context)
 {
     _context = context;
 }