public FormMain(MonHocTable MonHocTable, MonHocAdapter MonHocAdapter, GiaoTacTable GiaoTacTable, GiaoTacAdapter GiaoTacAdapter)
 {
     this.MonHocTable    = MonHocTable;
     this.MonHocAdapter  = MonHocAdapter;
     this.GiaoTacTable   = GiaoTacTable;
     this.GiaoTacAdapter = GiaoTacAdapter;
     InitializeComponent();
     trackBarMinSup.Value = Program.MinSupport;
     labelMinSup.Text     = Program.MinSupport + "%";
     minSupCache          = trackBarMinSup.Value;
     AddEventHandler();
 }
示例#2
0
        public static void SetupServices()
        {
            dynamic server = JObject.Parse(File.ReadAllText("../../appsettings.json"));

            file = new System.IO.StreamWriter((string)server.logfile, true);
            dataRepository.Server    = server.server;
            dataRepository.DataBase  = server.database;
            dataRepository.LoginName = "sa";
            dataRepository.Password  = "******";
            dataRepository.NewSqlConnection();
            MonHocTable    = new MonHocTable();
            MonHocAdapter  = new MonHocAdapter(MonHocTable, dataRepository.sqlConnection);
            GiaoTacTable   = new GiaoTacTable();
            GiaoTacAdapter = new GiaoTacAdapter(GiaoTacTable, dataRepository.sqlConnection)
            {
                TimeoutLimit = 180
            };
            FormMain = new FormMain(MonHocTable, MonHocAdapter, GiaoTacTable, GiaoTacAdapter);
        }