/// <summary> /// 保存事件 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void Save_Click(object sender, EventArgs e) { try { Hashtable ht = new Hashtable(); ht["CategoryID"] = CategoryID.Value; // 文章名称 ht["ArticleName"] = ArticleName.Value; // 文章内容 ht["ArticleContent"] = ArticleContent.Value; ht["Sort"] = string.IsNullOrEmpty(Sort.Value) ? "9999" : Sort.Value; ht["ReleaseTime"] = DateTime.Now; ht["Releaser"] = RequestSession.GetSessionUser().UserName; if (!string.IsNullOrEmpty(_key)) { ht["ID"] = _key; } else { ht["ID"] = CommonHelper.GetGuid; ht["DeleteMark"] = "1"; ht["SysFlag"] = "0"; } bool returnValue = articleManager.AddOrEditArticleInfo(ht, _key); if (returnValue) { ShowMsgHelper.AlertMsg("操作成功!"); } else { ShowMsgHelper.Alert_Error("操作失败!"); } } catch (Exception ex) { throw ex; } }