Exemple #1
0
        //生成進料檢驗單
        private void simpleButton3_Click_1(object sender, EventArgs e)
        {
            if (this._produceOtherInDepot.Details.Where(d => d.IsCheck == true).ToList().Count == 0)
            {
                MessageBox.Show("請選擇要生成的商品!", this.Text, MessageBoxButtons.OK);
                return;
            }
            if (_produceOtherInDepot.Details.Any(d => d.IsCheck == true && !string.IsNullOrEmpty(d.GenerateInputCheck)))
            {
                MessageBox.Show("選中的商品已經生成過進料檢驗單!", this.Text, MessageBoxButtons.OK);
                return;
            }
            IList <Model.ProduceOtherInDepotDetail> list = _produceOtherInDepot.Details.Where(d => d.IsCheck == true).ToList();

            if (list == null || list.Count == 0)
            {
                return;
            }
            produceManager.PCOtherCheck.EditForm f = new Book.UI.produceManager.PCOtherCheck.EditForm(list);
            f.ShowDialog(this);
            this._produceOtherInDepot.Details    = this.produceOtherInDepotDetailManager.Select(_produceOtherInDepot);
            this.bindingSourceDetails.DataSource = _produceOtherInDepot.Details;
            this.gridControl1.RefreshDataSource();
        }
Exemple #2
0
        private void repositoryItemHyperLinkEdit1_Click(object sender, EventArgs e)
        {
            string id = (this.bindingSource1.Current as HelpClass) == null ? null : (this.bindingSource1.Current as HelpClass).Id;

            if (!string.IsNullOrEmpty(id))
            {
                if (id.Contains("XD"))
                {
                    Invoices.XO.EditForm xo = new Book.UI.Invoices.XO.EditForm(id);
                    xo.Show(this);
                }
                else if (id.Contains("CD"))
                {
                    Invoices.CO.EditForm co = new Book.UI.Invoices.CO.EditForm(id);
                    co.Show(this);
                }
                else if (id.Contains("MRP"))
                {
                    MRSHeader.EditForm mrp = new Book.UI.produceManager.MRSHeader.EditForm(id);
                    mrp.Show(this);
                }
                else if (id.Contains("POM"))
                {
                    ProduceOtherMaterial.EditForm pom = new Book.UI.produceManager.ProduceOtherMaterial.EditForm(id);
                    pom.Show(this);
                }
                else if (id.Contains("PDM"))
                {
                    ProduceMaterial.EditForm pdm = new Book.UI.produceManager.ProduceMaterial.EditForm(id);
                    pdm.Show(this);
                }
                else if (id.Contains("CC") && !id.Contains("QCC"))
                {
                    Settings.StockLimitations.OutStockEditForm cc = new Book.UI.Settings.StockLimitations.OutStockEditForm(id);
                    cc.Show(this);
                }
                else if (id.Contains("XC"))
                {
                    Invoices.XS.EditForm xc = new Book.UI.Invoices.XS.EditForm(id);
                    xc.Show(this);
                }
                else if (id.Contains("PID"))
                {
                    ProduceInDepot.EditForm pid = new Book.UI.produceManager.ProduceInDepot.EditForm(id);
                    pid.Show(this);
                }
                else if (id.Contains("POC"))            //委外合同或者产品上线检验单
                {
                    if (this.invoiceType.Contains("委外合同單"))
                    {
                        ProduceOtherCompact.EditForm p = new Book.UI.produceManager.ProduceOtherCompact.EditForm(id);
                        p.Show(this);
                    }
                    else
                    {
                        ProductOnlineCheck.Editform poc = new Book.UI.produceManager.ProductOnlineCheck.Editform(id);
                        poc.Show(this);
                    }
                }
                else if (id.Contains("PNT"))
                {
                    PronoteHeader.EditForm pnt = new Book.UI.produceManager.PronoteHeader.EditForm(id);
                    pnt.Show(this);
                }
                else if (id.Contains("QCC"))
                {
                    PCFinishCheck.EditForm qcc = new Book.UI.produceManager.PCFinishCheck.EditForm(id);
                    qcc.Show(this);
                }
                else if (id.Contains("QC") && !id.Contains("QCC"))
                {
                    PCPGOnlineCheck.EditForm qc = new Book.UI.produceManager.PCPGOnlineCheck.EditForm(id);
                    qc.Show(this);
                }
                else if (id.Contains("pcOptics"))
                {
                    PCOpticsCheck.EditForm pcOptics = new Book.UI.produceManager.PCOpticsCheck.EditForm(id);
                    pcOptics.Show(this);
                }
                else if (id.Contains("QAN"))
                {
                    ANSIPCImpactCheck.EditForm qan = new Book.UI.produceManager.ANSIPCImpactCheck.EditForm(id);
                    qan.Show(this);
                }
                else if (id.Contains("PCOC"))
                {
                    PCOtherCheck.EditForm pcoc = new Book.UI.produceManager.PCOtherCheck.EditForm(id);
                    pcoc.Show(this);
                }
            }
        }