Beispiel #1
0
        /// <summary>
        /// 新增一个ShortCut到数据库中
        /// </summary>
        /// <param name="model">ShortCut数据</param>
        /// <returns>是否新增成功</returns>
        public bool Add(ShortCut model)
        {
            try
            {
                return dal.Add(model);
            }
            catch (Exception ex)
            {
                #region 将异常写入日志文件
                StackFrame frame = (new StackTrace(true)).GetFrame(1);
                Utility.Log(this.GetType().FullName, frame.GetMethod().Name, ex);
                #endregion

                return false;
            }
        }
Beispiel #2
0
 public bool Add(ShortCut entity)
 {
     T_PF_SHORTCUT model = entity.CloneObject<T_PF_SHORTCUT>(new T_PF_SHORTCUT());
     model = Utility.CreateCommonProperty().CloneObject<T_PF_SHORTCUT>(model);
     return _commonDAL.Add(model);
 }
Beispiel #3
0
        public bool AddByUser(ShortCut entity, string userid)
        {
            bool result = true;
            if (!IsExists(entity.ShortCutID))
            {
               result=this.Add(entity);
            }

            if (result)
                result = AddUserShortCut(entity.ShortCutID, userid);

            return result;
        }
Beispiel #4
0
 public bool Delete(ShortCut entity)
 {
     throw new NotImplementedException();
 }