Exemple #1
0
        /// <summary>
        /// 绑定Grid
        /// </summary>
        public override void BindGrid()
        {
            ItemGBRule rule = new ItemGBRule();

            gridView1.GridControl.DataSource = rule.RShow(HTDataConditionStr, ProcessGrid.GetQueryField(gridView1).Replace("SelectFlag", "0 SelectFlag"));
            gridView1.GridControl.Show();
        }
Exemple #2
0
        /// <summary>
        /// 绑定挂板
        /// </summary>
        private void BindGrid()
        {
            ItemGBRule rule = new ItemGBRule();
            DataTable  dt   = rule.RShow(" AND MainID=" + HTDataID + " ORDER BY Seq", ProcessGrid.GetQueryField(gridView1));

            gridView1.GridControl.DataSource = dt;
            gridView1.GridControl.Show();
        }
        /// <summary>
        /// 绑定卡片
        /// </summary>
        void BindGridCard()
        {
            ItemGBRule rule = new ItemGBRule();
            DataTable  dt   = rule.RShow(HTDataConditionStr, ProcessGrid.GetQueryField(gridView1).Replace("SelectFlag", "0 SelectFlag").Replace("VendorName", "'' VendorName"));

            cardView1.GridControl.DataSource = dt;
            cardView1.GridControl.Show();
        }
Exemple #4
0
        /// <summary>
        /// 绑定Grid
        /// </summary>
        public override void BindGrid()
        {
            ItemGBRule rule = new ItemGBRule();
            DataTable  dt   = rule.RShow(HTDataConditionStr, ProcessGrid.GetQueryField(gridView1).Replace("SelectFlag", "0 SelectFlag").Replace("VendorName", "'' VendorName"));

            if (chkVendor.Checked)
            {
                SetGridView(dt);
            }
            gridView1.GridControl.DataSource = dt;
            gridView1.GridControl.Show();
        }
        private void btnScanPrint_Click(object sender, EventArgs e)
        {
            try
            {
                string tempstr = " AND ItemCode IN (" + txtShow.Text.Trim() + ")";

                ItemGBRule rule = new ItemGBRule();
                DataTable  dt   = rule.RShow(tempstr, ProcessGrid.GetQueryField(gridView1).Replace("SelectFlag", "1 SelectFlag").Replace("VendorName", "'' VendorName"));

                gridView1.GridControl.DataSource = dt;
                gridView1.GridControl.Show();

                DataTable dt2 = rule.RShow(tempstr, ProcessGrid.GetQueryField(gridView1).Replace("SelectFlag", "1 SelectFlag").Replace("VendorName", "'' VendorName"));

                cardView1.GridControl.DataSource = dt2;
                cardView1.GridControl.Show();
            }
            catch (Exception E)
            {
                this.ShowMessage(E.Message);
            }
        }
Exemple #6
0
 /// <summary>
 /// 快速查询(回车即检索)
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void txtName_KeyDown(object sender, KeyEventArgs e)
 {
     try
     {
         if (e.KeyCode == Keys.Enter)
         {
             if (chkSM.Checked)
             {
                 if (txtGBCode.Text.Trim() == "")
                 {
                     this.ShowMessage("请输入挂板编码!");
                     return;
                 }
                 string GBCodeStr = txtGBCodeStr.Text.Trim();
                 if (GBCodeStr != "")
                 {
                     GBCodeStr += ",";
                 }
                 GBCodeStr        += SysString.ToDBString(txtGBCode.Text.Trim());
                 txtGBCodeStr.Text = GBCodeStr;
                 ItemGBRule rule = new ItemGBRule();
                 DataTable  dt   = rule.RShow(" AND GBCode IN (" + txtGBCodeStr.Text.Trim() + ")", ProcessGrid.GetQueryField(gridView1).Replace("SelectFlag", "1 SelectFlag").Replace("VendorName", "'' VendorName"));
                 if (chkVendor.Checked)
                 {
                     SetGridView(dt);
                 }
                 gridView1.GridControl.DataSource = dt;
                 gridView1.GridControl.Show();
                 txtGBCode.Text = "";
                 txtGBCode.Focus();
             }
             else
             {
                 GetCondtion();
                 BindGrid();
             }
         }
     }
     catch (Exception E)
     {
         this.ShowMessage(E.Message);
     }
 }