- 在SectionEdit.aspx页面的form中填入数据,点击按钮提交。(表示层)
- 调用btnSave_Click(object sender, EventArgs e)函数
- 检查section是否已经存在,if (this._activeSection.Id == -1 || this._activeSection.PlaceholderId != oldPlaceholderId)
- SaveSection(); 保持新的section
- 检查是否已经添加过if (this._activeSection.Id > 0)(控制层)
- 如果是,更新base.CoreRepository.UpdateObject(this._activeSection);
- 否则添加base.CoreRepository.SaveObject(this._activeSection);(数据层)
-
- 添加成功的画跳转到Context.Response.Redirect(String.Format("NodeEdit.aspx?NodeId={0}", this.ActiveNode.Id));
- 否则Context.Response.Redirect("Sections.aspx");
转载于:https://www.cnblogs.com/gguava/archive/2009/03/28/1424198.html