예제 #1
0
        protected void btnSearch_Click(object sender, EventArgs e)
        {
            List <string> fulltext = new List <string>();
            string        item     = kword.Value.Replace("'", "");

            dateFrom = z.formatSearchDate(datepickerFrom.Value);
            dateTo   = z.formatSearchDate(datepickerTo.Value);
            if ((dateTo == "") || (dateTo == null))
            {
                dateTo = DateTime.Today.Date.ToString("yyyy-MM-dd");
            }
            foreach (string str2 in item.Split(new char[] { ' ' }))
            {
                if (str2 != "")
                {
                    fulltext.Add(str2);
                }
            }

            if (selectSearchCriteria.SelectedValue == "applicant_name")
            {
                lt_mi = z.getGAdminSearchAppInfoRS(x_status, x_data_status, selectSearchCriteria.SelectedValue, item, dateFrom, dateTo);
                if (lt_mi.Count() > 0)
                {
                    criteria = lt_mi.Count() + " result(s) found for search criteria (" + kword.Value + ")!!";
                }
                else
                {
                    criteria = "No result found for search criteria (" + kword.Value + ")!!";
                }
            }
            else
            {
                if (fulltext.Count() == 1)
                {
                    lt_mi = z.getGAdminSearchAppInfoRS(x_status, x_data_status, selectSearchCriteria.SelectedValue, item, dateFrom, dateTo);

                    if (lt_mi.Count() > 0)
                    {
                        criteria = lt_mi.Count() + " result(s) found for search criteria (" + kword.Value + ")!!";
                    }
                    else
                    {
                        criteria = "No result found for search criteria (" + kword.Value + ")!!";
                    }
                }
                else
                {
                    criteria = "The Registration number cannot be more one (1) !!";
                }
            }
        }
예제 #2
0
    protected void btnSearch_Click(object sender, EventArgs e)
    {
        List <string> fulltext = new List <string>();
        string        str      = kword.Value.Replace("'", "");

        dateFrom = z.formatSearchDate(datepickerFrom.Value);
        dateTo   = z.formatSearchDate(datepickerTo.Value);
        if ((dateTo == "") || (dateTo == null))
        {
            dateTo = DateTime.Today.Date.ToString("yyyy-MM-dd");
        }
        foreach (string str2 in str.Split(new char[] { ' ' }))
        {
            if (str2 != "")
            {
                fulltext.Add(str2);
            }
        }
        if (selectSearchCriteria.SelectedValue == "product_title")
        {
            lt_mi = z.getAdminSearchPtInfoRS("4", "A_Contact", selectSearchCriteria.SelectedValue, fulltext, dateFrom, dateTo);
            if (lt_mi.Count <zues.PtInfo>() > 0)
            {
                criteria = string.Concat(new object[] { lt_mi.Count <zues.PtInfo>(), " result(s) found for search criteria (", kword.Value, ")!!" });
            }
            else
            {
                criteria = "No result found for search criteria (" + kword.Value + ")!!";
            }
        }
        else if (fulltext.Count <string>() == 1)
        {
            if (lt_mi.Count <zues.PtInfo>() > 0)
            {
                lt_mi = z.getAdminSearchPtInfoRS("1", "A_Contact", selectSearchCriteria.SelectedValue, fulltext, dateFrom, dateTo);
            }
            else
            {
                criteria = "No result found for search criteria (" + kword.Value + ")!!";
            }
        }
        else
        {
            criteria = "The Application number cannot be more one (1) !!";
        }
    }