示例#1
0
        private void dgvStaff_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            var d = dgvStaff.SelectedItem as BLL.Staff;

            if (d != null)
            {
                data.Find(d.Id);
            }
        }
示例#2
0
        private void onClientEvents()
        {
            BLL.FMCGHubClient.FMCGHub.On <BLL.Staff>("Staff_Save", (prod) =>
            {
                this.Dispatcher.Invoke(() =>
                {
                    prod.Save(true);
                });
            });

            BLL.FMCGHubClient.FMCGHub.On("Staff_Delete", (Action <int>)((pk) =>
            {
                this.Dispatcher.Invoke((Action)(() =>
                {
                    BLL.Staff prod = new BLL.Staff();
                    prod.Find((int)pk);
                    prod.Delete((bool)true);
                }));
            }));
        }