Пример #1
0
    /// <summary>
    /// 初始化
    /// </summary>
    protected void chushi()
    {
        DataSet dstid = bll2.GetAllList();

        ddltid.DataSource     = dstid;
        ddltid.DataTextField  = "tname";
        ddltid.DataValueField = "tid";
        ddltid.DataBind();



        //根据编号得到相应的记录
        DataSet ds = bll.GetList("  pid=" + Request.QueryString["id"]);

        if (ds.Tables[0].Rows.Count > 0)
        {
            txt_title.Text       = ds.Tables[0].Rows[0]["title"].ToString();
            ddltid.SelectedValue = ds.Tables[0].Rows[0]["tid"].ToString();
            Labelbgpic.Text      = ds.Tables[0].Rows[0]["bgpic"].ToString();
            if (Labelbgpic.Text != "" && Labelbgpic.Text.Length > 3)
            {
                Imagepic.ImageUrl = "../../uploads/" + Labelbgpic.Text;
                Imagepic.Visible  = true;
            }
            txt_mark.Text    = ds.Tables[0].Rows[0]["mark"].ToString();
            Textarea1.Value  = ds.Tables[0].Rows[0]["memo"].ToString();
            txt_remarks.Text = ds.Tables[0].Rows[0]["remarks"].ToString();
        }
    }
Пример #2
0
 //初始化
 private void ShowInfo()
 {
     if (Request.QueryString["id"] != null)
     {
         SP.BLL.plans bll = new SP.BLL.plans();
         //根据编号得到相应的记录
         DataSet ds = bll.GetList("  pid=" + Request.QueryString["id"]);
         if (ds.Tables[0].Rows.Count > 0)
         {
             DataRow sdr = ds.Tables[0].Rows[0];
             lbltitle.Text = sdr["title"].ToString();
             lblmemo.Text  = sdr["memo"].ToString();
             lblatime.Text = sdr["atime"].ToString();
         }
     }
 }
Пример #3
0
    /// <summary>
    /// 绑定
    /// </summary>
    private void bind()
    {
        string where = "  1=1 ";

        if (txt_title.Text != "")
        {
            where += " and title like '%" + txt_title.Text + "%' ";
        }

        if (ddltid.SelectedValue != "")
        {
            where += " and a.tid=" + ddltid.SelectedValue + "";
        }



        GridView1.DataSource = bll.GetList(where + " order by pid desc");
        GridView1.DataBind();
    }
Пример #4
0
 //初始化
 private void ShowInfo()
 {
     if (Request.QueryString["id"] != null)
     {
         SP.BLL.plans bll = new SP.BLL.plans();
         //根据编号得到相应的记录
         DataSet        ds    = bll.GetList("  pid=" + Request.QueryString["id"]);
         SP.Model.plans model = bll.GetModel(int.Parse(Request.QueryString["id"]));
         if (ds.Tables[0].Rows.Count > 0)
         {
             DataRow sdr = ds.Tables[0].Rows[0];
             lblpid.Text       = sdr["pid"].ToString();
             lbltitle.Text     = sdr["title"].ToString();
             lbltid.Text       = sdr["tname"].ToString();
             imgbgpic.ImageUrl = "../../uploads/" + model.bgpic;
             lblmark.Text      = sdr["mark"].ToString();
             lblmemo.Text      = sdr["memo"].ToString();
             lblremarks.Text   = sdr["remarks"].ToString();
             lblatime.Text     = sdr["atime"].ToString();
         }
     }
 }