/// <summary> /// ��������б� /// </summary> public List<DSJL.Model.TB_StandTestRefe> DataTableToList(DataTable dt) { List<DSJL.Model.TB_StandTestRefe> modelList = new List<DSJL.Model.TB_StandTestRefe>(); int rowsCount = dt.Rows.Count; if (rowsCount > 0) { DSJL.Model.TB_StandTestRefe model; for (int n = 0; n < rowsCount; n++) { model = new DSJL.Model.TB_StandTestRefe(); if(dt.Rows[n]["ID"].ToString()!="") { model.ID=int.Parse(dt.Rows[n]["ID"].ToString()); } if(dt.Rows[n]["StandID"].ToString()!="") { model.StandID=int.Parse(dt.Rows[n]["StandID"].ToString()); } if(dt.Rows[n]["TestID"].ToString()!="") { model.TestID=int.Parse(dt.Rows[n]["TestID"].ToString()); } modelList.Add(model); } } return modelList; }
/// <summary> /// 获得数据列表 /// </summary> public List <DSJL.Model.TB_StandTestRefe> DataTableToList(DataTable dt) { List <DSJL.Model.TB_StandTestRefe> modelList = new List <DSJL.Model.TB_StandTestRefe>(); int rowsCount = dt.Rows.Count; if (rowsCount > 0) { DSJL.Model.TB_StandTestRefe model; for (int n = 0; n < rowsCount; n++) { model = new DSJL.Model.TB_StandTestRefe(); if (dt.Rows[n]["ID"].ToString() != "") { model.ID = int.Parse(dt.Rows[n]["ID"].ToString()); } if (dt.Rows[n]["StandID"].ToString() != "") { model.StandID = int.Parse(dt.Rows[n]["StandID"].ToString()); } if (dt.Rows[n]["TestID"].ToString() != "") { model.TestID = int.Parse(dt.Rows[n]["TestID"].ToString()); } modelList.Add(model); } } return(modelList); }
/// <summary> /// 更新一条数据 /// </summary> public bool Update(DSJL.Model.TB_StandTestRefe model) { return(dal.Update(model)); }
/// <summary> /// 增加一条数据 /// </summary> public void Add(DSJL.Model.TB_StandTestRefe model) { dal.Add(model); }