/// <summary> /// 获得数据列表 /// </summary> public List <ERM.MDL.ArchiveTemps> GetModelList(string strWhere) { DataSet ds = dal.GetList(strWhere); List <ERM.MDL.ArchiveTemps> modelList = new List <ERM.MDL.ArchiveTemps>(); int rowsCount = ds.Tables[0].Rows.Count; if (rowsCount > 0) { ERM.MDL.ArchiveTemps model; for (int n = 0; n < rowsCount; n++) { model = new ERM.MDL.ArchiveTemps(); model.Cell_Templet_Name = ds.Tables[0].Rows[n]["Cell_Templet_Name"].ToString(); model.Cell_Templet_Table = ds.Tables[0].Rows[n]["Cell_Templet_Table"].ToString(); model.fileRecording_Templet_Table = ds.Tables[0].Rows[n]["fileRecording_Templet_Table"].ToString(); if (ds.Tables[0].Rows[n]["isDefault"].ToString() != "") { model.isDefault = int.Parse(ds.Tables[0].Rows[n]["isDefault"].ToString()); } if (ds.Tables[0].Rows[n]["orderindex"].ToString() != "") { model.orderindex = int.Parse(ds.Tables[0].Rows[n]["orderindex"].ToString()); } model.Recording_Templet_Name = ds.Tables[0].Rows[n]["Recording_Templet_Name"].ToString(); if (ds.Tables[0].Rows[n]["tempid"].ToString() != "") { model.tempid = int.Parse(ds.Tables[0].Rows[n]["tempid"].ToString()); } model.UserTitle = ds.Tables[0].Rows[n]["UserTitle"].ToString(); if (ds.Tables[0].Rows[n]["visible"].ToString() != "") { model.visible = int.Parse(ds.Tables[0].Rows[n]["visible"].ToString()); } modelList.Add(model); } } return(modelList); }
/// <summary> /// 更新一条数据 /// </summary> public void Update(ERM.MDL.ArchiveTemps model) { dal.Update(model); }
/// <summary> /// 增加一条数据 /// </summary> public void Add(ERM.MDL.ArchiveTemps model) { dal.Add(model); }