View/qpc/StatisticsItem.cs

(开头部分) 3KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace Maticsoft.View.qpc
{
    public partial class StatisticsItem : DevComponents.DotNetBar.Office2007Form
    {
        public StatisticsItem()
        {
            InitializeComponent();
        }

        private void StatisticsItem_Load(object sender, EventArgs e)
        {
            BindData();
            pagerControl1.OnPageChanged += new EventHandler(pagerControl1_OnPageChanged);
        }
        BLL.shipmentOrderItem shipmentOrderItem = new BLL.shipmentOrderItem();
        string where = " 1=1 ";
        string whereTotal = " 1=1 ";
        private void BindData()
        {
            int count = shipmentOrderItem.GetRecordCountDanXiangTongji(whereTotal);
            DataSet ds = shipmentOrderItem.GetListDanXiangTongji(where, "id", pagerControl1.PageSize, pagerControl1.PageIndex,count);
            pagerControl1.DrawControl(count);
            dataGridView1.DataSource = ds.Tables[0];
            double totalmoney = 0;
            if (ds.Tables[0].Rows.Count>0)
            {
                foreach (DataRow item in ds.Tables[0].Rows)
                {
                    totalmoney += double.Parse(item["totalmoney"].ToString());
                }
            }
            label8.Text = "当前页总金额:" + totalmoney;
            label7.Text = "消费总金额:" + shipmentOrderItem.GetRecordCountDanXiangTongjiTotal() ;

        }

        void pagerControl1_OnPageChanged(object sender, EventArgs e)
        {
            BindData();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            where = " 1=1";
            if (txtUserName.Text!="")
            {
                where += " and shipmentOrder.userName like '%" + txtUserName.Text + "%'";
                whereTotal += " and shipmentOrder.userName like '%" + txtUserName.Text + "%'";
            }
            if (txtPhone.Text!="")
            {
后面还有 38 行代码,购买后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明

AI 解读

登录后可用,每次 10 积分,解读结果公开显示在下面。

还没有人解读过这个文件。