eco igame 2007-24-02:31 搞定前一問題。

DropDownList1

 

dropdwmnlist控件的ExternalId取法

然後在RHROOT找到指定數據

procedure Tarticle_add.DropDownList1_SelectedIndexChanged(sender: System.Object;
  e: System.EventArgs);
var
  Id: string;
begin
  Id :=DropDownList1.SelectedValue;
  label2.Text:=id;
  if Assigned(Id) and (Id <> '') then
    rhRoot.SetElement(ObjectForId(Id));

    DataBind;
end;

//保存數據

procedure Tarticle_add.Button1_Click(sender: System.Object; e: System.EventArgs);
var art:article;
begin
  art:=article.Create(fEcoSpace);
art.title:=TextBox_title.Text;
art.title_Logo:=TextBox_Logo.Text;
art.istj:=CheckBox1.Checked;
art.txt:=Request.Form['FCKeditor1'] ;
art.dtt:=DateTime.Now;
art.Jianjie:=Request.Form['FCKeditor2'];

//這句是關鍵

art.artsort:= rhroot.element.asobject as  artsort;

fEcoSpace.UpdateDatabase;

end;


FLEX_riaedu.com 全國最大,資料最全的Ria富媒體 學習交流社區 Riaedu.com

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章