コード例 #1
0
        private void loaddata()
        {
            int detail_id = Convert.ToInt16(Request.QueryString["detail_id"]);

            Maticsoft.BLL.account_view   acc_v_bll = new BLL.account_view();
            Maticsoft.Model.account_view acc_v_mod = new Model.account_view();
            acc_v_mod = acc_v_bll.GetModel(detail_id);
            txtxiangmu_mingcheng.Text = txthuikuan_neirong.Text = acc_v_mod.peixunban.Trim() + acc_v_mod.wuzi.Trim();
            txtbenci_jine.Text        = txtxiangmu_zongkuan.Text = acc_v_mod.xiaoji.ToString().Trim();
            Maticsoft.BLL.supplier sup_bll = new BLL.supplier();
            DropDownList1.DataSource     = sup_bll.GetList("");
            DropDownList1.DataTextField  = "name";
            DropDownList1.DataValueField = "id";
            DropDownList1.DataBind();
        }
コード例 #2
0
        protected void Button1_Click(object sender, EventArgs e)
        {
            StringBuilder str = new StringBuilder();

            if (start_time.Text != "")
            {
                str.Append("time> '" + start_time.Text.Trim() + "' and ");
            }
            if (end_time.Text != "")
            {
                str.Append("time< '" + end_time.Text.Trim() + "' and ");
            }
            if (qishu.SelectedValue != "999")
            {
                str.Append("peixunban_id=" + qishu.SelectedValue + " and ");
            }
            if (lururen.SelectedValue != "—全部显示—")
            {
                str.Append("lururen='" + lururen.SelectedValue.Trim() + "' and ");
            }
            if (str.ToString() != "")
            {
                str.Remove(str.Length - 4, 4);
            }
            Maticsoft.BLL.account_view acc_vie_bll = new BLL.account_view();

            GridView1.DataSource = acc_vie_bll.GetList(str.ToString());
            GridView1.DataBind();
            //if (CheckBox1.Checked == true)
            //{
            //    GridView1.Columns[0].Visible = false;
            //    GridView1.Columns[5].Visible = false;
            //    GridView1.Columns[6].Visible = false;
            //    GridView1.Columns[7].Visible = false;
            //}
        }
コード例 #3
0
        private void loaddata()
        {
            Maticsoft.BLL.account_view acc_bll = new BLL.account_view();
            GridView1.DataSource = acc_bll.GetList(100, "", "detail_id");
            GridView1.DataBind();

            Maticsoft.BLL.peixunban1 bll = new Maticsoft.BLL.peixunban1();
            DataSet       ds             = new DataSet();
            StringBuilder strWhere       = new StringBuilder();

            strWhere.Append("[start_time] < '");
            strWhere.Append(DateTime.Today.AddDays(30).Date.ToShortDateString());
            strWhere.Append("' and [end_time] > '");
            strWhere.Append(DateTime.Today.AddDays(-30).Date.ToShortDateString());
            strWhere.Append("'");
            ds = bll.GetList(strWhere.ToString());
            DataRow newrow = ds.Tables[0].NewRow();

            newrow["id"]   = "999";
            newrow["name"] = "—全部显示—";
            ds.Tables[0].Rows.Add(newrow);
            qishu.DataSource     = ds;
            qishu.DataTextField  = "name";
            qishu.DataValueField = "id";
            qishu.DataBind();
            Maticsoft.BLL.account account_bll = new BLL.account();
            DataSet ds2     = account_bll.lururen("");
            DataRow newrow2 = ds2.Tables[0].NewRow();

            newrow2["lururen"] = "—全部显示—";
            ds2.Tables[0].Rows.Add(newrow2);
            lururen.DataSource     = ds2;
            lururen.DataTextField  = "lururen";
            lururen.DataValueField = "lururen";
            lururen.DataBind();
        }