private void BtQuery_Click(object sender, EventArgs e) { if (this.dateStart.Text == string.Empty) { XtraMessageBox.Show("请输入开始时间", "系统提示!"); return; } if (this.dateEnd.Text == string.Empty) { XtraMessageBox.Show("请输入结束时间", "系统提示!"); return; } NameObjectList pstrans = new NameObjectList(); ParamManager.MergeParam(pstrans, this.paramwin); pstrans["StartDate"] = this.dateStart.EditValue.ToString(); pstrans["EndDate"] = this.dateEnd.EditValue.ToString(); pstrans["Dept"] = this.lookDept.EditValue; pstrans["EmployNO"] = (object)this.txtEmployName.Text; //查询数据 QueryDataRes query = new QueryDataRes(this.unitItem.DataSrcFile); BindManager bg = new BindManager(this); ds = bg.BuildDataset(this.unitItem, pstrans); Granity.granityMgr.Report.viwReports View = new Granity.granityMgr.Report.viwReports(); View.ReportName = "考勤明细查询"; View.ds = ds; View.StartTime = this.dateStart.Text.Trim(); View.EndTime = this.dateEnd.Text.Trim(); View.Activate(); View.Dock = DockStyle.Fill; this.groReport.Controls.Clear(); this.groReport.Controls.Add(View); }
/// <summary> /// 根据相应条件查询记录 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void BtQuery_Click(object sender, EventArgs e) { if (this.dateStart.Text == string.Empty) { XtraMessageBox.Show("请输入开始时间", "系统提示!"); return; } if (this.dateEnd.Text == string.Empty) { XtraMessageBox.Show("请输入结束时间", "系统提示!"); return; } NameObjectList pstrans = new NameObjectList(); ParamManager.MergeParam(pstrans, this.paramwin); pstrans["StartDate"] = this.dateStart.EditValue.ToString(); pstrans["EndDate"] = this.dateEnd.EditValue.ToString(); pstrans["CommMac"] = this.lookCommMac.Text != null ? this.lookCommMac.Text.ToString() : null; //查询数据 QueryDataRes query = new QueryDataRes(this.unitItem.DataSrcFile); BindManager bg = new BindManager(this); ds = bg.BuildDataset(this.unitItem, pstrans); Report.viwReports View = new Granity.granityMgr.Report.viwReports(); View.ReportName = "消费机收入汇总"; View.ds = ds; View.StartTime = this.dateStart.Text.Trim(); View.EndTime = this.dateEnd.Text.Trim(); View.Activate(); View.Dock = DockStyle.Fill; this.groReport.Controls.Clear(); this.groReport.Controls.Add(View); }
/// <summary> /// 年月日统计 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void BtQuery_Click(object sender, EventArgs e) { if (this.dateStart.Text == string.Empty) { XtraMessageBox.Show("请输入开始时间", "系统提示!", MessageBoxButtons.OK, MessageBoxIcon.Warning); return; } if (this.cboDoorName.Text == string.Empty) { XtraMessageBox.Show("请选择操作员", "系统提示!", MessageBoxButtons.OK, MessageBoxIcon.Warning); return; } if (this.lookDate.EditValue == null) { XtraMessageBox.Show("请选择表报", "系统提示!", MessageBoxButtons.OK, MessageBoxIcon.Warning); return; } NameObjectList pstrans = new NameObjectList(); ParamManager.MergeParam(pstrans, this.paramwin); pstrans["dt"] = this.dateStart.EditValue.ToString(); pstrans["type"] = this.lookDate.EditValue.ToString(); pstrans["UserName"] = Convert.ToString(this.cboDoorName.Text); //查询数据 QueryDataRes query = new QueryDataRes(this.unitItem.DataSrcFile); BindManager bg = new BindManager(this); ds = bg.BuildDataset(this.unitItem, pstrans); //if (ds.Tables["收费员收费统计"].Rows.Count < 1 || ds.Tables["收费员收费统计"] == null) //{ // XtraMessageBox.Show("没有数据!", "系统提示!", MessageBoxButtons.OK, MessageBoxIcon.Warning); // this.groReport.Controls.Clear(); // return; //} Granity.granityMgr.Report.viwReports View = new Granity.granityMgr.Report.viwReports(); View.ReportName = "收费员收费统计"; View.ds = ds; View.StartTime = this.dateStart.Text.Trim(); View.EndTime = ""; View.Activate(); View.Dock = DockStyle.Fill; this.groReport.Controls.Clear(); this.groReport.Controls.Add(View); }
private void BtQuery_Click_1(object sender, EventArgs e) { if (this.dateStart.Text == string.Empty) { XtraMessageBox.Show("�����뿪ʼʱ��", "ϵͳ��ʾ��", MessageBoxButtons.OK, MessageBoxIcon.Warning); return; } if (this.lookDate.EditValue == null) { XtraMessageBox.Show("��ѡ����", "ϵͳ��ʾ��", MessageBoxButtons.OK, MessageBoxIcon.Warning); return; } NameObjectList pstrans = new NameObjectList(); ParamManager.MergeParam(pstrans, this.paramwin); pstrans["dt"] = this.dateStart.EditValue.ToString(); pstrans["type"] = this.lookDate.EditValue.ToString(); //��ѯ���� QueryDataRes query = new QueryDataRes(this.unitItem.DataSrcFile); BindManager bg = new BindManager(this); ds = bg.BuildDataset(this.unitItem, pstrans); //if (ds.Tables["����������ͳ��"].Rows.Count < 1 || ds.Tables["����������ͳ��"] == null) //{ // XtraMessageBox.Show("û�����ݣ�", "ϵͳ��ʾ��", MessageBoxButtons.OK, MessageBoxIcon.Warning); // this.groReport.Controls.Clear(); // return; //} Granity.granityMgr.Report.viwReports View = new Granity.granityMgr.Report.viwReports(); View.ReportName = "����������ͳ��"; View.ds = ds; View.StartTime = this.dateStart.Text.Trim(); View.EndTime = ""; View.Activate(); View.Dock = DockStyle.Fill; this.groReport.Controls.Clear(); this.groReport.Controls.Add(View); }