private void Main_Form_Load(object sender, EventArgs e) { DB_Helper.InitializeDB(); TokensGrid.DataSource = DB_Helper.getTokenInfo(); DatabaseClientsGrid.DataSource = DB_Helper.getDbClientInfo(); //ConnectedClientsGrid.DataSource = getConnectedClientInfo(); listBox1.DrawItem += ListBox1_DrawItem; _timer = new Timer(); _timer.Interval = 1000; _timer.Tick += _timer_Tick; _timer.Start(); command.Clear(); command.Add("UPDATEUSERS"); updateClientList(); }
//custom generate button private void button7_Click(object sender, EventArgs e) { int days = Convert.ToInt32(daysNum.Value); int months = Convert.ToInt32(MonthsNum.Value); int years = Convert.ToInt32(YearsNum.Value); int totalDays = 0; totalDays += days; if (months > 0) { totalDays += (months * 30); } if (years > 0) { totalDays += (years * 365); } DB_Helper.Generate_Token(totalDays); }
//genereate 3 month private void button15_Click(object sender, EventArgs e) { DB_Helper.Generate_Token(90, Convert.ToInt32(tokenNum.Value)); }
//genrate trial token private void button9_Click(object sender, EventArgs e) { DB_Helper.Generate_Token(1, textBox2.Text); }
//token save private void button23_Click(object sender, EventArgs e) { DB_Helper.Update_Tokens(); }
//TOKEN REFRESH private void TokensRefresh_Button_Click(object sender, EventArgs e) { TokensGrid.DataSource = DB_Helper.getTokenInfo(); }
//save user changes private void button22_Click_1(object sender, EventArgs e) { DB_Helper.Update_Users(); }
//client refresh private void dbClientsRefresh_Button_Click(object sender, EventArgs e) { DatabaseClientsGrid.DataSource = DB_Helper.getDbClientInfo(); }