示例#1
0
        public override int Query()
        {
            if (_queryForm == null)
            {
                _queryForm = new UIForms.FormFishCondition();
                _queryForm.StartPosition = FormStartPosition.CenterParent;
                _queryForm.ShowInTaskbar = false;
            }
            if (_queryForm.ShowDialog() != System.Windows.Forms.DialogResult.OK)
            {
                return(0);
            }

            _where = _queryForm.GetWhere();

            return(QueryByWhere(_where, _orderBy));
        }
示例#2
0
        public override int Query( )
        {
            UIForms.FormFishCondition _queryForm = new UIForms.FormFishCondition( );
            _queryForm.StartPosition = FormStartPosition.CenterParent;
            _queryForm.ShowInTaskbar = false;
            if (_queryForm.ShowDialog( ) != System.Windows.Forms.DialogResult.OK)
            {
                return(0);
            }
            string _where = _queryForm.GetWhere( );

            FishBll.Bll.PresaleRequisitionBll _bll  = new FishBll.Bll.PresaleRequisitionBll( );
            List <FishEntity.ProductEntity>   _list = _bll.getList(_where);

            dataGridView1.Rows.Clear( );
            foreach (FishEntity.ProductEntity ml in _list)
            {
                int             idx = dataGridView1.Rows.Add( );
                DataGridViewRow row = dataGridView1.Rows [idx];
                row.Cells ["code"].Value          = ml.code;
                row.Cells ["name"].Value          = ml.name;
                row.Cells ["specification"].Value = ml.specification;
                row.Cells ["brand"].Value         = ml.brand;
                row.Cells ["nature"].Value        = ml.nature;
                row.Cells["sgs_protein"].Value    = ml.sgs_protein;
                row.Cells["sgs_tvn"].Value        = ml.sgs_tvn;
                row.Cells["sgs_graypart"].Value   = ml.sgs_graypart;
                row.Cells["sgs_sandsalt"].Value   = ml.sgs_sandsalt;
                row.Cells["sgs_amine"].Value      = ml.sgs_amine;
                row.Cells["sgs_ffa"].Value        = ml.sgs_ffa;
                row.Cells["sgs_fat"].Value        = ml.sgs_fat;
                row.Cells["sgs_water"].Value      = ml.sgs_water;
                row.Cells["sgs_sand"].Value       = ml.sgs_sand;
                row.Cells["shipno"].Value         = ml.shipno;
                row.Cells["billofgoods"].Value    = ml.billofgoods;
                row.Cells["cornerno"].Value       = ml.cornerno;
                row.Cells["warehouse"].Value      = ml.warehouse;
            }


            return(base.Query( ));
        }