Example #1
0
        private void btnRefresh_Click(object sender, EventArgs e)
        {
            InOop ins = new InOop();

            ins.ShowDatatbase();
            dgvRegister.DataSource = ins.ds.Tables[0];
        }
        private void btnInsert_Click(object sender, EventArgs e)
        {
            InOop ins = new InOop();

            ins.name        = txtName.Text.ToString();
            ins.fathername  = txtFatherName.Text.ToString();
            ins.mobile      = txtMobile.Text.ToString();
            ins.dateofbirth = dtpDateOFBirth.Text.ToString();
            ins.gender      = cboGender.Text.ToString();
            ins.insert();
            MessageBox.Show("registered !");
        }
Example #3
0
        private void btnSearch_Click(object sender, EventArgs e)
        {
            int    select = 0;
            InOop  ins    = new InOop();
            string txt    = txtSearch.Text.ToString();

            ins.funSearchTitle(txt, select);
            switch (cboSearch.SelectedIndex)
            {
            case 0: select = 0; break;

            case 1: select = 1; break;

            case 2: select = 2; break;

            case 3: select = 3; break;

            case 4: select = 4; break;

            case 5: select = 5; break;
            }
            dgvRegister.DataSource = ins.ds.Tables[0];
        }