/// <summary>
        /// 
        /// </summary>
        /// <param name="app"></param>
        /// <param name="function"></param>
        /// <param name="actor"></param>
        /// <param name="itemId"></param>
        /// <param name="message"></param>
        /// <param name="args"></param>
      public  void Log(Format format,LogType type, int actor, int objectId,object[] args) {
          SystemLog _Log = new SystemLog();
          _Log.ItemId = Convert.ToString(objectId);
          _Log.Actor = Convert.ToString(actor);
          _Log.CreateDatetime = DateTime.Now;
          _Log.Module = format.Function.Module.Name;
          _Log.Function = format.Function.Name;
          _Log.Body = LoggerUtils.Format(format, args);
          _Log.OpType = Enum.GetName(typeof(LogType), type);

          using (ChooseDishesEntities entities = new ChooseDishesEntities()) {
              entities.SystemLog.Add(_Log);
              entities.SaveChanges();
          }      
      }
        public SystemLog CreateSystemLog(SystemLogBean bean)
        {
            SystemLog beanBack = new SystemLog();
            beanBack.Id = bean.Id;
            beanBack.Module = bean.Module;
            beanBack.Function = bean.Function;
            beanBack.OpType = bean.OpType;
            beanBack.Actor = bean.Actor;
            beanBack.CreateDatetime = bean.CreateDatetime;
            beanBack.Body = bean.Body;
            beanBack.ItemId = bean.ItemId;
            return beanBack;

        }
        public SystemLogBean CreateSystemLogBean(SystemLog bean)
        {
            this.Id = bean.Id;
            this.Module = bean.Module;
            this.Function = bean.Function;
            this.OpType = bean.OpType;
            this.Actor = bean.Actor;
            this.CreateDatetime = bean.CreateDatetime;
            this.Body = bean.Body;
            this.ItemId = bean.ItemId;
            return this;

        }