Exemplo n.º 1
0
        public StatisticalService()
        {
            EBServiceProvider serviceProvider = new EBServiceProvider();

            _shopInfoService               = serviceProvider.GetService <ShipInfoService>();
            _sysUserService                = serviceProvider.GetService <SysUserService>();
            _monitorIndicatorService       = serviceProvider.GetService <MonitorIndicatorService>();
            _monitorIndicatorRecordService = serviceProvider.GetService <MonitorIndicatorRecordService>();
            _dataSyncRecordService         = serviceProvider.GetService <DataSyncRecordService>();
        }
Exemplo n.º 2
0
        /// <summary>
        /// 这是查询的方法
        /// </summary>
        /// <param name="dgv"></param>
        /// <param name="where"></param>
        public void ShipInfoSearch(DataGridView dgv, string where)
        {
            List <BillIndex> bi = new ShipInfoService().GetReocrdBySearch(where);

            dgv.Rows.Clear();
            foreach (BillIndex item in bi)
            {
                int index = dgv.Rows.Add();
                dgv.Rows[index].Cells["dgvShipListID"].Value   = item.ID;
                dgv.Rows[index].Cells["dgvShipListName"].Value = item.Title;
                dgv.Rows[index].Cells["dgvShipListDate"].Value = item.Reg_Date.ToString("yyyy-MM-dd");
            }
        }
Exemplo n.º 3
0
        /// <summary>
        /// 构造上下文
        /// </summary>
        /// <param name="userIds">可以指定用户</param>
        public void BuildContext(params int[] userIds)
        {
            _shipInfoService = new ShipInfoService(_configService);
            _sysUserService  = new SysUserService(_configService);
            SyncContext.Context?.Clear();
            var shops   = _shipInfoService.GetAllList().ToList().FindAll(x => x.Status > 0 && x.Plat != 3);
            var gp      = shops.GroupBy(x => x.UserId);
            var configs = _configService.GetAllList().ToList();

            configs.ForEach(x =>
            {
                if (userIds == null || userIds.Contains(x.UserId))
                {
                    SyncContext.Context.Add(GetSyncContext(x, gp));
                }
            });
        }