コード例 #1
0
        /// <summary>
        /// 分页获取数据列表
        /// </summary>
        //public DataSet GetList(int PageSize,int PageIndex,string strWhere)
        //{
        //return dal.GetList(PageSize,PageIndex,strWhere);
        //}

        #endregion  BasicMethod
        #region  ExtensionMethod
        public bool Edit(DBA.Model.Goods model)
        {
            DBA.Model.Warning warn = wbll.GetModel(Convert.ToInt32(model.Str1));
            model.Min      = warn.Min;
            model.Max      = warn.Max;
            model.WarnName = warn.WarnType;
            if (model.ID == 0)
            {
                model.GoodsKC = 0;
                Add(model);
                return(true);
            }
            else
            {
                return(Update(model));
            }
        }
コード例 #2
0
 /// <summary>
 /// 更新一条数据
 /// </summary>
 public bool Update(DBA.Model.Goods model)
 {
     return(dal.Update(model));
 }
コード例 #3
0
 /// <summary>
 /// 增加一条数据
 /// </summary>
 public int  Add(DBA.Model.Goods model)
 {
     return(dal.Add(model));
 }