public 包外返修领料明细(AuthorityFlag m_authFlag, string billID)
        {
            InitializeComponent();

            FaceAuthoritySetting.SetEnable(this.Controls, m_authFlag);
            FaceAuthoritySetting.SetVisibly(this.toolStrip, m_authFlag);
            this.toolStrip.Visible = true;

            RefreshInfo(m_serverThreePacketsOfTheRepair.GetList(billID));

            userControlDataLocalizer1.OnlyLocalize = true;

            m_lnqBill = m_serverThreePacketsOfTheRepair.GetBill(billID, out m_strErr);

            if (m_lnqBill == null)
            {
                m_lnqBill.Bill_ID = billID;
            }
            else
            {
                numMarketingStrategy.Value = Convert.ToDecimal(m_lnqBill.MarketingStrategy);
                numRepairTaskTime.Value    = Convert.ToDecimal(m_lnqBill.RepairTaskTime);
                txtPlantRemark.Text        =
                    m_lnqBill.PlantRemark == null ? "" : m_lnqBill.PlantRemark.ToString();

                SumPrice();
            }

            txtName.Enabled = btnAdd.Enabled;

            if (dataGridView1.Rows.Count == 0 && m_lnqBill != null && m_lnqBill.DJZT == "等待领料明细申请")
            {
                dataGridView1.DataSource = m_serverThreePacketsOfTheRepair.InsertThreePacketsOfTheRepairList(m_lnqBill.Bill_ID, out m_strErr);

                if (m_strErr != null)
                {
                    FormLargeMessage form = new FormLargeMessage(m_strErr, Color.Red);
                    form.ShowDialog();
                }

                btnShortcutSelect.Visible = true;
            }
            else
            {
                btnShortcutSelect.Visible = false;
            }
        }
Ejemplo n.º 2
0
        private void btnCreateMaterialRequisition_Click(object sender, EventArgs e)
        {
            if (m_masterInfo.Status.ToString() == "已完成")
            {
                if (!m_billServer.AutogenerationMaterialRequisition(m_masterInfo.BillID,
                                                                    m_masterInfo.StorageID, out m_err))
                {
                    MessageDialog.ShowPromptMessage(m_err);
                    return;
                }
                else
                {
                    MessageDialog.ShowPromptMessage("自动生成成功!");

                    string strOutMessage = "";

                    if (m_err != null && m_err != "")
                    {
                        strOutMessage += "\n" + m_err + "\n 库存不足";
                        m_sb           = new StringBuilder();
                        m_sb.AppendLine();
                        m_sb.AppendLine(strOutMessage);
                        m_sb.AppendLine();
                        m_sb.AppendLine("  请自行在所关联的领料单中进行调整");

                        FormLargeMessage form = new FormLargeMessage(m_sb.ToString(), Color.Red);
                        form.ShowDialog();
                    }

                    this.Close();
                }
            }
            else
            {
                MessageDialog.ShowPromptMessage("请重新确认单据状态");
                return;
            }
        }