Exemplo n.º 1
0
        public void Edit(int id)
        {
            var model = localDb.GetById(id);

            if (model != null)
            {
                UserView userView = new UserView(model);
                var      result   = userView.ShowDialog();

                if (result.Value)
                {
                    var newmodel = GridModelList.FirstOrDefault(x => x.Id.Equals(id));
                    if (newmodel != null)
                    {
                        newmodel.Name = model.Name;
                    }
                }
            }
        }