protected override void init_table()
    {
        try
        {
            var table1 = GetDB.GetCollection("RegisterLog");
            if (table1 != null)
            {
                table1.CreateIndex(IndexKeys.Ascending(StatUnitRemain.ACC_KEY), IndexOptions.SetBackground(true));
                table1.CreateIndex(IndexKeys.Ascending("channel"), IndexOptions.SetBackground(true));
                table1.CreateIndex(IndexKeys.Ascending("time"), IndexOptions.SetBackground(true));
            }

            var table2 = GetDB.GetCollection("link_phone");
            if (table2 != null)
            {
                table2.CreateIndex(IndexKeys.Ascending("channel"), IndexOptions.SetBackground(true));
                table2.CreateIndex(IndexKeys.Ascending("active_time"), IndexOptions.SetBackground(true));
            }

            var table3 = GetDB.GetCollection(TableName.PLAYER_LOGIN);
            if (table3 != null)
            {
                table3.CreateIndex(IndexKeys.Ascending("channel"), IndexOptions.SetBackground(true));
                table3.CreateIndex(IndexKeys.Ascending("time"), IndexOptions.SetBackground(true));
                table3.CreateIndex(IndexKeys.Ascending(StatUnitRemain.ACC_KEY), IndexOptions.SetBackground(true));
                table3.CreateIndex(IndexKeys.Ascending("acc_dev"), IndexOptions.SetBackground(true));
            }
        }
        catch (System.Exception ex)
        {
        }
    }
 protected override void init_table()
 {
     try
     {
         var table = GetDB.GetCollection(TableName.PUMP_PLAYER_MONEY);
         table.CreateIndex(IndexKeys.Ascending("genTime"), IndexOptions.SetBackground(true));
     }
     catch (System.Exception ex)
     {
     }
 }
 protected override void init_table()
 {
     try
     {
         var table = GetDB.GetCollection("PayLog");
         table.CreateIndex(IndexKeys.Ascending(StatLTV.ACC_KEY_1), IndexOptions.SetBackground(true));
         table.CreateIndex(IndexKeys.Ascending("channel"), IndexOptions.SetBackground(true));
         table.CreateIndex(IndexKeys.Ascending("time"), IndexOptions.SetBackground(true));
     }
     catch (System.Exception ex)
     {
     }
 }
Esempio n. 4
0
        /// <summary>
        /// 初始化指标数据
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void Btn_BuidIndex_Click(object sender, EventArgs e)
        {
            IndexDataForm indexDataForm = new IndexDataForm();

            this.GetDB             += indexDataForm.GetDbInfo;
            indexDataForm.WriteMsg += msgForm.WriteMsg;
            GetDB?.Invoke(_dbmodel, _repository);
            indexDataForm.Show();
            // var  indexManageMethod =  new IndexManageMethod(_repository,_dbmodel);
            //indexManageMethod.WriteMsg += msgForm.WriteMsg;
            //try
            //{
            //    indexManageMethod.InitIndexData();
            //}
            //catch (Exception ex)
            //{
            //    WriteMsg?.Invoke(ex.Message+"\r\n"+JsonConvert.SerializeObject(ex.InnerException));
            //}
        }
Esempio n. 5
0
        /// <summary>
        /// 选择完数据库
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void button1_Click(object sender, EventArgs e)
        {
            ListItem selectedItem = (ListItem)cbx_Db.SelectedItem;
            string   value        = selectedItem.Value; //值

            dbmodel.Database = value;
            //此时需要重新生成一下repository  因为链接字符串里面的数据库未生成
            switch (dbmodel.DBType)
            {
            case "MySql":
                repository = new MysqlRepository(dbmodel);

                break;

            case "Oracle":
                repository = new OracleRepository(dbmodel);
                break;

            default:
                break;
            }
            GetDB?.Invoke(dbmodel, repository);
            this.Close();
        }
Esempio n. 6
0
 private static void GetMaxDiffDataInDB()
 {
     GetDB      gdb = new GetDB();
     HttpHelper hh  = new HttpHelper();
     //hh.HttpPost(gdb.DiffData());
 }
Esempio n. 7
0
 public static void PostStudentAllData()
 {
     GetDB      gdb = new GetDB();
     HttpHelper hh  = new HttpHelper();
     //hh.HttpPost(gdb.AllData());
 }
Esempio n. 8
0
 public Presenter()
 {
     hc  = new HttpConnect();
     gdb = new GetDB();
 }