Exemplo n.º 1
0
        //删除子表
        private void Delete_Click(object sender, RoutedEventArgs e)
        {
            if (_oVCard.Count > 1) //必须有派车单,司机才能根据派车单提交费用 单
            {
                T_OA_VEHICLECARD i = ((Button)sender).DataContext as T_OA_VEHICLECARD;
                _oVCard.Remove(i);

                if (i.VEHICLECARDID != null) //删除已经保存到服务器中的数据
                {
                    ObservableCollection <string> o = new ObservableCollection <string>();
                    o.Add(i.VEHICLECARDID);
                    _VM.Del_VICardAsync(o);
                    RefreshUI(RefreshedTypes.ProgressBar);
                }
            }
        }