Exemplo n.º 1
0
        /// <summary>
        /// 退回供应商--调用查询页面的批量处理方法
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnVendorPotalCancel_Click(object sender, RoutedEventArgs e)
        {
            List <int> li = new List <int>();

            li.Add(vm.SysNo.Value);
            UCVPCancelReason uctl = new UCVPCancelReason(li);

            uctl.Dialog = this.Window.ShowDialog(ResInvoiceInputMaintain.Dialog_VPCancelReason, uctl, (obj, args) =>
            {
                if (args.DialogResult == DialogResultType.OK && args.Data != null)
                {
                    Window.Alert(ResInvoiceInputMaintain.Msg_VPCancelSuccess);

                    vm.Status = APInvoiceMasterStatus.VPCancel;
                    SetControlStatus();
                }
            });
        }
Exemplo n.º 2
0
        private void Button_BatchVPCancel_Click(object sender, RoutedEventArgs e)
        {
            List <InvoiceInputVM> selectList = GetAPInvoiceMasterList();

            if (selectList.Count == 0)
            {
                Window.Alert(ResInvoiceInputQuery.Msg_SelectData);
                return;
            }
            var checkView = selectList.Where(x =>
            {
                return(x.IsVendorPortal != 1);
            }).ToList().Count;

            if (checkView > 0)
            {
                Window.Alert(ResInvoiceInputQuery.Msg_IsNotVendorPortal);
                return;
            }

            checkView = selectList.Where(x =>
            {
                return(x.Status != APInvoiceMasterStatus.Origin);
            }).ToList().Count;
            if (checkView > 0)
            {
                Window.Alert(ResInvoiceInputQuery.Msg_StatusIsNotOrigin);
                return;
            }
            List <int> li = selectList.Select(p => p.SysNo.Value).ToList();

            UCVPCancelReason uctl = new UCVPCancelReason(li);

            uctl.Dialog = this.Window.ShowDialog(ResInvoiceInputQuery.Dialog_VPCancelReason, uctl, (obj, args) =>
            {
                if (args.DialogResult == DialogResultType.OK && args.Data != null)
                {
                    this.DataGrid_QueryResult.Bind();
                }
            });
        }