private void btnSpot_Click(object sender, EventArgs e)
        {
            FormSpot from = new FormSpot();

            StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
            if (from.ShowDialog() != System.Windows.Forms.DialogResult.OK)
            {
                return;
            }
            if (from.fish.saletrader != null && from.fish.saletrader.ToString() != "" && from.fish.salelinkman != null && from.fish.salelinkman.ToString() != "")
            {
                txtFishmealId.Text         = from.fish.code;
                txtsupplier.Text           = from.fish.saletrader;
                txtPurchasingcontacts.Text = from.fish.salelinkman;
                txtProtein.Text            = from.fish.sgs_protein.ToString();
                txtTVN.Text                = from.fish.sgs_tvn.ToString();
                txtHistamine.Text          = from.fish.sgs_amine.ToString();
                txtFFA.Text                = from.fish.sgs_ffa.ToString();
                txtFat.Text                = from.fish.sgs_fat.ToString();
                txtMoisture.Text           = from.fish.sgs_water.ToString();
                txtSandAndSalt.Text        = from.fish.sgs_sandsalt.ToString();
                txtUnit.Text               = from.fish.domestic_sour.ToString();
                txtBillOfLadingNumber.Text = from.fish.billofgoods.ToString();
            }
            else
            {
                MessageBox.Show("往来单位或联系人不能为空!");
            }
        }
示例#2
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;
                }
            }
        }
示例#3
0
        private void txtFishid_DoubleClick(object sender, EventArgs e)
        {
            if (rabBP.Checked == false && rabXH.Checked == false && rabZY.Checked == false)
            {
                MessageBox.Show("请选择数据来源");
                return;
            }
            _bll = new FishBll.Bll.PurchaseAppFishInfoBll();
            if (rabBP.Checked == true)
            {
                FormQuote form = new FormQuote( );
                if (form.ShowDialog( ) != DialogResult.OK)
                {
                    return;
                }
                FishEntity.ProductQuoteVo Quote = form.getModel;
                if (Quote == null)
                {
                    return;
                }

                //if ( !Quote . code . Equals ( txtFishid . Text ) )
                //{
                //    MessageBox . Show ( "请选择鱼粉ID是:"+txtFishid.Text+"的内容" );
                //    return;
                //}
                txtFishid.Text         = Quote.code;
                txtspecifications.Text = Quote.specification;
                txtcountry.Text        = Quote.nature;
                txtbrand.Text          = Quote.brand;
                txtbillName.Text       = Quote.billofgoods;
                txtshipName.Text       = Quote.shipno;
                txtconProtein.Text     = Quote.quote_protein.ToString( );
                txtconTVN.Text         = Quote.quote_tvn.ToString( );
                txtconZA.Text          = Quote.quote_amine.ToString( );
                txtconFFA.Text         = Quote.quote_ffa.ToString( );
                txtconSHY.Text         = Quote.quote_sandsalt.ToString( );
                txtconHF.Text          = Quote.quote_graypart.ToString( );
                txtconZF.Text          = Quote.quote_fat.ToString( );
                txtconSF.Text          = Quote.quote_water.ToString( );
                txtconS.Text           = Quote.quote_sand.ToString( );
                txtconSJ.Text          = txtconLAS.Text = txtconDAS.Text = string.Empty;
                QueryFishid();
            }
            else if (rabXH.Checked == true)
            {
                FormSpot form = new FormSpot( );
                if (form.ShowDialog( ) != DialogResult.OK)
                {
                    return;
                }
                FishEntity.ProductQuoteVo Spot = form.getModel;
                if (Spot == null)
                {
                    return;
                }
                //if ( !Spot . code . Equals ( txtFishid . Text ) )
                //{
                //    MessageBox . Show ( "请选择鱼粉ID是:" + txtFishid . Text + "的内容" );
                //    return;
                //}
                txtFishid.Text         = Spot.code;
                txtspecifications.Text = Spot.specification;
                txtcountry.Text        = Spot.nature;
                txtbrand.Text          = Spot.brand;
                txtbillName.Text       = Spot.billofgoods;
                txtshipName.Text       = Spot.shipno;
                txtconProtein.Text     = Spot.sgs_protein.ToString( );
                txtconTVN.Text         = Spot.sgs_tvn.ToString( );
                txtconZA.Text          = Spot.sgs_amine.ToString( );
                txtconFFA.Text         = Spot.sgs_ffa.ToString( );
                txtconSHY.Text         = Spot.sgs_sandsalt.ToString( );
                txtconHF.Text          = Spot.sgs_graypart.ToString( );
                txtconZF.Text          = Spot.sgs_fat.ToString( );
                txtconSF.Text          = Spot.sgs_water.ToString( );
                txtconS.Text           = txtconSJ.Text = txtconLAS.Text = txtconDAS.Text = string.Empty;
                QueryFishid();
            }
            else if (rabZY.Checked == true)
            {
                FormSelfSale form = new FormSelfSale( );
                if (form.ShowDialog( ) != DialogResult.OK)
                {
                    return;
                }
                FishEntity.ProductQuoteVo SelfSale = form.getModel;
                if (SelfSale == null)
                {
                    return;
                }
                //if ( !SelfSale . code . Equals ( txtFishid . Text ) )
                //{
                //    MessageBox . Show ( "请选择鱼粉ID是:" + txtFishid . Text + "的内容" );
                //    return;
                //}
                txtFishid.Text         = SelfSale.code;
                txtspecifications.Text = SelfSale.specification;
                txtcountry.Text        = SelfSale.nature;
                txtbrand.Text          = SelfSale.brand;
                txtbillName.Text       = SelfSale.billofgoods;
                txtshipName.Text       = SelfSale.shipno;
                txtconProtein.Text     = SelfSale.sgs_protein.ToString( );
                txtconTVN.Text         = SelfSale.sgs_tvn.ToString( );
                txtconZA.Text          = SelfSale.sgs_amine.ToString( );
                txtconFFA.Text         = SelfSale.sgs_ffa.ToString( );
                txtconSHY.Text         = SelfSale.sgs_sandsalt.ToString( );
                txtconHF.Text          = SelfSale.sgs_graypart.ToString( );
                txtconZF.Text          = SelfSale.sgs_fat.ToString( );
                txtconSF.Text          = SelfSale.sgs_water.ToString( );
                txtconS.Text           = txtconSJ.Text = txtconLAS.Text = txtconDAS.Text = string.Empty;
                QueryFishid();
            }
        }
示例#4
0
        private void buttom_Click(object sender, EventArgs e)
        {
            UIControls.ButtonEx currentBtn = sender as UIControls.ButtonEx;
            if (currentBtn == null)
            {
                return;
            }

            currentBtn.Image = ImageUtil.ButtomLeftImageSelected;

            foreach (UILibrary.PushPanel.PushPanelItem item in pushPanel1.Items)
            {
                foreach (Control ctl in item.Controls)
                {
                    UILibrary.SkinButtom btn = ctl as UILibrary.SkinButtom;
                    if (btn == null)
                    {
                        continue;
                    }
                    if (btn.Equals(currentBtn))
                    {
                        continue;
                    }
                    btn.Image = ImageUtil.ButtonLeftImageNormal;
                }
            }


            if (currentBtn.Form == null)
            {
                return;
            }

            if (currentBtn.Form is FormFish)
            {
                FormFish form = currentBtn.Form as FormFish;
                form.ClickGBEvent += form_ClickGBEvent;
            }
            else if (currentBtn.Form is FormQuote)
            {
                FormQuote form = currentBtn.Form as FormQuote;
                form.ClickFishEvent += form_ClickFishEvent;
            }
            else if (currentBtn.Form is FormConfirm)
            {
                FormConfirm form = currentBtn.Form as FormConfirm;
                form.ClickFishEvent += form_ClickFishEvent;
            }
            else if (currentBtn.Form is FormSpot)
            {
                FormSpot form = currentBtn.Form as FormSpot;
                form.ClickFishEvent += form_ClickFishEvent;
            }
            else if (currentBtn.Form is FormSelfSale)
            {
                FormSelfSale form = currentBtn.Form as FormSelfSale;
                form.ClickFishEvent += form_ClickFishEvent;
            }
            else if (currentBtn.Form is FormSelfMake)
            {
                FormSelfMake form = currentBtn.Form as FormSelfMake;
                form.ClickFishEvent += form_ClickFishEvent;
            }
            else if (currentBtn.Form is FormRemindMessage)
            {
                FormRemindMessage form = currentBtn.Form as FormRemindMessage;
                form.ClickRemindEvent += form_ClickRemindEvent;
            }
            ///父窗口
            //currentBtn.Form.MdiParent = this;
            currentBtn.Form.Show();
            currentBtn.Form.BringToFront();
        }
示例#5
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;
            }
        }