/// <summary>
        /// 得到一个对象实体
        /// </summary>
        public Model.Member_ContentAnswerResult GetModel(int Id)
        {
            StringBuilder strSql = new StringBuilder();
            strSql.Append("select Id, AccountId, Delflag, CreateDate, Verson, UnitContent, ClassId, Score, QuestionCnt, RightAnswer, WrongAnswer, Result  ");
            strSql.Append("  from Member_ContentAnswerResult ");
            strSql.Append(" where ");
            strSql.Append(" Id = @Id  ");

            SqlParameter[] parameters = {
                                                new SqlParameter("@Id", SqlDbType.Int,4)
                            };
            parameters[0].Value = Id;

            Model.Member_ContentAnswerResult model = new Model.Member_ContentAnswerResult();
            DataSet ds = MSEntLibSqlHelper.ExecuteDataSetBySql(strSql.ToString(), parameters);

            if (ds.Tables[0].Rows.Count > 0)
            {
                if (ds.Tables[0].Rows[0]["Id"].ToString() != "")
                {
                    model.Id = int.Parse(ds.Tables[0].Rows[0]["Id"].ToString());
                }
                if (ds.Tables[0].Rows[0]["AccountId"].ToString() != "")
                {
                    model.AccountId = int.Parse(ds.Tables[0].Rows[0]["AccountId"].ToString());
                }
                if (ds.Tables[0].Rows[0]["Delflag"].ToString() != "")
                {
                    if ((ds.Tables[0].Rows[0]["Delflag"].ToString() == "1") || (ds.Tables[0].Rows[0]["Delflag"].ToString().ToLower() == "true"))
                    {
                        model.Delflag = true;
                    }
                    else
                    {
                        model.Delflag = false;
                    }
                }
                if (ds.Tables[0].Rows[0]["CreateDate"].ToString() != "")
                {
                    model.CreateDate = DateTime.Parse(ds.Tables[0].Rows[0]["CreateDate"].ToString());
                }
                model.Verson = ds.Tables[0].Rows[0]["Verson"].ToString();
                if (ds.Tables[0].Rows[0]["UnitContent"].ToString() != "")
                {
                    model.UnitContent = int.Parse(ds.Tables[0].Rows[0]["UnitContent"].ToString());
                }
                if (ds.Tables[0].Rows[0]["ClassId"].ToString() != "")
                {
                    model.ClassId = int.Parse(ds.Tables[0].Rows[0]["ClassId"].ToString());
                }
                if (ds.Tables[0].Rows[0]["Score"].ToString() != "")
                {
                    model.Score = decimal.Parse(ds.Tables[0].Rows[0]["Score"].ToString());
                }
                if (ds.Tables[0].Rows[0]["QuestionCnt"].ToString() != "")
                {
                    model.QuestionCnt = int.Parse(ds.Tables[0].Rows[0]["QuestionCnt"].ToString());
                }
                if (ds.Tables[0].Rows[0]["RightAnswer"].ToString() != "")
                {
                    model.RightAnswer = int.Parse(ds.Tables[0].Rows[0]["RightAnswer"].ToString());
                }
                if (ds.Tables[0].Rows[0]["WrongAnswer"].ToString() != "")
                {
                    model.WrongAnswer = int.Parse(ds.Tables[0].Rows[0]["WrongAnswer"].ToString());
                }
                if (ds.Tables[0].Rows[0]["Result"].ToString() != "")
                {
                    if ((ds.Tables[0].Rows[0]["Result"].ToString() == "1") || (ds.Tables[0].Rows[0]["Result"].ToString().ToLower() == "true"))
                    {
                        model.Result = true;
                    }
                    else
                    {
                        model.Result = false;
                    }
                }

                return model;
            }
            else
            {
                return null;
            }
        }
        /// <summary>
        /// 获得数据列表
        /// </summary>
        public List<Model.Member_ContentAnswerResult> DataTableToList(DataTable dt)
        {
            List<Model.Member_ContentAnswerResult> modelList = new List<Model.Member_ContentAnswerResult>();
            int rowsCount = dt.Rows.Count;
            if (rowsCount > 0)
            {
                Model.Member_ContentAnswerResult model;
                for (int n = 0; n < rowsCount; n++)
                {
                    model = new Model.Member_ContentAnswerResult();
                    if (dt.Rows[n]["Id"].ToString() != "")
                    {
                        model.Id = int.Parse(dt.Rows[n]["Id"].ToString());
                    }
                    if (dt.Rows[n]["AccountId"].ToString() != "")
                    {
                        model.AccountId = int.Parse(dt.Rows[n]["AccountId"].ToString());
                    }
                    if (dt.Rows[n]["Delflag"].ToString() != "")
                    {
                        if ((dt.Rows[n]["Delflag"].ToString() == "1") || (dt.Rows[n]["Delflag"].ToString().ToLower() == "true"))
                        {
                            model.Delflag = true;
                        }
                        else
                        {
                            model.Delflag = false;
                        }
                    }
                    if (dt.Rows[n]["CreateDate"].ToString() != "")
                    {
                        model.CreateDate = DateTime.Parse(dt.Rows[n]["CreateDate"].ToString());
                    }
                    model.Verson = dt.Rows[n]["Verson"].ToString();
                    if (dt.Rows[n]["UnitContent"].ToString() != "")
                    {
                        model.UnitContent = int.Parse(dt.Rows[n]["UnitContent"].ToString());
                    }
                    if (dt.Rows[n]["ClassId"].ToString() != "")
                    {
                        model.ClassId = int.Parse(dt.Rows[n]["ClassId"].ToString());
                    }
                    if (dt.Rows[n]["Score"].ToString() != "")
                    {
                        model.Score = decimal.Parse(dt.Rows[n]["Score"].ToString());
                    }
                    if (dt.Rows[n]["QuestionCnt"].ToString() != "")
                    {
                        model.QuestionCnt = int.Parse(dt.Rows[n]["QuestionCnt"].ToString());
                    }
                    if (dt.Rows[n]["RightAnswer"].ToString() != "")
                    {
                        model.RightAnswer = int.Parse(dt.Rows[n]["RightAnswer"].ToString());
                    }
                    if (dt.Rows[n]["WrongAnswer"].ToString() != "")
                    {
                        model.WrongAnswer = int.Parse(dt.Rows[n]["WrongAnswer"].ToString());
                    }
                    if (dt.Rows[n]["Result"].ToString() != "")
                    {
                        if ((dt.Rows[n]["Result"].ToString() == "1") || (dt.Rows[n]["Result"].ToString().ToLower() == "true"))
                        {
                            model.Result = true;
                        }
                        else
                        {
                            model.Result = false;
                        }
                    }

                    modelList.Add(model);
                }
            }
            return modelList;
        }