Exemple #1
0
        private void Button2_Click(object sender, EventArgs e)
        {
            if (!string.IsNullOrWhiteSpace(txtSearch.Text))
            {
                try
                {
                    DataTable ds;

                    clsModule.SearchMp(gdvSearch, txtSearch.Text.ToLower());;

                    if (clsModule.Status == 0)
                    {
                        clear();
                        MessageBox.Show("Oops! No Record Found", "Error", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
                    }
                }
                catch (Exception ex)
                {
                    throw new Exception(ex.ToString());
                }
            }
            else
            {
                MessageBox.Show("The Search field is empty", "Error", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                gdvSearch.Refresh();
            }
        }