コード例 #1
0
 private void txtSearch_KeyPress(object sender, KeyPressEventArgs e)
 {
     if (e.KeyChar == (char)13)
     {
         if (this.GridView_Index == 1)
         {
             this.search = "select * from User where UserName Like '%" + txtSearch.Text + "%'";
         }
         if (this.GridView_Index == 2)
         {
             this.search = "select * from Link where LinkName Like '%" + txtSearch.Text + "%'";
         }
         if (this.GridView_Index == 3)
         {
             this.search = "select * from Comment where Comment Like '%" + txtSearch.Text + "%'";
         }
         if (this.GridView_Index == 4)
         {
             this.search = "select * from ListGroup where GroupName Like '%" + txtSearch.Text + "%'";
         }
         Function_Settings fnc = new Function_Settings();
         fnc.search_value(this.search);
         fnc.search_item(Main_GridView, this.search);
     }
 }
コード例 #2
0
        private void btnFilter_Click(object sender, EventArgs e)
        {
            this.search = "SELECT Name, Time, Action,Note FROM Log WHERE Action LIKE '%" + cb1.Text + "%' and Time BETWEEN '" +
                          "" + dateTimePicker1.Value.ToString() + "' AND '" + dateTimePicker2.Value.ToString() + "'AND Name LIKE '%" + cb2.Text + "%'";
            Function_Settings fnc = new Function_Settings();

            fnc.search_value(this.search);
            fnc.search_item(Log_GridView, this.search);
        }
コード例 #3
0
        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);
        }
コード例 #4
0
        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;
        }
コード例 #5
0
        private void btnReload_Click(object sender, EventArgs e)
        {
            Function_Settings dta = new Function_Settings();

            Total_Status();
            if (this.Default_GridView == 1)
            {
                dta.reload(Main_GridView, this.select, this.View_Column_Type);
                Main_GridView.ClearSelection();
            }
            else
            {
                MessageBox.Show("dashboard");
            }
            color();
        }
コード例 #6
0
        private void button_fuction(int view_column_type, string tabpage, DataGridView name, int GridViewIndex)
        {
            this.View_Column_Type = view_column_type;
            Default_Template_Gridview();
            tabControl1.SelectTab(tabpage);
            Function_Settings dta = new Function_Settings();

            if (Default_GridView == 0)
            {
                MessageBox.Show(select);
                dta.gridview(name, this.select, this.View_Column_Type);
                name.ClearSelection();
                this.Default_GridView = 1;
            }
            else
            {
                MessageBox.Show(select);
                dta.reload(name, this.select, this.View_Column_Type);
                name.ClearSelection();
            }
            this.GridView_Index = GridViewIndex;
            color();
        }