/// <summary> /// 分页获取数据列表 /// </summary> //public DataSet GetList(int PageSize,int PageIndex,string strWhere) //{ //return dal.GetList(PageSize,PageIndex,strWhere); //} #endregion BasicMethod #region ExtensionMethod #endregion ExtensionMethod public bool SaveOrUpdate(Model.Lung o) { List <Maticsoft.Model.Lung> trList = GetModelList("PID=" + o.PID.ToString() + " And Period=" + o.Period.ToString()); if (trList != null && trList.Count > 0) { Maticsoft.Model.Lung oo = trList[0]; o.ID = oo.ID; return(Update(o)); } else { return(Add(o)); } }
/// <summary> /// 更新一条数据 /// </summary> public bool Update(Maticsoft.Model.Lung model) { return(dal.Update(model)); }
/// <summary> /// 增加一条数据 /// </summary> public bool Add(Maticsoft.Model.Lung model) { return(dal.Add(model)); }