/// <summary> /// 删除操作 /// </summary> /// <param name="id">删除ID</param> /// <returns></returns> private string DeleteData(string id, int tis) { string msg = string.Empty; if (!String.IsNullOrEmpty(id) && tis == 0) { EyouSoft.BLL.OtherStructure.BArticleClass bll = new EyouSoft.BLL.OtherStructure.BArticleClass(); if (bll.Delete(id.Trim())) msg = string.Format("{{\"result\":\"{0}\",\"msg\":\"{1}\"}}", "1", "删除成功"); else msg = string.Format("{{\"result\":\"{0}\",\"msg\":\"{1}\"}}", "0", "删除失败"); } return msg; }
/// <summary> /// 删除操作 /// </summary> /// <param name="id">删除ID</param> /// <returns></returns> private string DeleteData(string id, int tis) { string msg = string.Empty; if (!String.IsNullOrEmpty(id) && tis == 0) { EyouSoft.BLL.OtherStructure.BArticleClass bll = new EyouSoft.BLL.OtherStructure.BArticleClass(); if (bll.Delete(id.Trim())) { msg = string.Format("{{\"result\":\"{0}\",\"msg\":\"{1}\"}}", "1", "删除成功"); } else { msg = string.Format("{{\"result\":\"{0}\",\"msg\":\"{1}\"}}", "0", "删除失败"); } } return(msg); }
/// <summary> /// 绑定类别 /// </summary> /// <param name="selectItem"></param> /// <returns></returns> protected string BindArticleClass(string selectItem) { System.Text.StringBuilder query = new System.Text.StringBuilder(); IList <EyouSoft.Model.MArticleClass> list = new EyouSoft.BLL.OtherStructure.BArticleClass().GetList(null); query.Append("<option value='0' >-请选择-</option>"); for (int i = 0; i < list.Count; i++) { if (list[i].ClassId.ToString().Equals(selectItem)) { query.AppendFormat("<option value='{0}' selected='selected'>{1}</option>", list[i].ClassId, list[i].ClassName); } else { query.AppendFormat("<option value='{0}' >{1}</option>", list[i].ClassId, list[i].ClassName); } } return(query.ToString()); }
/// <summary> /// 绑定类别 /// </summary> /// <param name="selectItem"></param> /// <returns></returns> protected string BindArticleClass(string selectItem) { System.Text.StringBuilder query = new System.Text.StringBuilder(); IList<EyouSoft.Model.MArticleClass> list = new EyouSoft.BLL.OtherStructure.BArticleClass().GetList(null); query.Append("<option value='0' >-请选择-</option>"); for (int i = 0; i < list.Count; i++) { if (list[i].ClassId.ToString().Equals(selectItem)) { query.AppendFormat("<option value='{0}' selected='selected'>{1}</option>", list[i].ClassId, list[i].ClassName); } else { query.AppendFormat("<option value='{0}' >{1}</option>", list[i].ClassId, list[i].ClassName); } } return query.ToString(); }