private void btnAdd_Click(object sender, RoutedEventArgs e)
        {
            ProductBrandWarrantyEditMaintain item = new ProductBrandWarrantyEditMaintain();

            item.Dialog = Window.ShowDialog("新建品牌维护", item, (s, args) =>
            {
                this.QueryResultGrid.Bind();
            }, new Size(600, 350));
            QueryResultGrid.Bind();
        }
        private void btnEdit_Click(object sender, RoutedEventArgs e)
        {
            Boolean    isOne     = true;
            List <int> editSysNo = new List <int>();
            ProductBrandWarrantyQueryVM      vm   = null;
            ProductBrandWarrantyEditMaintain edit = new ProductBrandWarrantyEditMaintain();

            vms.ForEach(item =>
            {
                if (item.IsChecked)
                {
                    if (isOne)
                    {
                        vm = new ProductBrandWarrantyQueryVM()
                        {
                            BrandSysNo   = item.BrandSysNo,
                            BrandName    = item.BrandName,
                            C1Name       = item.C1Name,
                            C2Name       = item.C2Name,
                            C3Name       = item.C3Name,
                            C1SysNo      = item.C1SysNo,
                            C2SysNo      = item.C2SysNo,
                            C3SysNo      = item.C3SysNo,
                            WarrantyDay  = item.WarrantyDay,
                            WarrantyDesc = item.WarrantyDesc
                        };
                        edit.Data = vm;
                        isOne     = false;
                    }
                    editSysNo.Add(item.SysNo);
                }
            });
            if (vm != null)
            {
                edit.EditSysNos = editSysNo;
                edit.Dialog     = Window.ShowDialog("編輯品牌维护", edit, (s, args) =>
                {
                    this.QueryResultGrid.Bind();
                }, new Size(600, 350));
            }
            else
            {
                CPApplication.Current.CurrentPage.Context.Window.Alert("请输选择需要维护的品牌!");
            }
        }