Пример #1
0
 public bool ZEdit(DBA.Model.Consult model)
 {
     DBA.Model.Consult model2 = dal.GetModel(model.ID);
     model2.Reply  = model.Reply;
     model2.State  = "未回复";
     model2.ReName = model.ReName;
     model2.ReTime = DateTime.Now;
     return(Update(model2));
 }
Пример #2
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.Consult model)
        {
            if (model.ID == 0)
            {
                model.CreateTime = DateTime.Now;
                model.UserID     = DBA.BLL.Users.GetNowUserID().ToString();
                model.State      = "未回复";
                model.UserName   = DBA.BLL.Users.GetNowUserName();
                Add(model);
                return(true);
            }
            else
            {
                DBA.Model.Consult model2 = dal.GetModel(model.ID);
                model2.Reply  = model.Reply;
                model2.State  = "已回复";
                model2.ReTime = DateTime.Now;

                return(Update(model2));
            }
        }
Пример #3
0
 /// <summary>
 /// 更新一条数据
 /// </summary>
 public bool Update(DBA.Model.Consult model)
 {
     return(dal.Update(model));
 }
Пример #4
0
 /// <summary>
 /// 增加一条数据
 /// </summary>
 public int  Add(DBA.Model.Consult model)
 {
     return(dal.Add(model));
 }