/// <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.TreatInfo tr) { List <Maticsoft.Model.TreatInfo> trList = GetModelList("PID=" + tr.PID.ToString()); if (trList != null && trList.Count > 0) { Maticsoft.Model.TreatInfo oldTreatInfo = trList[0]; oldTreatInfo.TreatDate = tr.TreatDate.Value; oldTreatInfo.TreatLobe = tr.TreatLobe; oldTreatInfo.ValveCount = tr.ValveCount; oldTreatInfo.ValvePosition = tr.ValvePosition; oldTreatInfo.SurgeryDate = tr.SurgeryDate; return(Update(oldTreatInfo)); } else { return(Add(tr)); } }
/// <summary> /// 更新一条数据 /// </summary> public bool Update(Maticsoft.Model.TreatInfo model) { return(dal.Update(model)); }
/// <summary> /// 增加一条数据 /// </summary> public bool Add(Maticsoft.Model.TreatInfo model) { return(dal.Add(model)); }