Exemple #1
0
        private void btn1_GD_view_Click(object sender, EventArgs e)
        {
            ConnectToMySQL dbc = new ConnectToMySQL(user_id_lbl.Text, user_hash_lbl.Text);
            FormFunctions fFunc = new FormFunctions(user_id_lbl.Text, user_hash_lbl.Text);

            if (fFunc.checkSession(user_hash_lbl.Text.ToString(), double.Parse(ConfigurationManager.AppSettings["session_expiry"])) == false)
            {
                MessageBox.Show("Login expired ! Please login again.");
                loginEnable();
                tabControl1.SelectedTab = tabPage0;
            }
            else
            {
                TabControlGlobal TCG = new TabControlGlobal(user_id_lbl.Text, user_hash_lbl.Text);
                dbTableFunctions dbFunc = new dbTableFunctions(user_id_lbl.Text, user_hash_lbl.Text);

                GD_view_listView.Clear();
                GD_view_listView.View = View.Details;
                //fFunc.popListViewT(listView1, "po_details");

                DataSet ds = new DataSet();
                ds = dbc.SelectMyDA("SELECT * FROM po_details;");
                fFunc.popListViewDS(GD_view_listView, ds);

                //string query = "UPDATE `po_details` SET `job_number`= \"" + txtBox_gang_num.Text + "\", po_number = \"" + po_number_txtBox1.Text + "\", gang_number = \"" + gang_number_txtBox1.Text + "\" WHERE  `id`=1 LIMIT 1; ";
                //dbc.Update(query);
            }
        }