Пример #1
0
        private void btnSave_Click(object sender, EventArgs e)
        {
            try
            {
                var shop = new Shop();

                shop.ShCode = txtCode.Text;
                shop.ShName = txtName.Text;

                var ss = new Shops();

                ss.Save(shop);

                var list = ss.GetList();

                dg.DataSource = list;
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.ToString());
            }
        }