/// <summary>
        /// 获得数据列表
        /// </summary>
        public List <university.Model.CCOM.Examination_subject_nature> DataTableToList(DataTable dt)
        {
            List <university.Model.CCOM.Examination_subject_nature> modelList = new List <university.Model.CCOM.Examination_subject_nature>();
            int rowsCount = dt.Rows.Count;

            if (rowsCount > 0)
            {
                university.Model.CCOM.Examination_subject_nature model;
                for (int n = 0; n < rowsCount; n++)
                {
                    model = new university.Model.CCOM.Examination_subject_nature();
                    if (dt.Rows[n]["Esn_id"].ToString() != "")
                    {
                        model.Esn_id = int.Parse(dt.Rows[n]["Esn_id"].ToString());
                    }
                    model.Esn_title   = dt.Rows[n]["Esn_title"].ToString();
                    model.Esn_content = dt.Rows[n]["Esn_content"].ToString();
                    if (dt.Rows[n]["Esn_type"].ToString() != "")
                    {
                        if ((dt.Rows[n]["Esn_type"].ToString() == "1") || (dt.Rows[n]["Esn_type"].ToString().ToLower() == "true"))
                        {
                            model.Esn_type = true;
                        }
                        else
                        {
                            model.Esn_type = false;
                        }
                    }
                    if (dt.Rows[n]["Esn_instrument_status"].ToString() != "")
                    {
                        if ((dt.Rows[n]["Esn_instrument_status"].ToString() == "1") || (dt.Rows[n]["Esn_instrument_status"].ToString().ToLower() == "true"))
                        {
                            model.Esn_instrument_status = true;
                        }
                        else
                        {
                            model.Esn_instrument_status = false;
                        }
                    }
                    if (dt.Rows[n]["Esn_Mi_id"].ToString() != "")
                    {
                        model.Esn_Mi_id = int.Parse(dt.Rows[n]["Esn_Mi_id"].ToString());
                    }
                    if (dt.Rows[n]["Agency_id"].ToString() != "")
                    {
                        model.Agency_id = int.Parse(dt.Rows[n]["Agency_id"].ToString());
                    }
                    if (dt.Rows[n]["Period_id"].ToString() != "")
                    {
                        model.Period_id = int.Parse(dt.Rows[n]["Period_id"].ToString());
                    }


                    modelList.Add(model);
                }
            }
            return(modelList);
        }
 /// <summary>
 /// 更新一条数据
 /// </summary>
 public bool Update(university.Model.CCOM.Examination_subject_nature model)
 {
     return(dal.Update(model));
 }
 /// <summary>
 /// 增加一条数据
 /// </summary>
 public int  Add(university.Model.CCOM.Examination_subject_nature model)
 {
     return(dal.Add(model));
 }