private void ListBox_Item() { SQLite_Funciton_Query sfq = new SQLite_Funciton_Query(); sfq.SQLite_Query_ListBox(listBox1, Left_Item_ListBox_SQL, Main_GridView.Rows[this.Row_Index].Cells[1].Value.ToString()); sfq.SQLite_Query_ListBox_Inverse(listBox2, Righ_Item_ListBox_SQL, Main_GridView.Rows[this.Row_Index].Cells[1].Value.ToString()); }
internal void status_stoped() { SQLite_Funciton_Query sfq = new SQLite_Funciton_Query(); sfq.SQLite_Query_Status(this.stop, Main_GridView.Rows[this.Row_Index].Cells[1].Value.ToString()); Log_DataBase("Status Stop", "Stop " + Main_GridView.Rows[this.Row_Index].Cells[3].Value.ToString()); }
internal void status_actived() { SQLite_Funciton_Query sfq = new SQLite_Funciton_Query(); sfq.SQLite_Query_Status(this.active, Main_GridView.Rows[this.Row_Index].Cells[1].Value.ToString()); Log_DataBase("Status Active", "Active " + Main_GridView.Rows[this.Row_Index].Cells[3].Value.ToString()); // m.Items[2].Text = "Stop"; }
private void delete_item() { Function_Settings fnc = new Function_Settings(); SQLite_Funciton_Query sfq = new SQLite_Funciton_Query(); sfq.SQLite_Query_Delete(this.delete, Main_GridView.Rows[this.Row_Index].Cells[1].Value.ToString()); Log_DataBase("Delete data", "Delete" + Main_GridView.Rows[this.Row_Index].Cells[3].Value.ToString()); Main_GridView.Rows.RemoveAt(this.Row_Index); fnc.reload(Main_GridView, select, View_Column_Type); }
private void btnStart_Click(object sender, EventArgs e) { tabControl1.SelectTab("tabPage4"); Default_Template_Gridview(); this.select = "select * from Log"; Function_Settings dta = new Function_Settings(); SQLite_Funciton_Query sfq = new SQLite_Funciton_Query(); dta.gridview(Log_GridView, this.select, this.View_Column_Type); sfq.SQLite_Query_Combox(cb1, "SELECT DISTINCT Action FROM Log;"); sfq.SQLite_Query_Combox(cb2, "SELECT DISTINCT Name FROM Log;"); this.Log_GridView.Columns[0].AutoSizeMode = DataGridViewAutoSizeColumnMode.DisplayedCells; }
private void ListBox_Item_Inverse(int i) { SQLite_Funciton_Query sfq = new SQLite_Funciton_Query(); listBox1.Items.Clear(); listBox2.Items.Clear(); if (i == 1) { sfq.SQLite_Query_ListBox_Inverse(listBox2, Righ_Item_ListBox_SQL, Main_GridView.Rows[this.Row_Index].Cells[1].Value.ToString()); sfq.SQLite_Query_ListBox(listBox2, Left_Item_ListBox_SQL, Main_GridView.Rows[this.Row_Index].Cells[1].Value.ToString()); } if (i == 2) { sfq.SQLite_Query_ListBox(listBox1, Left_Item_ListBox_SQL, Main_GridView.Rows[this.Row_Index].Cells[1].Value.ToString()); sfq.SQLite_Query_ListBox_Inverse(listBox1, Righ_Item_ListBox_SQL, Main_GridView.Rows[this.Row_Index].Cells[1].Value.ToString()); } }
//Function datagridview and insert checkbox(use create datasource) #region Gridview internal void gridview(DataGridView bunifuCustomDataGrid1, string select, int species) { SQLite_Funciton_Query sfq = new SQLite_Funciton_Query(); species_use = species; bunifuCustomDataGrid = bunifuCustomDataGrid1; selected = select; bunifuCustomDataGrid.DataSource = null; bunifuCustomDataGrid.ReadOnly = true; if (species_use == 0) { sfq.SQLite_Query(bunifuCustomDataGrid1, select); add_checkbox(bunifuCustomDataGrid); } if (species_use == 1) { sfq.SQLite_Query(bunifuCustomDataGrid1, select); add_checkbox(bunifuCustomDataGrid); } }
private void Log_DataBase(string fucntion, string Note = null) { if (GridView_Index == 1) { this.Log_Text_Concatenate = " in User"; } if (GridView_Index == 2) { this.Log_Text_Concatenate = " in Link"; } if (GridView_Index == 3) { this.Log_Text_Concatenate = " in Comment"; } if (GridView_Index == 4) { this.Log_Text_Concatenate = " in Group"; } string select = "INSERT INTO Log (Name, Time, Action, Note) VALUES('" + User_ACL.ToString() + "', '" + DateTime.Now.ToString() + "', '" + fucntion.ToString() + "','" + Note.ToString() + Log_Text_Concatenate + "');"; SQLite_Funciton_Query sfq = new SQLite_Funciton_Query(); sfq.SQLite_Query_Log_Database(Main_GridView, select); }
//Function datagridview no insert checkbox (use reload data or Create datasource) #region reload internal void reload(DataGridView bunifuCustomDataGrid1, string select, int species) { SQLite_Funciton_Query sfq = new SQLite_Funciton_Query(); this.species_use = species; this.bunifuCustomDataGrid = bunifuCustomDataGrid1; this.selected = select; bunifuCustomDataGrid.ClearSelection(); bunifuCustomDataGrid.DataSource = null; bunifuCustomDataGrid.Rows.Clear(); bunifuCustomDataGrid.Columns.Clear(); bunifuCustomDataGrid.Refresh(); bunifuCustomDataGrid.ReadOnly = true; if (species_use == 0) { sfq.SQLite_Query(bunifuCustomDataGrid1, select); add_checkbox(bunifuCustomDataGrid); } if (species_use == 1) { sfq.SQLite_Query(bunifuCustomDataGrid1, select); add_checkbox(bunifuCustomDataGrid); } }