Ejemplo n.º 1
0
        ///<summary>
        ///观点详情
        /// </summary>
        public Option OptionShow(int Id)
        {
            try
            {
                string sql1 = "update `optioninfo` set OptionHot=OptionHot+1 where OptionID='" + Id + "'";
                MySqlDB.nonquery(sql1, CommandType.Text, null);
                string    sql = "select * from `optioninfo` where OptionID='" + Id + "' ";
                DataTable dt  = MySqlDB.GetDataTable(sql, CommandType.Text, null);
                Option    op  = MySqlDB.fanshemodel <Option>(dt);
                //DataTable dt = MySqlDB.GetDataTable(sql, CommandType.Text, null);
                //Option op = new Option();
                //op.OptionTitle = dt.Rows[0]["OptionTitle"].ToString();
                //op.OptionContent = dt.Rows[0]["OptionContent"].ToString();
                //op.Author = dt.Rows[0]["Author"].ToString();
                //op.Source = dt.Rows[0]["Source"].ToString();
                //op.Date = dt.Rows[0]["Date"].ToString();
                //op.OptionHot = (int)dt.Rows[0]["OptionHot"];

                return(op);
            }
            catch (Exception ex)
            {
                Log4netHelper.WriteLog("错误报告", ex);
                throw ex;
            }
        }
Ejemplo n.º 2
0
 /// <summary>
 /// 分公司信息
 /// </summary>
 /// <param name="FilialeId">公司id</param>
 /// <returns></returns>
 public filialetext GetFilialetext(int FilialeId)
 {
     try
     {
         //string sql = "select  FilialeId,FilialeName,FilialeTexts,FilialeTextAddr,FilialeTextPhone from filiale INNER JOIN filialetext on filiale.FilialeTextId = filialetext.FilialeTextId where FilialeId = "+FilialeId;
         string    sql   = "SELECT * from filialetext LEFT JOIN filiale on filialetext.FilialeId=filiale.FilialeId where filialetext.FilialeId =" + FilialeId + " LIMIT 1";
         DataTable model = MySqlDB.GetDataTable(sql, CommandType.Text, null);
         return(MySqlDB.fanshemodel <filialetext>(model));
     }
     catch (Exception ex)
     {
         return(null);
     }
 }
Ejemplo n.º 3
0
 ///<summary>
 ///获取背景提升项目详情
 /// </summary>
 /// <para>Id:项目ID</para>
 /// <returns></returns>
 public projectItem ProjectItemShow(int Id)
 {
     try
     {
         string sql = "update projectitem set Pro_ReadCount=Pro_ReadCount+1 where Pro_ID=" + Id + ";";
         sql += "select * from projectitem where Pro_ID=" + Id + "";
         DataTable   dt  = MySqlDB.GetDataTable(sql, CommandType.Text, null);
         projectItem pro = MySqlDB.fanshemodel <projectItem>(dt);
         return(pro);
     }
     catch (Exception ex)
     {
         Log4netHelper.WriteLog("错误报告", ex);
         throw ex;
     }
 }
Ejemplo n.º 4
0
 ///<summary>
 ///获取移民项目详情
 /// </summary>
 /// <para>Id:项目ID</para>
 /// <returns></returns>
 public Project ImmigrantShow(int Id)
 {
     try
     {
         string sql = "update project set ProjectReadCount=ProjectReadCount+1 where ProjectID=" + Id + ";";
         sql += "select * from project where ProjectID='" + Id + "'";
         DataTable dt  = MySqlDB.GetDataTable(sql, CommandType.Text, null);
         Project   pro = MySqlDB.fanshemodel <Project>(dt);
         return(pro);
     }
     catch (Exception ex)
     {
         Log4netHelper.WriteLog("错误报告", ex);
         throw ex;
     }
 }