Exemplo n.º 1
0
        protected void btnTokenQuery_Click(object sender, EventArgs e)
        {
            paras                 = new TokenParameters();
            paras.eventNo         = txtEventNo.Text.Trim();
            paras.sceneType       = ddlSceneType.SelectedValue;
            paras.timeStartA      = txtAServiceTime.Text.Trim() + " 00:00:00";
            paras.timeStartB      = txtBServiceTime.Text.Trim() + " 23:59:59";
            paras.serviceProvider = ddlServiceProvider.SelectedValue;

            if (txtAServiceTime.Text.Trim() == "")
            {
                paras.timeStartA = "";
            }
            if (txtBServiceTime.Text.Trim() == "")
            {
                paras.timeStartB = "";
            }

            DataSet ds        = DAL.TokenDAL.GetTokenTotal(paras.eventNo, paras.sceneType, paras.timeStartA, paras.timeStartB, paras.serviceProvider);
            int     rowsCount = ds.Tables[0].Rows.Count;

            if (rowsCount > pageSize)
            {
                totalPage = (int)Math.Ceiling((double)rowsCount / (double)pageSize);
            }
            else
            {
                totalPage = 1;
            }

            GVDataBind(1);
        }
Exemplo n.º 2
0
        protected void btnTokenQuery_Click(object sender, EventArgs e)
        {
            paras = new TokenParameters();
            paras.eventNo = txtEventNo.Text.Trim();
            paras.sceneType = ddlSceneType.SelectedValue;
            paras.timeStartA = txtAServiceTime.Text.Trim() + " 00:00:00";
            paras.timeStartB = txtBServiceTime.Text.Trim() + " 23:59:59";
            paras.serviceProvider = ddlServiceProvider.SelectedValue;

            if (txtAServiceTime.Text.Trim() == "")
            {
                paras.timeStartA = "";
            }
            if (txtBServiceTime.Text.Trim() == "")
            {
                paras.timeStartB = "";
            }

            DataSet ds = DAL.TokenDAL.GetTokenTotal(paras.eventNo, paras.sceneType, paras.timeStartA, paras.timeStartB, paras.serviceProvider);
            int rowsCount = ds.Tables[0].Rows.Count;
            if (rowsCount > pageSize)
            {
                totalPage = (int)Math.Ceiling((double)rowsCount / (double)pageSize);
            }
            else
            {
                totalPage = 1;
            }

            GVDataBind(1);
        }