コード例 #1
0
        /// <summary>
        /// 显示全部
        /// </summary>
        public void ShowList()
        {
            BLL.YYJEHZ bYYJEHZ = new Dianda.BLL.YYJEHZ();
            DataTable  dt      = bYYJEHZ.GetYYJEHZ();

            DDList_RQ.DataSource     = dt;
            DDList_RQ.DataTextField  = "GetDateTime";
            DDList_RQ.DataValueField = "GetDateTime";
            DDList_RQ.DataBind();
            DDList_RQ.Items.Remove(DDList_RQ.Items.FindByText("合计"));
            DDList_RQ.Items.Insert(0, new ListItem("全部", ""));
            //设置合计金额标题日期
            if (!string.IsNullOrEmpty(DDList_RQ.SelectedValue.ToString()))
            {
                Label_Time.Text = DDList_RQ.SelectedValue.ToString();
            }
            else
            {
                Label_Time.Text = "全部";
            }
            if (Request.Params["status"] != null && !String.IsNullOrEmpty(Request["date"]))
            {
                this.DDList_RQ.SelectedValue = Request["date"];
            }
        }
コード例 #2
0
        /// <summary>
        /// 显示全部
        /// </summary>
        public void ShowList()
        {
            DataTable dt = bYYJEHZ.GetYYJEHZ();

            GridView1.DataSource = dt;
            GridView1.DataBind();

            DDList_RQ.DataSource     = dt;
            DDList_RQ.DataTextField  = "GetDateTime";
            DDList_RQ.DataValueField = "GetDateTime";
            DDList_RQ.DataBind();

            DDList_RQ.Items.Remove(DDList_RQ.Items.FindByText("合计"));
            DDList_RQ.Items.Insert(0, new ListItem("全部", ""));
        }