Пример #1
0
        /// <summary>
        /// 绑定Grid
        /// </summary>
        public override void BindGrid()
        {
            string sql = string.Empty;// " AND ItemTypeID=" + SysString.ToDBString((int)EnumItemType.面料);

            string itemtypestr = "0";

            for (int i = 0; i < HTItemTypeIDA.Length; i++)
            {
                itemtypestr += ",";
                itemtypestr += HTItemTypeIDA[i];
            }
            sql = " AND ItemTypeID IN(" + itemtypestr + ")";

            if (ItemClassArray != "-1" && ItemClassArray != "")
            {
                sql += " AND ItemClassID IN(" + ItemClassArray + ")";
            }
            ItemRule rule = new ItemRule();

            DataTable dt = rule.RShow(sql + HTDataConditionStr, ProcessGrid.GetQueryField(gridView1).Replace("SelectFlag", "0 SelectFlag"));

            for (int i = 0; i < dt.Rows.Count; i++)
            {
                if (list.Contains(SysConvert.ToString(dt.Rows[i]["ID"])))
                {
                    dt.Rows[i]["SelectFlag"] = 1;
                }
            }
            gridView1.GridControl.DataSource = dt;
            gridView1.GridControl.Show();
        }
Пример #2
0
        /// <summary>
        /// 绑定Grid
        /// </summary>
        public override void BindGrid()
        {
            string sql = " AND ItemTypeID=" + SysString.ToDBString((int)EnumItemType.面料);

            if (ItemClassArray != "-1" && ItemClassArray != "")
            {
                sql += " AND ItemClassID IN(" + ItemClassArray + ")";
            }
            ItemRule rule = new ItemRule();

            gridView1.GridControl.DataSource = rule.RShow(sql + HTDataConditionStr, ProcessGrid.GetQueryField(gridView1));
            gridView1.GridControl.Show();
        }
Пример #3
0
        /// <summary>
        /// 绑定Grid
        /// </summary>
        public override void BindGrid()
        {
            string sql = " AND ItemTypeID=" + SysString.ToDBString((int)EnumItemType.面料);

            if (ItemClassArray != "-1" && ItemClassArray != "")
            {
                sql += " AND ItemClassID IN(" + ItemClassArray + ")";
            }
            ItemRule  rule = new ItemRule();
            DataTable dt   = rule.RShow(sql + HTDataConditionStr + " ORDER BY ItemCode DESC", ProcessGrid.GetQueryField(gridView1).Replace(",GBPic2", ""));//GBPic2 重新单独处理获得;

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