예제 #1
0
파일: Form1.cs 프로젝트: setmard/ShoesApp
        private void btnFindId_Click(object sender, EventArgs e)
        {
            var a = new ShoesApp.Business.Manager();
            int nid2;
            var nid = int.TryParse(tBid.Text, out nid2);
            var n   = tbName.Text;
            var b   = a.SearchS(nid2);

            ShoesList.Rows.Clear();
            foreach (var item in b)
            {
                DataGridViewRow row = new DataGridViewRow();
                row.Cells.Add(new DataGridViewTextBoxCell {
                    Value = item.Id
                });
                row.Cells.Add(new DataGridViewTextBoxCell {
                    Value = item.Title
                });
                row.Cells.Add(new DataGridViewTextBoxCell {
                    Value = item.Nombre
                });
                row.Cells.Add(new DataGridViewTextBoxCell {
                    Value = item.Description
                });
                row.Cells.Add(new DataGridViewTextBoxCell {
                    Value = item.PriceClient
                });
                ShoesList.Rows.Add(row);
            }
        }
예제 #2
0
파일: Form1.cs 프로젝트: setmard/ShoesApp
        private void btnFindName_Click(object sender, EventArgs e)
        {
            var name = new ShoesApp.Business.Manager();
            var nm   = tbName.Text;

            var all = name.searchByName(nm);

            ShoesList.Rows.Clear();
            foreach (var item in all)
            {
                DataGridViewRow row = new DataGridViewRow();
                row.Cells.Add(new DataGridViewTextBoxCell {
                    Value = item.Id
                });
                row.Cells.Add(new DataGridViewTextBoxCell {
                    Value = item.Title
                });
                row.Cells.Add(new DataGridViewTextBoxCell {
                    Value = item.Nombre
                });
                row.Cells.Add(new DataGridViewTextBoxCell {
                    Value = item.Description
                });
                row.Cells.Add(new DataGridViewTextBoxCell {
                    Value = item.PriceClient
                });
                ShoesList.Rows.Add(row);
            }
        }