Пример #1
0
        public FormPurchaseAppFishInfo(string purNum)
        {
            InitializeComponent( ); ReadColumnConfig(dataGridView1, "Set_132");

            _bll    = new FishBll.Bll.PurchaseAppFishInfoBll( );
            model   = new FishEntity.PurchaseAppFishInfoEntity( );
            getname = purNum;
            if (!string.IsNullOrEmpty(purNum))
            {
                strWhere += " AND code='" + purNum + "'";
            }
            else
            {
                strWhere = "1=1";
            }

            Query( );
        }
Пример #2
0
        public override void Save( )
        {
            if (getValue( ) == false)
            {
                return;
            }
            _bll = new FishBll.Bll.PurchaseAppFishInfoBll();
            bool result = _bll.Save(model);

            if (result)
            {
                MessageBox.Show("保存成功");
                this.DialogResult = DialogResult.OK;
            }
            else
            {
                MessageBox.Show("保存失败");
            }

            base.Save( );
        }
Пример #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();
            }
        }