Exemple #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;
            }
        }
Exemple #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);
 }
Exemple #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;
        }
Exemple #4
0
 public bool Delete(ShortCut entity)
 {
     throw new NotImplementedException();
 }