Пример #1
0
        /// <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.SportLife o)
        {
            List <Maticsoft.Model.SportLife> trList = GetModelList("PID=" + o.PID.ToString() + " And Period=" + o.Period.ToString());

            if (trList != null && trList.Count > 0)
            {
                Maticsoft.Model.SportLife oo = trList[0];
                o.ID = oo.ID;
                return(Update(o));
            }
            else
            {
                return(Add(o));
            }
        }
Пример #2
0
 /// <summary>
 /// 更新一条数据
 /// </summary>
 public bool Update(Maticsoft.Model.SportLife model)
 {
     return(dal.Update(model));
 }
Пример #3
0
 /// <summary>
 /// 增加一条数据
 /// </summary>
 public bool Add(Maticsoft.Model.SportLife model)
 {
     return(dal.Add(model));
 }