示例#1
0
        //search
        private void button2_Click(object sender, EventArgs e)
        {
            string sKeyword = txtKeyword.Text.Trim();

            if (sKeyword == null || sKeyword == string.Empty || sKeyword.Length == 0) // tìm tất cả
            {
                List <MonAnDTO> listMonAn = maBUS.select();
                this.loadData_Vao_GridView(listMonAn);
            }
            else
            {
                List <MonAnDTO> listMonAn = maBUS.selectByKeyWord(sKeyword);
                this.loadData_Vao_GridView(listMonAn);
            }
        }