Beispiel #1
0
        // 从采购单创建收货单,一个采购单可以创建多个收货单,正常说应该以实收数量来限制收货单入库总量不能大于采购订单量
        private void OnChoosePOButtonClick(object sender, DevExpress.XtraEditors.Controls.ButtonPressedEventArgs e)
        {
            if (e.Button.Kind == DevExpress.XtraEditors.Controls.ButtonPredefines.Ellipsis)
            {
                using (FrmPoQuery frmQuery = new FrmPoQuery())
                {
                    //如果只启用一审,则传参一审
                    string billState = string.Concat(BillStateConst.PO_STATE_CODE_SECOND_APPROVED, ",", BillStateConst.PO_STATE_CODE_RECEIVING);
                    if (CustomFields.ApproveType.ItemValue == "1")
                    {
                        billState = string.Concat(BillStateConst.PO_STATE_CODE_FIRST_APPROVED, ",", BillStateConst.PO_STATE_CODE_RECEIVING);
                    }

                    frmQuery.LockThisState(billState);

                    if (frmQuery.ShowDialog() == DialogResult.OK)
                    {
                        POBodyEntity header = frmQuery.FocusedHeader;
                        txtPO.Text               = header.BillID;
                        listBillType.EditValue   = header.BillType;
                        listRespPerson.EditValue = header.Sales;
                        listSupplier.EditValue   = header.Supplier;
                        txtContractNO.Text       = header.ContractNO;

                        bindingSource1.DataSource = header.Details;
                    }
                }
            }
            else
            {
                ClearHeader();
            }
        }
Beispiel #2
0
        void ChoosePO()
        {
            FrmPoQuery frmQuery = new FrmPoQuery();

            if (frmQuery.ShowDialog() == DialogResult.OK)
            {
                ShowPODetail(frmQuery.FocusedHeader);
            }
        }