Esempio n. 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));
            }
        }
Esempio n. 2
0
 /// <summary>
 /// 更新一条数据
 /// </summary>
 public bool Update(Maticsoft.Model.SportLife model)
 {
     return(dal.Update(model));
 }
Esempio n. 3
0
 /// <summary>
 /// 增加一条数据
 /// </summary>
 public bool Add(Maticsoft.Model.SportLife model)
 {
     return(dal.Add(model));
 }