public static bool UpdateInfo(Information i) { if (InformationDAO.UpdateInfo(i) == true) { return(true); } return(false); }
public static bool ReadInfoNew(int idIF) { if (InformationDAO.ReadInfoNew(idIF) == true) { return(true); } return(false); }
public static bool HideInfo(int idIF) { if (InformationDAO.HideInfo(idIF) == true) { return(true); } return(false); }
public static bool DelIF(int idIF) { if (InformationDAO.DelIF(idIF) == true) { return(true); } return(false); }
public string GetInformationName(int informationId) { if (1 > informationId) { return(null); } InformationDAO informationDao = new InformationDAO(); return(informationDao.GetInformationName(informationId)); }
public DataSet GetInformation(int informationId) { if (1 > informationId) { return(new DataSet()); } InformationDAO informationDao = new InformationDAO(); return(informationDao.GetInformation(informationId)); }
protected void SubmitButton_Click(object sender, EventArgs e) { string categoryType = Request.QueryString["id"]; int categoryId = Convert.ToInt32(categoryType); if (null == categoryType || categoryType.Equals(string.Empty)) { UtilFunctions.AlertBox("页面ID错误,请重新载入!", Page); return; } InformationDAO informationDao = new InformationDAO(); if (0 < informationDao.UpdateInformation(categoryId, ContentTextBox.Text)) { UtilFunctions.AlertBox("修改成功!", Page); } else { UtilFunctions.AlertBox("修改失败,请仔细检查输入内容!", Page); } }
protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { string categoryType = Request.QueryString["id"]; int categoryId = Convert.ToInt32(categoryType); if (null == categoryType || categoryType.Equals(string.Empty)) { this.showFalseMessage("请输入正确的请求代号!"); return; } InformationDAO informationDao = new InformationDAO(); DataSet informationDataset = informationDao.GetInformation(categoryId); if (null == informationDataset || 1 > informationDataset.Tables.Count || 1 > informationDataset.Tables[0].Rows.Count) { this.showFalseMessage("此类别内容待添加!"); return; } this.TitleLabel.Text = informationDataset.Tables[0].Rows[0]["name"].ToString(); this.ContentTextBox.Text = informationDataset.Tables[0].Rows[0]["article"].ToString(); } }
public static List <Information> GetAllInfoByValueSearch(string value) { return(InformationDAO.GetAllInfoByValueSearch(value)); }
public static Information GetInfoByToken(string token) { return(InformationDAO.GetInfoByToken(token)); }
public static List <Information> Get3InfoByIDCate(int idCate) { return(InformationDAO.Get3InfoByIDCate(idCate)); }
public static List <Information> GetInfoRandom() { return(InformationDAO.GetInfoRandom()); }
public static Information GetInfoByID(int idIF) { return(InformationDAO.GetInfoByID(idIF)); }
public static List <Information> GetAllInfoUserHide() { return(InformationDAO.GetAllInfoUserHide()); }
public static List <Information> GetInfoHideByIDUser(int idUser) { return(InformationDAO.GetInfoHideByIDUser(idUser)); }
public static List <Information> GetAllInfoAdmin() { return(InformationDAO.GetAllInfoAdmin()); }