示例#1
0
        private void btnQuery_Click(object sender, EventArgs e)
        {
            string strWhere = "1=1";

            if (!string.IsNullOrEmpty(txtPRD001.Text))
            {
                strWhere += " AND PRD001='" + txtPRD001.Text + "'";
            }
            if (!string.IsNullOrEmpty(txtPRE004.Text))
            {
                strWhere += " AND PRE004='" + txtPRE004.Text + "'";
            }

            tableView = _bll.getTableColumn(strWhere);
            gridControl1.DataSource = tableView;
        }
示例#2
0
        public FormProductPlanQuery( )
        {
            InitializeComponent( );

            _bll = new LineProductMesBll.Bll.ProductPlanBll( );

            GridViewMoHuSelect.SetFilter(new DevExpress.XtraGrid.Views.Grid.GridView [] { gridView1, View1, View2 });
            GrivColumnStyle.setColumnStyle(new DevExpress.XtraGrid.Views.Grid.GridView [] { gridView1, View1, View2 });
            FieldInfo fi = typeof(XPaint).GetField("graphics", BindingFlags.Static | BindingFlags.NonPublic);

            fi.SetValue(null, new DrawXPaint( ));

            tableView = _bll.getTableColumn("1=1");
            txtPRD001.Properties.DataSource    = tableView.DefaultView.ToTable(true, "PRD001");
            txtPRD001.Properties.DisplayMember = "PRD001";
            txtPRD001.Properties.ValueMember   = "PRD001";

            txtPRE004.Properties.DataSource    = tableView.DefaultView.ToTable(true, "PRE004");
            txtPRE004.Properties.DisplayMember = "PRE004";
            txtPRE004.Properties.ValueMember   = "PRE004";
        }