public override int Query( )
        {
            UIForms.PurchaseApplicationCondition form = new UIForms.PurchaseApplicationCondition(this.Text + "查询");
            if (form.ShowDialog( ) == DialogResult.OK)
            {
                strWhere = form.getStrWhere;
                _model   = _bll.getModel(strWhere);
                if (_model == null)
                {
                    MessageBox.Show("请重新查询");
                    return(0);
                }
                panel1.Enabled = true;
                setValue(_model);
                dicPic = _bll.getImages(_model.id, this.Name);
                if (dicPic != null && dicPic.Count > 0)
                {
                    _pic      = dicPic [0];
                    pic.Image = PictureOpreation.ReadPicture(_pic.picInfo);
                    pic.Tag   = 0;
                    num++;
                }
                //FishBll . Bll . PurchaseApplicationBll bll = new FishBll . Bll . PurchaseApplicationBll ( );
                //List<FishEntity . PurchaseOtherInfo> listOtherInfo = bll . getOtherInfoList ( _model . codeNum );
                //if ( listOtherInfo != null && listOtherInfo . Count > 0 )
                //    setValue ( listOtherInfo );
                //List<FishEntity . PurchaseContractFishInfo> listFishInfo = _bll . getFishInfoList ( _model . codeNum );
                //if ( listFishInfo != null && listFishInfo . Count > 0 )
                //    setValue ( listFishInfo );
            }

            return(base.Query( ));
        }
Exemple #2
0
        public override int Query()
        {
            UIForms.PurchaseApplicationCondition form = new UIForms.PurchaseApplicationCondition(this.Text + "查询");
            this.panel1.Enabled = true;
            if (form.ShowDialog() == DialogResult.OK)
            {
                _model   = new FishEntity.PurchaseApplicationEntity(); _bll = new FishBll.Bll.PurchaseApplicationBll();
                strWhere = form.getStrWhere;
                _model   = _bll.getModel(strWhere);
                if (_model == null)
                {
                    MessageBox.Show("请重新查询");
                    this.panel1.Enabled = false;
                    return(0);
                }
                setValue();
                //if (string.IsNullOrEmpty(_model.codeNum))
                //    return 0;
                //List<FishEntity.PurchaseFishInfo> listFishInfo = _bll.getFishInfoList(_model.codeNum);
                //if (listFishInfo != null && listFishInfo.Count > 0)
                //    setValueFishInfo(listFishInfo);
                //List<FishEntity . PurchaseOtherInfo> listOtherInfo = _bll . getOtherInfoList ( _model . codeNum );
                //if ( listOtherInfo != null && listOtherInfo . Count > 0 )
                //    setValueOtherInfo ( listOtherInfo );
            }

            return(base.Query());
        }
        public override int Query( )
        {
            UIForms.PurchaseApplicationCondition form = new UIForms.PurchaseApplicationCondition( );
            if (form.ShowDialog( ) == DialogResult.OK)
            {
                strWhere = form.getStrWhere;
                _model   = _bll.getModel(strWhere);
                if (_model == null)
                {
                    MessageBox.Show("请重新查询");
                    return(0);
                }
                setValue( );
            }

            return(base.Query( ));
        }