Example #1
0
        private void regularserchTXT_ButtonClick(object sender, EventArgs e)
        {
            regularserchTXT.Text = regularserchTXT.Text.Replace("'", "`").Trim();
            regularserchTXT.Text = regularserchTXT.Text.Replace("\"", "``").Trim();

            CallinTableClass b     = new CallinTableClass(this);
            string           query = "select " + rowcounter(rownumber1.Text) + " " + b.callintbcolumns + " from callintb where project like '%" + regularserchTXT.Text + "%'";

            b.findcallin(query);
        }
Example #2
0
        private void findBTN_Click(object sender, EventArgs e)
        {
            cleanSearchfields();

            string cola = "STATUS";
            string colb = "CDATE";
            string colc = "CIN";
            string cold = "PROJECT";
            string colf = "ADDRESS";
            string colg = "RECIPIENT";

            string a = statusSearch.Text;
            string b = dateSearch.Text;
            string c = cinSearch.Text;
            string d = projectSearch.Text;
            string f = addressSearch.Text;
            string g = recipientSearch.Text;

            if (a == "")
            {
                a = "STATUS";
            }
            else
            {
                a = "'%" + a + "%'";
            }

            if (b == "")
            {
                b = "CDATE";
            }
            else
            {
                b = "'%" + b + "%'";
            }

            if (c == "")
            {
                c = "CIN";
            }
            else
            {
                c = "'%" + c + "%'";
            }

            if (d == "")
            {
                d = "PROJECT";
            }
            else
            {
                d = "'%" + d + "%'";
            }

            if (f == "")
            {
                f = "ADDRESS";
            }
            else
            {
                f = "'%" + f + "%'";
            }

            if (g == "")
            {
                g = "RECIPIENT";
            }
            else
            {
                g = "'%" + g + "%'";
            }

            CallinTableClass y     = new CallinTableClass(this);
            string           query = "select " + rowcounter(rownumber1.Text) + " " + y.callintbcolumns + " from callintb where " + cola + " like " + a + " and " +
                                     "" + colb + " like " + b + " and " +
                                     "" + colc + " like " + c + " and " +
                                     "" + cold + " like " + d + " and " +
                                     "" + colf + " like " + f + " and " +
                                     "" + colg + " like " + g + " order by autonum desc";

            y.findcallin(query);
        }