Exemplo n.º 1
0
 /// <summary>
 /// 修改观点
 /// </summary>
 /// <param name="model"></param>
 /// <returns></returns>
 public int UpdOptions(JiaJiModels.OptionModel model)
 {
     try
     {
         return(new JiaJiDAL.OptionDAL().UpdOptions(model));
     }
     catch (Exception ex)
     {
         return(0);
     }
 }
Exemplo n.º 2
0
        /// <summary>
        /// 修改观点
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        public int UpdOptions(JiaJiModels.OptionModel model)
        {
            try
            {
                string sql = "update optioninfo set OptionTitle='" + model.OptionTitle + "',OptionKeyWord='" + model.OptionKeyWord + "',OptionContent='" + model.OptionContent + "',Author='" + model.Author + "',Source='" + model.Source + "',`Date`='" + model.Date + "',OptionUrl='" + model.OptionUrl + "' where OptionID=" + model.OptionID + "";

                int he = MySqlDB.nonquery(sql, CommandType.Text, null);
                return(he);
            }
            catch (Exception ex)
            {
                return(0);
            }
        }
Exemplo n.º 3
0
        /// <summary>
        /// 添加嘉际观点
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        public int AddOption(JiaJiModels.OptionModel model)
        {
            string sql = string.Format("insert into optioninfo(OptionTitle,OptionContent,Author,Source,Date,OptionHot,OptionKeyWord,OptionUrl) VALUES('{0}','{1}','{2}','{3}', '{4}',{5},'{6}','{7}')", model.OptionTitle, model.OptionContent, model.Author, model.Source, model.Date, 0, model.OptionKeyWord, model.OptionUrl);

            return(MySqlDB.nonquery(sql, System.Data.CommandType.Text, null));
        }
Exemplo n.º 4
0
 /// <summary>
 /// 添加嘉际观点
 /// </summary>
 /// <param name="model"></param>
 /// <returns></returns>
 public int AddOption(JiaJiModels.OptionModel model)
 {
     return(new JiaJiDAL.OptionDAL().AddOption(model));
 }