Beispiel #1
0
        public void InitControl()
        {
            comGrid = gen.GenerateGrid("CList_CompleteCheck", this.pnlDoc, new Point(0, 0));

            DataTable dt = new BLL.Bll_Comm().ListViewData(string.Format("select * from VRpt_CompCheck where 1>2 "));
            comGrid.DataSource = dt;

            prodGrid = gen.GenerateGrid("CList_ProdCheck", this.panel1, new Point(0, 0));

            DataTable dt1 = new BLL.Bll_Comm().ListViewData(string.Format("select * from VRpt_ProdCheck where 1>2 "));
            prodGrid.DataSource = dt1;
        }
Beispiel #2
0
 public void InitControl()
 {
     //List<Prod_Pool> list = new List<Prod_Pool>();
     //comGrid = gen.GenerateGrid("CList_PPool", this.pnlGrid, new Point(0, 0));
     //comGrid.DataSource = list;
     //comGrid.DisplayLayout.Override.AllowAddNew = AllowAddNew.No;
     //List<Prod_Pool> list1 = new List<Prod_Pool>();
     //this.allGrid = gen.GenerateGrid("CList_POut", this.pnlAll, new Point(0, 0));
     //allGrid.DataSource = list1;
     comGrid = gen.GenerateGrid("CList_QueryOther", this.pnlDoc, new Point(0, 0));
     comGrid.DoubleClickRow += new DoubleClickRowEventHandler(comGrid_DoubleClickRow);
     DataTable dt = new BLL.Bll_Comm().ListViewData(string.Format("select * from VRpt_OtherQuery where 1>2 "));
     comGrid.DataSource = dt;
 }
Beispiel #3
0
        void top_tool_bar_SearchClicked(object sender, EventArgs e)
        {
            string val1 = this.top_tool_bar.GetSearchValue("bDate", "Date");
            string val2 = this.top_tool_bar.GetSearchValue("eDate", "Date");
            string val3 = this.top_tool_bar.GetSearchValue("Key", "Text");
            var obj = comboStat.SelectedValue;
            string where = string.Empty;
            if (obj == null)
            {
                where = string.Format(" AND  CreateTime between '{1}' AND '{2}' AND ( PRDC_ProdCode like '%{0}%' OR PRDC_CompNo like '%{0}%' OR PRDC_CompCode like '%{0}%') ", val3,val1,val2);

                DataTable dt = new DataTable();
                dt = new BLL.Bll_Comm().ListViewData(string.Format("select * from VRpt_OtherQuery where 1=1 {0}", where));
                comGrid.DataSource = dt;
            }
            else
            {
                string type = obj.ToString();
                switch (type)
                {
                    case "SearchComp":
                        where = string.Format("AND  CreateTime between '{1}' AND '{2}' AND PRDC_CompCode like '%{0}%'", val3,val1,val2);
                        break;
                    case "SearchPComp":
                        where = string.Format("AND  CreateTime between '{1}' AND '{2}' AND PRDC_CompNo like '%{0}%'", val3,val1,val2);
                        break;
                    case "SearchProdCode":
                        where = string.Format("AND  CreateTime between '{1}' AND '{2}' AND PRDC_ProdCode like '%{0}%' ", val3,val1,val2);
                        break;
                    default:
                        where = string.Format("AND  CreateTime between '{1}' AND '{2}' AND ( PRDC_ProdCode like '%{0}%' OR PRDC_CompNo like '%{0}%' OR PRDC_CompCode like '%{0}%') ", val3,val1,val2);
                        break;
                }

                DataTable dt = new DataTable();
                dt = new BLL.Bll_Comm().ListViewData(string.Format("select * from VRpt_OtherQuery where 1=1 {0}", where));

                comGrid.DataSource = dt;
            }
        }
Beispiel #4
0
 void top_tool_bar_SearchClicked(object sender, EventArgs e)
 {
     string val1 = this.top_tool_bar.GetSearchValue("bDate", "Date");
     string val2 = this.top_tool_bar.GetSearchValue("eDate", "Date");
     string val3 = this.top_tool_bar.GetSearchValue("Key", "Text");
     string where = string.Format(" AND CreateTime between '{1}' and '{2}' and (PRDC_ProdCode like '%{0}%' OR PRDC_CompCode like '%{0}%' OR PRDC_CompName like '%{0}%' OR PRDC_CompNo like '%{0}%') ", val3,val1,val2);
     DataTable dt = new BLL.Bll_Comm().ListViewData(string.Format("select * from VRpt_CompCheck where 1=1 {0} ",where));
     comGrid.DataSource = dt;
 }