예제 #1
0
        private void fishId_DoubleClick(object sender, EventArgs e)
        {
            if (string.IsNullOrEmpty(txtdataForm.Text))
            {
                MessageBox.Show("请选择数据来源");
                return;
            }

            if (txtdataForm.Text.Equals("自制仓库"))
            {
                FormNewSelfcontrolWare form = new FormNewSelfcontrolWare( );//FormSelfcontrolWare
                if (form.ShowDialog( ) == DialogResult.OK)
                {
                    FishEntity.BatchSheetsEntity _model = form.getModel;
                    fishId.Text     = _model.fishId;
                    price.Text      = _model.price.ToString( );
                    tvn.Text        = _model.tvn;
                    protein.Text    = _model.protein;
                    ash.Text        = _model.ash;
                    histamine.Text  = _model.histamine;
                    salt.Text       = _model.salt;
                    las.Text        = _model.las;
                    das.Text        = _model.das;
                    country.Text    = _model.country;
                    qualitySpe.Text = _model.qualitySpe;
                    brand.Text      = _model.brand;
                }
            }
            else if (txtdataForm.Text.Equals("自营仓库"))
            {
                FormNewPriWarehouse form = new FormNewPriWarehouse();//
                if (form.ShowDialog() == DialogResult.OK)
                {
                    FishEntity.ProductQuoteVo _model = form.getModel;
                    fishId.Text     = _model.code;
                    price.Text      = _model.confirmrmb.ToString();
                    tvn.Text        = _model.sgs_tvn.ToString();
                    protein.Text    = _model.sgs_protein.ToString();
                    ash.Text        = _model.sgs_graypart.ToString();
                    histamine.Text  = _model.sgs_amine.ToString();
                    FFA.Text        = _model.sgs_ffa.ToString();;
                    salt.Text       = _model.domestic_sandsalt.ToString();
                    las.Text        = _model.domestic_lysine.ToString();
                    das.Text        = _model.domestic_methionine.ToString();
                    qualitySpe.Text = _model.specification;
                    country.Text    = _model.nature;
                    brand.Text      = _model.brand;
                }
            }
            else if (txtdataForm.Text.Equals("报盘"))
            {
                FormQuote form = new FormQuote();//
                if (form.ShowDialog() == DialogResult.OK)
                {
                    FishEntity.ProductQuoteVo _model = form.getModel;
                    fishId.Text     = _model.code;
                    tvn.Text        = _model.quote_tvn.ToString();
                    protein.Text    = _model.quote_protein.ToString();
                    ash.Text        = _model.quote_graypart.ToString();
                    histamine.Text  = _model.quote_amine.ToString();
                    FFA.Text        = _model.quote_ffa.ToString();;
                    salt.Text       = _model.quote_sandsalt.ToString();
                    qualitySpe.Text = _model.specification;
                    brand.Text      = _model.brand;
                    country.Text    = _model.nature;
                }
            }
            else if (txtdataForm.Text.Equals("现货"))
            {
                FormSpot form = new FormSpot();//
                if (form.ShowDialog() == DialogResult.OK)
                {
                    FishEntity.ProductQuoteVo _model = form.getModel;
                    fishId.Text     = _model.code;
                    price.Text      = _model.quotermb.ToString();
                    tvn.Text        = _model.sgs_tvn.ToString();
                    protein.Text    = _model.sgs_protein.ToString();
                    ash.Text        = _model.sgs_graypart.ToString();
                    histamine.Text  = _model.sgs_amine.ToString();
                    FFA.Text        = _model.sgs_ffa.ToString();;
                    salt.Text       = _model.sgs_sandsalt.ToString();
                    qualitySpe.Text = _model.specification;
                    brand.Text      = _model.brand;
                    country.Text    = _model.nature;
                }
            }
            else if (txtdataForm.Text.Equals("确盘"))
            {
                FormConfirm form = new FormConfirm();//
                if (form.ShowDialog() == DialogResult.OK)
                {
                    FishEntity.ProductQuoteVo _model = form.getModel;
                    fishId.Text     = _model.code;
                    price.Text      = _model.quotermb.ToString();
                    tvn.Text        = _model.quote_tvn.ToString();
                    protein.Text    = _model.quote_protein.ToString();
                    ash.Text        = _model.quote_graypart.ToString();
                    histamine.Text  = _model.quote_amine.ToString();
                    FFA.Text        = _model.quote_ffa.ToString();;
                    salt.Text       = _model.quote_sandsalt.ToString();
                    qualitySpe.Text = _model.specification;
                    brand.Text      = _model.brand;
                    country.Text    = _model.nature;
                }
            }
        }
예제 #2
0
        private void txtfishId_DoubleClick(object sender, EventArgs e)
        {
            if (rabBP.Checked == false && rabXH.Checked == false && rabZY.Checked == false)
            {
                MessageBox.Show("请选择数据来源");
                return;
            }

            if (rabBP.Checked == true)
            {
                FormQuote form = new FormQuote();
                if (form.ShowDialog() != DialogResult.OK)
                {
                    return;
                }
                FishEntity.ProductQuoteVo Quote = form.getModel;
                if (Quote == null)
                {
                    return;
                }
                txtcountry.Text       = Quote.nature;
                txtsupplier.Text      = Quote.quotesupplier;
                txtsupplierUser.Text  = Quote.linkman;
                danjia.Text           = Quote.quotermb.ToString();
                txtpriceMY.Text       = Quote.quotedollars.ToString();
                txtbrands.Text        = Quote.specification;
                txtfishId.Text        = Quote.code;
                txtEexchangeRate.Text = Quote.QuotEexchangeRate;
            }
            else if (rabXH.Checked == true)
            {
                FormSpot form = new FormSpot();
                if (form.ShowDialog() != DialogResult.OK)
                {
                    return;
                }
                FishEntity.ProductQuoteVo Spot = form.getModel;
                if (Spot == null)
                {
                    return;
                }
                txtcountry.Text      = Spot.nature;
                txtsupplier.Text     = Spot.quotesupplier;
                txtsupplierUser.Text = Spot.linkman;
                danjia.Text          = Spot.quotermb.ToString();
                txtbrands.Text       = Spot.specification;
                txtfishId.Text       = Spot.code;
            }
            else if (rabZY.Checked == true)
            {
                FormNewPriWarehouse form = new FormNewPriWarehouse();
                if (form.ShowDialog() != DialogResult.OK)
                {
                    return;
                }
                FishEntity.ProductQuoteVo SelfSale = form.getModel;
                if (SelfSale == null)
                {
                    return;
                }
                txtcountry.Text      = SelfSale.nature;
                txtsupplier.Text     = SelfSale.supplier;
                txtsupplierUser.Text = SelfSale.Supplieruser;
                danjia.Text          = SelfSale.confirmrmb.ToString();
                txtbrands.Text       = SelfSale.specification;
                txtfishId.Text       = SelfSale.code;
            }
        }