public ReportsController(EntityCore context, IMapper mapper, IMemoryCache memoryCache, IKendoGrid kendoGrid) { _context = context; _mapper = mapper; _cache = memoryCache; _kendoGrid = kendoGrid; }
public SalesInvoiceController(EntityCore context, IMapper mapper, IMemoryCache memoryCache, ILoggerFactory loggerFactory) { _context = context; _mapper = mapper; _cache = memoryCache; _logger = loggerFactory.CreateLogger <SalesInvoiceController>(); }
public CustomerController(EntityCore context, IMapper mapper, IMemoryCache memoryCache, IKendoGrid kendoGrid, ILoggerFactory loggerFactory) { _context = context; _mapper = mapper; _cache = memoryCache; _kendoGrid = kendoGrid; _logger = loggerFactory.CreateLogger <CustomerController>(); }
public SettingsController(EntityCore context, IConfiguration configuration, IMapper mapper, UserManager <IdentityUser> userManager, RoleManager <IdentityRole> roleManager, IMemoryCache memoryCache, ILoggerFactory loggerFactory) { _userManager = userManager; _roleManager = roleManager; _context = context; _mapper = mapper; _cache = memoryCache; Configuration = configuration; _logger = loggerFactory.CreateLogger <SettingsController>(); }
public static EntityCore ToEntityCore(this Entity entity) { var dynamicsEntity = new EntityCore(entity.LogicalName, entity.Id); foreach (var attribute in entity.Attributes) { dynamicsEntity.Attributes.Add(attribute.Key, ConvertAttributeValue(attribute)); } return(dynamicsEntity); }
public AccountController( UserManager <IdentityUser> userManager, SignInManager <IdentityUser> signInManager, RoleManager <IdentityRole> roleManager, ILoggerFactory loggerFactory, EntityCore context) { _userManager = userManager; _signInManager = signInManager; _roleManager = roleManager; _context = context; _logger = loggerFactory.CreateLogger <AccountController>(); }
public void setContext() { Config config = ConfigJSON.Read(); if (!string.IsNullOrEmpty(config.Environment)) { var con = Configuration.GetConnectionString(config.Environment + "Connection"); if (con != _context.Database.GetDbConnection().ConnectionString) { var options = new DbContextOptionsBuilder <EntityCore>(); options.UseSqlServer(con); _context = new EntityCore(options.Options); } } }
private EntityCore GetByType(object src) { EntityCore res = new EntityCore(); if (src.GetType() == typeof(LeadViewModel)) { res = src.Adapt <Lead>(config); } if (src.GetType() == typeof(ContactViewModel)) { res = src.Adapt <Contact>(config); } return(res); }
/// <summary> /// 执行查询分页 /// </summary> public void GetPageList() { if (_pageindex < 1) { _pageindex = 1; } #region 排序 if (string.IsNullOrEmpty(_orderstring.Trim())) { if (_ordercolumn.Length != _ordertype.Length || _ordercolumn.Length < 1) { throw new Exception("分页排序出错"); } ArrayList OrderOutput = new ArrayList(); for (int u = 0; u < _ordercolumn.Length; u++) { OrderOutput.Add(_ordercolumn[u].ToString() + " " + _ordertype[u].ToString()); } _orderstring = String.Join(",", (string[])OrderOutput.ToArray(typeof(string))); } #endregion ArrayList _ArrayList = EntityCore <table> .GetPageList(_pagesize, _pageindex, _sqlwhere, _sqlparms, _orderstring, _columns); if (_ArrayList.Count == 5) { _datalist = (List <table>)_ArrayList[0]; _dataset = (DataSet)_ArrayList[1]; _recordcount = int.Parse(_ArrayList[2].ToString()); _pagecount = int.Parse(_ArrayList[3].ToString()); _pageindex = int.Parse(_ArrayList[4].ToString()); } else { throw new Exception("分页出错"); } }
public CreditNoteController(EntityCore context, IMapper mapper, ILoggerFactory loggerFactory) { _mapper = mapper; _context = context; _logger = loggerFactory.CreateLogger <CreditInvoiceController>(); }
private void Start() { m_Core = GetComponent <EntityCore>(); }
public void AddEntity(EntityCore core) => m_EntityPool.Add(core);
public ItemTypeController(EntityCore context) { _context = context; }
public ItemGroupController(EntityCore context) { _context = context; }
//public BaseController() //{ //} public BaseController(EntityCore Context, IConfiguration configuration) { Configuration = configuration; _context = Context; setContext(); }
// private readonly ILogger _logger; public NavPostData(EntityCore context, IMapper mapper) { _context = context; _mapper = mapper; //_logger = logger; }
public ItemController(EntityCore context, IMemoryCache memoryCache, IKendoGrid kendoGrid) { _context = context; _cache = memoryCache; _kendoGrid = kendoGrid; }
public GameObject SpawnBullet(EntityBulletType type, Vector3 position, Quaternion rotation, EntityCore core, float speed, int damage, Vector3 defaultDirection, AllyFlag allyFlag, bool selfControlled = false, Vector3 noramalizedDirection = default) { Rect bottomRectangle = new Rect(new Vector2(-15.0f, -15.0f), new Vector2(90.0f, 13.0f)); Rect topRectangle = new Rect(new Vector2(-15.0f, 102.0f), new Vector2(90.0f, 13.0f)); Rect leftRectangle = new Rect(new Vector2(-15.0f, -15.0f), new Vector2(13.0f, 130.0f)); Rect rightRectangle = new Rect(new Vector2(62.0f, -15.0f), new Vector2(13.0f, 130.0f)); if (bottomRectangle.Contains(position)) { return(null); } if (topRectangle.Contains(position)) { return(null); } if (leftRectangle.Contains(position)) { return(null); } if (rightRectangle.Contains(position)) { return(null); } GameObject bulletPrefab = GetEnemyBulletPrefabObject(type); if (bulletPrefab == null) { throw new Exception(type.ToString() + "의 불렛프리팹을 가져오는데 실패했습니다"); } GameObject gameObject = Instantiate(bulletPrefab, position, rotation); switch (allyFlag) { case AllyFlag.Player: gameObject.SetTagIncludeAllChildren("PlayerBullet"); break; case AllyFlag.Enemy: gameObject.SetTagIncludeAllChildren("EnemyBullet"); break; } EntityBulletInfo comp = gameObject.AddComponent <EntityBulletInfo>(); comp.SetSpeed(speed); comp.SetSelfControlled(selfControlled); comp.SetDamage(damage); comp.SetEntityCore(core); comp.SetDirection(noramalizedDirection); comp.SetDefaultDirection(defaultDirection); gameObject.GetComponent <EntityBulletMovementController>().SetEntityBulletInfo(comp); return(gameObject); }
public void AddTargetedEntity(EntityCore core) => m_TargetedEntityPool.Add(default(String), core);
public void SetEntityCore(EntityCore entityCore) => m_EntityCore = entityCore;
public DenominationController(EntityCore context) { _context = context; }
public ApiController(EntityCore context, IMapper mapper, IMemoryCache memoryCache) { _context = context; _mapper = mapper; _cache = memoryCache; }
public CreditInvoiceController(EntityCore context) { _context = context; }
public SettlementController(EntityCore context) { _context = context; }
public ItemCategoryController(EntityCore context) { _context = context; }
public void RemoveEntity(EntityCore core) => m_EntityPool.Remove(core);
public PrintController(EntityCore context, IMapper mapper) { _context = context; }
public TerminalController(EntityCore context) { _context = context; }
public StoreController(EntityCore context) { _context = context; }
public void AddTargetedEntity(String key, EntityCore core) => m_TargetedEntityPool.Add(key, core);