示例#1
0
 private void SearchNivyForm2_Activated(object sender, EventArgs e)
 {
     if (gvResult.Rows.Count > 0)
     {
         gvResult.Focus();
     }
     else
     {
         inputSearch.SetFocusID13();
     }
 }
示例#2
0
 public SearchNivyForm2()
 {
     InitializeComponent();
     tempInput        = new InputSearchPersonNivy();
     inputSearch      = new SearchPersonNivyInputControl2();
     inputSearch.Dock = DockStyle.Top;
     inputSearch.SearchButtonClick += new EventHandler(SearchPersonNivy_ButtonSubmitClick);
     groupBox1.Controls.Add(inputSearch);
     inputSearch.SetFocusID13();
     btnNextPage.Enabled = false;
     btnPrevPage.Enabled = false;
     pictureBox1.Visible = false;
 }
示例#3
0
        public SearchNivyForm2(string id13)
        {
            InitializeComponent();
            tempInput        = new InputSearchPersonNivy();
            inputSearch      = new SearchPersonNivyInputControl2();
            inputSearch.Dock = DockStyle.Top;
            inputSearch.SearchButtonClick += new EventHandler(SearchPersonNivy_ButtonSubmitClick);
            groupBox1.Controls.Add(inputSearch);
            inputSearch.SetFocusID13();
            btnNextPage.Enabled = false;
            btnPrevPage.Enabled = false;
            pictureBox1.Visible = false;

            try
            {
                tempInput.id13 = id13;
                inputSearch.SetInput(tempInput);
                if (id13.Trim() != "")
                {
                    SearchPersonNivy_ButtonSubmitClick(inputSearch.GetButtonSearch(), null);
                }

                //Control[] c = (inputSearch.Controls.Find("textBoxID13", true));
                //if (c.Length > 0)
                //{
                //    ((TextBox)c[0]).Text = id13;

                //    SearchPersonNivy_ButtonSubmitClick(inputSearch.GetButtonSearch(), null);
                //    //dcore = new DataCoreLibrary(System.Configuration.ConfigurationManager.ConnectionStrings["midb"].ConnectionString);
                //    //Search();
                //    //gvResult.Focus();
                //}
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }