Пример #1
0
		/// <summary>
		/// 获得数据列表
		/// </summary>
		public List<university.Model.CCOM.Examination_subject_item> DataTableToList(DataTable dt)
		{
			List<university.Model.CCOM.Examination_subject_item> modelList = new List<university.Model.CCOM.Examination_subject_item>();
			int rowsCount = dt.Rows.Count;
			if (rowsCount > 0)
			{
				university.Model.CCOM.Examination_subject_item model;
				for (int n = 0; n < rowsCount; n++)
				{
					model = new university.Model.CCOM.Examination_subject_item();					
													if(dt.Rows[n]["Esi_id"].ToString()!="")
				{
					model.Esi_id=int.Parse(dt.Rows[n]["Esi_id"].ToString());
				}
																																if(dt.Rows[n]["Esi_type"].ToString()!="")
				{
					model.Esi_type=int.Parse(dt.Rows[n]["Esi_type"].ToString());
				}
																																				model.Esi_text= dt.Rows[n]["Esi_text"].ToString();
																																model.Esi_remark= dt.Rows[n]["Esi_remark"].ToString();
																												if(dt.Rows[n]["Esn_id"].ToString()!="")
				{
					model.Esn_id=int.Parse(dt.Rows[n]["Esn_id"].ToString());
				}
																										
				
					modelList.Add(model);
				}
			}
			return modelList;
		}
Пример #2
0
		/// <summary>
		/// 更新一条数据
		/// </summary>
		public bool Update(university.Model.CCOM.Examination_subject_item model)
		{
			return dal.Update(model);
		}
Пример #3
0
		/// <summary>
		/// 增加一条数据
		/// </summary>
		public int  Add(university.Model.CCOM.Examination_subject_item model)
		{
						return dal.Add(model);
						
		}