Exemplo n.º 1
0
    private void DataPlay()
    {
        if (this.Request.QueryString["op"] != null)
        {
            this.txtop.Value = this.Request.QueryString["op"].ToString();           //新增还是修改
        }

        if (this.Request.QueryString["id"] != null)
        {
            this.txtid.Value = this.Request.QueryString["id"].ToString();     //文档ID
        }
        TPortalClass.JpGoods JpGoods = new TPortalClass.JpGoods();

        //旧文档
        if (this.txtop.Value == "modify")
        {
            DataTable dt = JpGoods.Getdocbyid(int.Parse(this.txtid.Value));
            if (dt.Rows.Count > 0)
            {
                this.txtDocid.Value = dt.Rows[0]["docid"].ToString();
                this.txtid.Value = dt.Rows[0]["id"].ToString();
                this.txtcid.Value = dt.Rows[0]["hy_cid"].ToString();
                ddlcolname.Value = dt.Rows[0]["hy_cid"].ToString();
                this.txthy_goodsname.Text = dt.Rows[0]["hy_goodsname"].ToString();
                this.txthy_goodstitle.Text = dt.Rows[0]["hy_goodstitle"].ToString();
                this.txthy_linkurl.Text = dt.Rows[0]["hy_linkurl"].ToString();
                this.txthy_content.Text = dt.Rows[0]["hy_content"].ToString();
                this.txthy_goodsprice.Text = dt.Rows[0]["hy_goodsprice"].ToString();
                this.txthy_sort.Text = dt.Rows[0]["hy_sort"].ToString();
            }
        }
        else
        {
            this.txthy_sort.Text = (JpGoods.GetMaxSort()).ToString();
        }
    }