更新时间:2021-09-28 14:08:32
1: /// <summary>
2: /// 表接口 IProductInList(产品入库)。
3: /// </summary>
4: public partial interface IProductInList
5: {
6: /// <summary>
7: /// 根据入库票据号查询入库明细。
8: /// </summary>
9: /// <param name="billCode">入库票据号。</param>
10: void GetProductInList(string billCode);
11:
12: /// <summary>
13: /// 根据入库时间及拼音简码查询入库明细。
14: /// </summary>
15: /// <param name="startTime">开始时间。</param>
16: /// <param name="endTime">结束时间。</param>
17: /// <param name="pyCode">拼音简码。</param>
18: void GetProductInList(DateTime startTime,DateTime endTime,string pyCode);
19: }
1: public void GetProductInList(DateTime startTime, DateTime endTime, string pyCode)
2: {
3: Condition condition = this.CreateCondition();
4:
5: if (!startTime.Equals(endTime))
6: {
7: List<DateTime> times = new List<DateTime>(2);
8: times.Add(startTime);
9: times.Add(endTime);
10:
11: condition.AddElement("InTime", times, ElementType.BetWeen);
12: }
13:
14: if (pyCode.Length > 0)
15: condition.AddElement("SqlText", "CODE in (select CODE from dbo.PRODUCT where PYCODE like '" + pyCode + "%')", ElementType.SqlCondition);
16:
17: this.Query(condition);
18: }
1: private void btnSearch_Click(object sender, EventArgs e)
2: {
3: //加载报表
4:
5: if (this.reportViewer.SourceRdl==null)
6: {
7: System.IO.TextReader textReader = null;
8: try
9: {
10: string fileName = Path.Combine(Application.StartupPath, "Reports\\商品入库查询报表.rdl");
11: textReader = new System.IO.StreamReader(fileName);
12: this.reportViewer.SourceRdl = textReader.ReadToEnd();
13: }
14: finally
15: {
16: if (textReader != null)
17: textReader.Close();
18: }
19: }
20:
21: //处理数据
22: IProductInList table = DALHelper.DALManager.CreateProductInList();
23: table.GetProductInList(this.dtpStartTime.Value,this.dtpEndTime.Value, this.tbSearch.Text);
24: this.reportViewer.DataObject = table;
25: }
随笔 - 142 文章 - 0 评论 - 2294 一步一步教你使用AgileEAS.NET基础类库进行应用开发-WinForm应用篇-演示使用报表构建UI-入库业务查询模块
一步一步教你使用AgileEAS.NET基础类库进行应用开发-WinForm应用篇-演示ORM对象与DataGridView的绑定技术-商品字典的另一个实现
一步一步教你使用AgileEAS.NET基础类库进行应用开发-WinForm应用篇-复杂业务的实现(商品入库)-附案例操作视频
一步一步教你使用AgileEAS.NET基础类库进行应用开发-WinForm应用篇-演示ORM对象与DataGridView的绑定技术-商品字典的另一个实现
一步一步教你使用AgileEAS.NET基础类库进行应用开发-WinForm应用篇-演示使用报表构建UI-入库业务查询模块