コード例 #1
0
        /// <summary>
        /// tim kiếm thông tin địa danh
        /// </summary>
        private void Search()
        {
            string strSearch = StringTools.TrimSpace(txtTimKiem.Text);

            if (strSearch.Length > 0)
            {
                if (rdoDiaChi.Checked)
                {
                    grcDiaDanh.DataSource = DiaDanh.GetDSDiaDanh_ByDiaChi(strSearch);
                }
                else
                {
                    grcDiaDanh.DataSource = DiaDanh.GetDSDiaDanh_ByTenDiaDanh(strSearch);
                }
            }
            else
            {
                LoadDSDiaDanh();
            }
        }
コード例 #2
0
        /// <summary>
        /// tim kiếm thông tin địa danh
        /// </summary>
        private void Search()
        {
            string strSearch = StringTools.TrimSpace(txtTimKiem.Text);

            if (strSearch.Length > 0)
            {
                gridDiaDanh.DataMember = "ListOfDiaDanh";
                if (rdoDiaChi.Checked)
                {
                    gridDiaDanh.SetDataBinding(DiaDanh.GetDSDiaDanh_ByDiaChi(strSearch), "ListOfDoiTac");
                }
                else
                {
                    gridDiaDanh.SetDataBinding(DiaDanh.GetDSDiaDanh_ByTenDiaDanh(strSearch), "ListOfDoiTac");
                }
            }
            else
            {
                LoadDSDiaDanh();
            }
        }