예제 #1
0
        //取得所有打印记录
        public static WH.WhDataTable GetPrint(string cond)
        {
            WH.WhDataTable data   = new WH.WhDataTable();
            string         strsql = SQL_SELECT_PRINTBYCOCND + cond;

            data.Load(AccessHelper.ExecuteReader(strsql));
            return(data);
        }
예제 #2
0
        //查询
        private void button1_Click_1(object sender, EventArgs e)
        {
            string cond = "";

            if (!string.IsNullOrEmpty(txtNo.Text.Trim()))
            {
                cond += " and WH_No like '%" + txtNo.Text.Trim() + "%'";
            }

            if (!string.IsNullOrEmpty(txtName.Text.Trim()))
            {
                cond += " and WH_Name like '%" + txtName.Text.Trim() + "%'";
            }

            if (!string.IsNullOrEmpty(txtMan.Text.Trim()))
            {
                cond += " and WH_Man like '%" + txtMan.Text.Trim() + "%'";
            }
            WH.WhDataTable table = PrintDal.GetPrint(cond);
            this.dataGridView1.DataSource = table;
        }