예제 #1
0
        private void textBoxComponentID_Click(object sender, EventArgs e)
        {
            FormSearch formSearch = new FormSearch();

            formSearch.Show();
            formSearch.SetSelectFinishCallback(new Action <int>((int ID) =>
            {
                //Console.WriteLine(ID);
                Supply supply = (from s in wmsEntities.Supply where s.ID == ID select s).FirstOrDefault();
                WMS.DataAccess.Component component = (from c in wmsEntities.Component where c.ID == ID select c).FirstOrDefault();
                if (supply != null)
                {
                    //this.Controls.Find("textBoxComponentID", true)[0].Text = ID.ToString();
                    this.Controls.Find("textBoxComponentName", true)[0].Text = supply.Component.Name;
                    this.Controls.Find("textBoxComponentNo", true)[0].Text   = supply.No;
                    this.componentID = ID;
                }
                else
                {
                    MessageBox.Show("找不到该零件");
                }
            }));
        }
        private void btnSearch_Click(object sender, EventArgs e)
        {
            var frm = new FormSearch(Dispatcher);

            frm.Show();
        }
예제 #3
0
        private void търсенеНаКнигиToolStripMenuItem_Click(object sender, EventArgs e)
        {
            FormSearch fS = new FormSearch(0, 0);

            fS.Show();
        }